2 <script src=
"../../../resources/js-test.js"></script>
4 fieldset:disabled { background-color: green }
5 fieldset + div { color: pink }
7 <fieldset id=
"fieldset">
9 <label for=
"field"></label>
10 <input type=
"text" name=
"field" id=
"field">
25 description("Use descendant invalidation set for :disabled fieldset.")
27 var transparent
= "rgba(0, 0, 0, 0)";
28 var green
= "rgb(0, 128, 0)";
30 shouldBe("getComputedStyle(fieldset, '').backgroundColor", "transparent");
32 fieldset
.offsetTop
; // Force recalc.
33 fieldset
.disabled
= true;
35 if (window
.internals
) {
36 // There are still instances of SubtreeStyleChange left when updating
37 // disabled state. This count should become lower.
38 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
41 shouldBe("getComputedStyle(fieldset, '').backgroundColor", "green");