Index: LayoutTests/fast/css/invalidation/targeted-class-any-pseudo.html |
diff --git a/LayoutTests/fast/css/invalidation/targeted-class-any-pseudo.html b/LayoutTests/fast/css/invalidation/targeted-class-any-pseudo.html |
index d55d2a1362f3e1099ca37861d1a9d06f6ce0ffdf..b04e222439f47129a88c096cfaa2a68999bed0a3 100644 |
--- a/LayoutTests/fast/css/invalidation/targeted-class-any-pseudo.html |
+++ b/LayoutTests/fast/css/invalidation/targeted-class-any-pseudo.html |
@@ -5,6 +5,8 @@ |
.a2 :-webkit-any(.b2) { background-color: green } |
.a3 :-webkit-any(.b3, .c3) { background-color: green } |
.a4 :-webkit-any(:not(.b4), .c4) { background-color: green } |
+:-webkit-any(.a5, .b5) ~ .c5 .d5 { background-color: green } |
+ |
</style> |
<div id="t1"> |
<span></span> |
@@ -30,6 +32,12 @@ |
<span class="b4"></span> |
<span class="c4"></span> |
</div> |
+<div> |
+ <span id="t5"></span> |
+ <span class="c5"> |
+ <span class="d5"></span> |
+ </span> |
+</div> |
<script> |
description("Check that targeted class invalidation works with :-webkit-any selectors."); |
@@ -41,6 +49,7 @@ var b2 = document.querySelector("#t2 .b2"); |
var b3 = document.querySelector("#t3 .b3"); |
var c3 = document.querySelector("#t3 .c3"); |
var spans4 = document.querySelectorAll("#t4 span"); |
+var d5 = document.querySelector("#t5 ~ .c5 .d5"); |
shouldBe("getComputedStyle(t1, null).backgroundColor", "transparent"); |
shouldBe("getComputedStyle(b2, null).backgroundColor", "transparent"); |
@@ -50,6 +59,8 @@ shouldBe("getComputedStyle(c3, null).backgroundColor", "transparent"); |
for (var i=0; i<4; i++) |
shouldBe("getComputedStyle(spans4[i], null).backgroundColor", "transparent"); |
+shouldBe("getComputedStyle(d5, null).backgroundColor", "transparent"); |
+ |
document.body.offsetLeft; // force style recalc. |
t1.className = "a1"; |
@@ -81,4 +92,11 @@ shouldBe("getComputedStyle(spans4[0], null).backgroundColor", "green"); |
shouldBe("getComputedStyle(spans4[1], null).backgroundColor", "transparent"); |
shouldBe("getComputedStyle(spans4[2], null).backgroundColor", "transparent"); |
shouldBe("getComputedStyle(spans4[3], null).backgroundColor", "green"); |
+ |
+document.body.offsetLeft; // force style recalc. |
+ |
+document.getElementById("t5").className = "a5"; |
+if (window.internals) |
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1"); |
+shouldBe("getComputedStyle(d5, null).backgroundColor", "green"); |
</script> |