OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 body { margin: 0 } |
| 6 #ref { margin-left: 100px } |
| 7 #table { border-spacing: 100px 0 } |
| 8 #cell { position: relative } |
| 9 #div { position: absolute } |
| 10 </style> |
| 11 <p>The two Xs below should be horizontally aligned</p> |
| 12 <div id="ref">X</div> |
| 13 <table id="table"> |
| 14 <td id="cell"> |
| 15 <div id="div">X</div> |
| 16 </td> |
| 17 </table> |
| 18 <script> |
| 19 test(() => { |
| 20 // Force initial layout of the table. |
| 21 table.offsetTop; |
| 22 // Trigger StyleDidChange() on LayoutTable to cause crbug.com/716006 |
| 23 table.style.backgroundColor = "white"; |
| 24 table.offsetTop; |
| 25 // Trigger a re-layout which does not update the column positions. |
| 26 div.appendChild(document.createTextNode(' ')); |
| 27 |
| 28 assert_equals(cell.offsetLeft, 100, "Check that cell is offset by border-spa
cing."); |
| 29 }, "Test a re-layout of out-of-flow children of a table cell with border-spaci
ng."); |
| 30 </script> |
OLD | NEW |