| Index: LayoutTests/fast/css/invalidation/target-pseudo.html
|
| diff --git a/LayoutTests/fast/css/invalidation/target-pseudo.html b/LayoutTests/fast/css/invalidation/target-pseudo.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..25afebae85e15c00879624f2497dd41b833e834f
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/invalidation/target-pseudo.html
|
| @@ -0,0 +1,39 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/js-test.js"></script>
|
| +<style>
|
| +:target #match { background-color: green }
|
| +#target + div { color: pink }
|
| +</style>
|
| +<div id="target">
|
| + <div></div>
|
| + <div></div>
|
| + <div>
|
| + <div></div>
|
| + <div id="match"></div>
|
| + </div>
|
| + <div></div>
|
| +</div>
|
| +<div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| + <div></div>
|
| +</div>
|
| +<script>
|
| +description("Use descendant invalidation set for :target pseudo class.")
|
| +
|
| +var transparent = "rgba(0, 0, 0, 0)";
|
| +var green = "rgb(0, 128, 0)";
|
| +
|
| +shouldBe("getComputedStyle(match, '').backgroundColor", "transparent");
|
| +
|
| +target.offsetTop; // Force recalc.
|
| +
|
| +document.location.hash = "#target";
|
| +
|
| +// Should have checked that internals.updateStyleAndReturnAffectedElementCount()
|
| +// equals 2 here, but the target style is updated synchronously from where the
|
| +// target is set.
|
| +
|
| +shouldBe("getComputedStyle(match, '').backgroundColor", "green");
|
| +</script>
|
|
|