OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 #stopInherit { color: green } |
| 6 </style> |
| 7 <div id="host"> |
| 8 <div id="stopInherit"> |
| 9 <span></span> |
| 10 <span></span> |
| 11 <span></span> |
| 12 <span></span> |
| 13 <span></span> |
| 14 </div> |
| 15 </div> |
| 16 <script> |
| 17 test(() => { |
| 18 var root = host.createShadowRoot(); |
| 19 root.innerHTML = '<div id="shadowDiv"><content></content></div>'; |
| 20 host.offsetTop; |
| 21 root.querySelector("#shadowDiv").style.color = "red"; |
| 22 assert_true(!!window.internals, "This test only works with --expose-inte
rnals-for-testing."); |
| 23 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2, "
Inheritance propagation should stop at #stopInherit element."); |
| 24 }, "Inheritance propagation should not cause full subtree recalcs in flat-tr
ee."); |
| 25 </script> |
OLD | NEW |