| Index: LayoutTests/fast/css/invalidation/empty-pseudo-sibling.html
|
| diff --git a/LayoutTests/fast/css/invalidation/empty-pseudo-sibling.html b/LayoutTests/fast/css/invalidation/empty-pseudo-sibling.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..c897b4e7056901a38d8ae49d9d452d844c55c7ce
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/invalidation/empty-pseudo-sibling.html
|
| @@ -0,0 +1,45 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/js-test.js"></script>
|
| +<style>
|
| +:empty + div { background-color: green }
|
| +</style>
|
| +<div id="empty"></div>
|
| +<div id="emptySibling">
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| +</div>
|
| +<div id="notEmpty"><div id="child"></div></div>
|
| +<div id="notEmptySibling">
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| +</div>
|
| +<script>
|
| +description("Use descendant invalidation set for :empty pseudo class - sibling invalidation.")
|
| +
|
| +var transparent = "rgba(0, 0, 0, 0)";
|
| +var green = "rgb(0, 128, 0)";
|
| +
|
| +shouldBe("getComputedStyle(emptySibling, '').backgroundColor", "green");
|
| +
|
| +empty.offsetTop; // force recalc
|
| +empty.appendChild(document.createElement("div"));
|
| +
|
| +if (window.internals)
|
| + shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "7");
|
| +
|
| +shouldBe("getComputedStyle(emptySibling, '').backgroundColor", "transparent");
|
| +
|
| +shouldBe("getComputedStyle(notEmptySibling, '').backgroundColor", "transparent");
|
| +
|
| +notEmpty.offsetTop; // force recalc
|
| +notEmpty.removeChild(child);
|
| +
|
| +if (window.internals)
|
| + shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "6");
|
| +
|
| +shouldBe("getComputedStyle(notEmptySibling, '').backgroundColor", "green");
|
| +</script>
|
|
|