OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <style> |
| 4 body { color: black; } |
| 5 .match+div div+div { color: green; } |
| 6 </style> |
| 7 <div> |
| 8 <div id="top"></div> |
| 9 <div> |
| 10 <div></div> |
| 11 <div id="green"></div> |
| 12 </div> |
| 13 <div> |
| 14 <div></div> |
| 15 <div></div> |
| 16 <div></div> |
| 17 <div></div> |
| 18 </div> |
| 19 </div> |
| 20 <script> |
| 21 if (window.testRunner) |
| 22 testRunner.dumpAsText(); |
| 23 |
| 24 description("Check that we don't do unnecessary style recalcs for sibling trees.
"); |
| 25 |
| 26 if (window.internals) |
| 27 internals.updateStyleAndReturnAffectedElementCount(); |
| 28 |
| 29 document.getElementById("top").className = "match"; |
| 30 |
| 31 if (window.internals) |
| 32 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "4"); |
| 33 |
| 34 shouldBe("getComputedStyle(document.getElementById('green'), null).color", "'rgb
(0, 128, 0)'"); |
| 35 |
| 36 successfullyParsed = true; |
| 37 </script> |
OLD | NEW |