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