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 :-webkit-any(.a1) { background-color: green } | 4 :-webkit-any(.a1) { background-color: green } |
5 .a2 :-webkit-any(.b2) { background-color: green } | 5 .a2 :-webkit-any(.b2) { background-color: green } |
6 .a3 :-webkit-any(.b3, .c3) { background-color: green } | 6 .a3 :-webkit-any(.b3, .c3) { background-color: green } |
7 .a4 :-webkit-any(:not(.b4), .c4) { background-color: green } | 7 .a4 :-webkit-any(:not(.b4), .c4) { background-color: green } |
8 :-webkit-any(.a5, .b5) ~ .c5 .d5 { background-color: green } | 8 :-webkit-any(.a5, .b5) ~ .c5 .d5 { background-color: green } |
9 | 9 |
10 </style> | 10 </style> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 t1.className = "a1"; | 66 t1.className = "a1"; |
67 if (window.internals) | 67 if (window.internals) |
68 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); | 68 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); |
69 shouldBe("getComputedStyle(t1, null).backgroundColor", "green"); | 69 shouldBe("getComputedStyle(t1, null).backgroundColor", "green"); |
70 | 70 |
71 document.body.offsetLeft; // force style recalc. | 71 document.body.offsetLeft; // force style recalc. |
72 | 72 |
73 document.getElementById("t2").className = "a2"; | 73 document.getElementById("t2").className = "a2"; |
74 if (window.internals) | 74 if (window.internals) |
75 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); | 75 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); |
76 shouldBe("getComputedStyle(b2, null).backgroundColor", "green"); | 76 shouldBe("getComputedStyle(b2, null).backgroundColor", "green"); |
77 | 77 |
78 document.body.offsetLeft; // force style recalc. | 78 document.body.offsetLeft; // force style recalc. |
79 | 79 |
80 document.getElementById("t3").className = "a3"; | 80 document.getElementById("t3").className = "a3"; |
81 if (window.internals) | 81 if (window.internals) |
82 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); | 82 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2"); |
83 shouldBe("getComputedStyle(b3, null).backgroundColor", "green"); | 83 shouldBe("getComputedStyle(b3, null).backgroundColor", "green"); |
84 shouldBe("getComputedStyle(c3, null).backgroundColor", "green"); | 84 shouldBe("getComputedStyle(c3, null).backgroundColor", "green"); |
85 | 85 |
86 document.body.offsetLeft; // force style recalc. | 86 document.body.offsetLeft; // force style recalc. |
87 | 87 |
88 document.getElementById("t4").className = "a4"; | 88 document.getElementById("t4").className = "a4"; |
89 if (window.internals) | 89 if (window.internals) |
90 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); | 90 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "5"); |
91 shouldBe("getComputedStyle(spans4[0], null).backgroundColor", "green"); | 91 shouldBe("getComputedStyle(spans4[0], null).backgroundColor", "green"); |
92 shouldBe("getComputedStyle(spans4[1], null).backgroundColor", "transparent"); | 92 shouldBe("getComputedStyle(spans4[1], null).backgroundColor", "transparent"); |
93 shouldBe("getComputedStyle(spans4[2], null).backgroundColor", "transparent"); | 93 shouldBe("getComputedStyle(spans4[2], null).backgroundColor", "transparent"); |
94 shouldBe("getComputedStyle(spans4[3], null).backgroundColor", "green"); | 94 shouldBe("getComputedStyle(spans4[3], null).backgroundColor", "green"); |
95 | 95 |
96 document.body.offsetLeft; // force style recalc. | 96 document.body.offsetLeft; // force style recalc. |
97 | 97 |
98 document.getElementById("t5").className = "a5"; | 98 document.getElementById("t5").className = "a5"; |
99 if (window.internals) | 99 if (window.internals) |
100 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "3"); | 100 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); |
101 shouldBe("getComputedStyle(d5, null).backgroundColor", "green"); | 101 shouldBe("getComputedStyle(d5, null).backgroundColor", "green"); |
102 </script> | 102 </script> |
OLD | NEW |