OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <style> | 2 <style> |
3 body, table, tbody { | 3 body, #tbody2 { |
4 contain: size layout; | 4 contain: size layout; |
5 } | 5 } |
6 </style> | 6 </style> |
7 <script src="../../resources/check-layout.js"></script> | 7 <script src="../../resources/check-layout.js"></script> |
8 <script src="../../resources/run-after-layout-and-paint.js"></script> | 8 <script src="../../resources/run-after-layout-and-paint.js"></script> |
9 <script type="text/javascript"> | 9 <script type="text/javascript"> |
10 function reparentRow() { | 10 function reparentRow() { |
11 document.getElementById("table2").appendChild(document.getElementById("r
ow")); | 11 document.getElementById("tbody2").appendChild(document.getElementById("r
ow")); |
12 checkLayout("#table2"); | |
13 } | 12 } |
14 runAfterLayoutAndPaint(reparentRow, true); | 13 runAfterLayoutAndPaint(reparentRow, true); |
15 </script> | 14 </script> |
16 <p>This shouldn't crash and there should be a green square.</p> | 15 <p>This shouldn't crash.</p> |
17 <table> | 16 <table> |
18 <tr id="row"><td style="height:50px;width:50px;background:green" data-expected
-width=16 data-expected-height=16></td></tr> | 17 <tr id="row"><td style="height:50px;width:50px;background:green"></td></tr> |
19 </table> | 18 </table> |
20 <table id="table2" style="height:20px;width:20px"> | 19 <table style="height:20px;width:20px"> |
| 20 <tbody id="tbody2"> |
| 21 </tbody> |
21 </table> | 22 </table> |
OLD | NEW |