| 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 /* Rule to set childrenAffectedByDirectAdjacentRules() on #parent */ | 4 /* Rule to set childrenAffectedByDirectAdjacentRules() on #parent */ |
| 5 div + #x { color: orange } | 5 div + #x { color: orange } |
| 6 | 6 |
| 7 /* Rule to cause subtree recalc on #c1 when className set to c1. */ | 7 /* Rule to cause subtree recalc on #c1 when className set to c1. */ |
| 8 .c1 * { background-color: green } | 8 .c1 * { background-color: green } |
| 9 | 9 |
| 10 /* Rule to cause subtree recalc on div sibling of #c2 when className set to c2.
*/ | 10 /* Rule to cause subtree recalc on div sibling of #c2 when className set to c2.
*/ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 var c2Spans = document.querySelectorAll("#c2 + div span"); | 47 var c2Spans = document.querySelectorAll("#c2 + div span"); |
| 48 shouldBe("getComputedStyle(c2Spans[0]).backgroundColor", "transparent"); | 48 shouldBe("getComputedStyle(c2Spans[0]).backgroundColor", "transparent"); |
| 49 shouldBe("getComputedStyle(c2Spans[1]).backgroundColor", "transparent"); | 49 shouldBe("getComputedStyle(c2Spans[1]).backgroundColor", "transparent"); |
| 50 | 50 |
| 51 document.body.offsetTop; // force recalc | 51 document.body.offsetTop; // force recalc |
| 52 | 52 |
| 53 c1.className = "c1"; | 53 c1.className = "c1"; |
| 54 | 54 |
| 55 if (window.internals) | 55 if (window.internals) |
| 56 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); | 56 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "3
"); |
| 57 shouldBe("getComputedStyle(c1Spans[0]).backgroundColor", "green"); | 57 shouldBe("getComputedStyle(c1Spans[0]).backgroundColor", "green"); |
| 58 shouldBe("getComputedStyle(c1Spans[1]).backgroundColor", "green"); | 58 shouldBe("getComputedStyle(c1Spans[1]).backgroundColor", "green"); |
| 59 | 59 |
| 60 document.body.offsetTop; // force recalc | 60 document.body.offsetTop; // force recalc |
| 61 | 61 |
| 62 c2.className = "c2"; | 62 c2.className = "c2"; |
| 63 | 63 |
| 64 if (window.internals) | 64 if (window.internals) |
| 65 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); | 65 shouldBe("internals.updateStyleAndLayoutAndReturnAffectedElementCount()", "3
"); |
| 66 shouldBe("getComputedStyle(c2Spans[0]).backgroundColor", "green"); | 66 shouldBe("getComputedStyle(c2Spans[0]).backgroundColor", "green"); |
| 67 shouldBe("getComputedStyle(c2Spans[1]).backgroundColor", "green"); | 67 shouldBe("getComputedStyle(c2Spans[1]).backgroundColor", "green"); |
| 68 | 68 |
| 69 </script> | 69 </script> |
| OLD | NEW |