table-limited-quirks.html (3749B)
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2 <meta charset="utf-8"> 3 <title>Table in limited-quirks mode</title> 4 <script src='/resources/testharness.js'></script> 5 <script src='/resources/testharnessreport.js'></script> 6 <script src="/resources/check-layout-th.js"></script> 7 <meta name="flags" content="ahem"> 8 <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> 9 <link rel="stylesheet" type="text/css" href="./support/table-tentative.css" /> 10 <link rel="author" title="Aleks Totic" href="atotic@chromium.org" /> 11 <link rel="author" title="Oriol Brufau" href="obrufau@igalia.com" /> 12 <link rel="help" href="https://quirks.spec.whatwg.org/#the-table-cell-width-calculation-quirk" /> 13 <link rel="help" href="https://dom.spec.whatwg.org/#concept-document-limited-quirks" /> 14 <link rel="help" href="https://github.com/servo/servo/pull/37814" /> 15 <style> 16 table { 17 table-layout: auto; 18 border-spacing: 8px 8px; 19 } 20 td { 21 padding: 20px; 22 background: #BFB; 23 font-size: 10px; 24 box-sizing: border-box; 25 } 26 td > div { 27 display: inline-block; 28 background: rgba(56,162,56,0.3); 29 } 30 </style> 31 32 <h1>Tables in limited-quirks mode proposals</h1> 33 34 <p><a href="https://quirks.spec.whatwg.org/#the-table-cell-height-box-sizing-quirk">The table cell height box sizing quirk</a> does NOT apply to limited-quirks mode</p> 35 <table data-expected-height=156> 36 <tr> 37 <td style="height:100px;box-sizing:content-box" data-expected-height=140>100 height</td> 38 </tr> 39 </table> 40 <table data-expected-height=116> 41 <tr> 42 <td style="height:100px;box-sizing:border-box" data-expected-height=100>100 height</td> 43 </tr> 44 </table> 45 46 <p><a href="https://quirks.spec.whatwg.org/#the-table-cell-nowrap-minimum-width-calculation-quirk">The table cell nowrap minimum width calculation quirk</a> does NOT apply to limited-quirks mode</p> 47 <table> 48 <tr> 49 <td nowrap style="width:50px;font: 20px/1 Ahem" data-expected-width=580>nowrap nowrap nowrap nowrap</td> 50 </tr> 51 </table> 52 53 <p><a href="https://quirks.spec.whatwg.org/#the-text-decoration-doesnt-propagate-into-tables-quirk">The text decoration doesn’t propagate into tables quirk</a> does NOT apply to limited-quirks mode</p> 54 <div style="font-style:italic"> 55 <table> 56 <td id="italic">decoration</td> 57 </table> 58 </div> 59 60 <p><a href="https://quirks.spec.whatwg.org/#the-collapsing-table-quirk">The collapsing table quirk</a> does NOT apply to limited-quirks mode</p> 61 <table style="border: 20px solid green" data-expected-height=40 data-expected-width=40></table> 62 63 <p><a href="https://quirks.spec.whatwg.org/#the-table-cell-width-calculation-quirk">The table cell width calculation quirk</a> does NOT apply to limited-quirks mode</p> 64 <table style="width:200px"> 65 <td data-expected-width=184><img style="width:50px;height:20px"><img style="width:50px;height:20px"><img style="width:50px;height:20px"><img style="width:50px;height:20px"><img style="width:50px;height:20px"></td> 66 </table> 67 68 <script> 69 let pngSrc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAACWAQMAAAChElVaAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABlBMVEUAgAD///8UPy9PAAAAAWJLR0QB/wIt3gAAAAd0SU1FB+MBDwkdA1Cz/EMAAAAbSURBVEjH7cGBAAAAAMOg+VPf4ARVAQAAAM8ADzwAAeM8wQsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMDEtMTVUMTc6Mjk6MDMtMDg6MDCYDy9IAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTAxLTE1VDE3OjI5OjAzLTA4OjAw6VKX9AAAAABJRU5ErkJggg==" 70 ; 71 for (let img of Array.from(document.querySelectorAll("img"))) { 72 img.src = pngSrc; 73 } 74 test(_ => { 75 assert_equals(window.getComputedStyle(document.querySelector("#italic")).fontStyle, "italic"); 76 }, "decoration propagates into table"); 77 document.fonts.ready.then(() => checkLayout("table")); 78 </script>