| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> | 2 <script src="../../../resources/js-test.js"></script> |
| 3 <style> | 3 <style> |
| 4 #root { background-color: red } | 4 #root { background-color: red } |
| 5 .inherit { background-color: inherit } | 5 .inherit { background-color: inherit } |
| 6 </style> | 6 </style> |
| 7 <div id="root"> | 7 <div id="root"> |
| 8 <div class="inherit"> | 8 <div class="inherit"> |
| 9 <div class="inherit"> | 9 <div class="inherit"> |
| 10 <div id="inner" class="inherit"></div> | 10 <div id="inner" class="inherit"></div> |
| 11 </div> | 11 </div> |
| 12 </div> | 12 </div> |
| 13 <div> | 13 <div> |
| 14 <div></div> | 14 <div></div> |
| 15 <div></div> | 15 <div></div> |
| 16 <div></div> | 16 <div></div> |
| 17 <div></div> | 17 <div></div> |
| 18 </div> | 18 </div> |
| 19 </div> | 19 </div> |
| 20 <script> | 20 <script> |
| 21 description(""); | 21 description(""); |
| 22 | 22 |
| 23 root.offsetTop; // force recalc | 23 root.offsetTop; // force recalc |
| 24 | 24 |
| 25 root.style.background = "green"; | 25 root.style.background = "green"; |
| 26 | 26 |
| 27 // The #root element, elements with .inherited and their siblings (5 in total) w
ill need a recalc. | 27 // The #root element, elements with .inherited and their siblings (5 in total) w
ill need a recalc. |
| 28 if (window.internals) | 28 if (window.internals) |
| 29 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); | 29 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "5
"); |
| 30 | 30 |
| 31 var green = "rgb(0, 128, 0)"; | 31 var green = "rgb(0, 128, 0)"; |
| 32 shouldBe("getComputedStyle(inner).backgroundColor", "green"); | 32 shouldBe("getComputedStyle(inner).backgroundColor", "green"); |
| 33 </script> | 33 </script> |
| OLD | NEW |