| Index: LayoutTests/fast/css/invalidation/content-attr.html
|
| diff --git a/LayoutTests/fast/css/invalidation/content-attr.html b/LayoutTests/fast/css/invalidation/content-attr.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..19e76b72a51607900d74a7e0d07c352f7622a3ec
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/css/invalidation/content-attr.html
|
| @@ -0,0 +1,41 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/js-test.js"></script>
|
| +<style>
|
| +#before::before, #after::after { content: attr(my-value); }
|
| +</style>
|
| +<div id="before">
|
| + <div></div>
|
| + <div>
|
| + <div></div>
|
| + </div>
|
| +</div>
|
| +<div id="after">
|
| + <div></div>
|
| + <div>
|
| + <div></div>
|
| + </div>
|
| +</div>
|
| +<script>
|
| +description("No subtree recalc when changing attribute used in generated content.");
|
| +
|
| +document.body.offsetTop; // force layout
|
| +
|
| +// Setting attribute neither used in attribute selectors nor content should not
|
| +// cause a recalc.
|
| +
|
| +before.setAttribute("attr-unused", "unused");
|
| +if (window.internals)
|
| + shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0");
|
| +
|
| +document.body.offsetTop; // force layout
|
| +
|
| +before.setAttribute("my-value", "before");
|
| +if (window.internals)
|
| + shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
|
| +
|
| +document.body.offsetTop; // force layout
|
| +
|
| +after.setAttribute("my-value", "after");
|
| +if (window.internals)
|
| + shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
|
| +</script>
|
|
|