2 <script src=
"../../../resources/js-test.js"></script>
4 #before::before, #after::after { content: attr(my-value); }
19 description("No subtree recalc when changing attribute used in generated content.");
21 document
.body
.offsetTop
; // force layout
23 // Setting attribute neither used in attribute selectors nor content should not
26 before
.setAttribute("attr-unused", "unused");
28 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "0");
30 document
.body
.offsetTop
; // force layout
32 before
.setAttribute("my-value", "before");
34 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
36 document
.body
.offsetTop
; // force layout
38 after
.setAttribute("my-value", "after");
40 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");