OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <style> |
| 4 fieldset:disabled { background-color: green } |
| 5 fieldset + div { color: pink } |
| 6 </style> |
| 7 <fieldset id="fieldset"> |
| 8 <legend></legend> |
| 9 <label for="field"></label> |
| 10 <input type="text" name="field" id="field"> |
| 11 <div> |
| 12 <div></div> |
| 13 <div></div> |
| 14 <div></div> |
| 15 <div></div> |
| 16 </div> |
| 17 </fieldset> |
| 18 <div> |
| 19 <div></div> |
| 20 <div></div> |
| 21 <div></div> |
| 22 <div></div> |
| 23 </div> |
| 24 <script> |
| 25 description("Use descendant invalidation set for :disabled fieldset.") |
| 26 |
| 27 var transparent = "rgba(0, 0, 0, 0)"; |
| 28 var green = "rgb(0, 128, 0)"; |
| 29 |
| 30 shouldBe("getComputedStyle(fieldset, '').backgroundColor", "transparent"); |
| 31 |
| 32 fieldset.offsetTop; // Force recalc. |
| 33 fieldset.disabled = true; |
| 34 |
| 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()", "7"); |
| 39 } |
| 40 |
| 41 shouldBe("getComputedStyle(fieldset, '').backgroundColor", "green"); |
| 42 </script> |
OLD | NEW |