Index: LayoutTests/fast/css/invalidation/fieldset-disabled.html |
diff --git a/LayoutTests/fast/css/invalidation/fieldset-disabled.html b/LayoutTests/fast/css/invalidation/fieldset-disabled.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..37ea2e404635ebad7ae568b2dcea2b39ec33756c |
--- /dev/null |
+++ b/LayoutTests/fast/css/invalidation/fieldset-disabled.html |
@@ -0,0 +1,42 @@ |
+<!DOCTYPE html> |
+<script src="../../../resources/js-test.js"></script> |
+<style> |
+fieldset:disabled { background-color: green } |
+fieldset + div { color: pink } |
+</style> |
+<fieldset id="fieldset"> |
+ <legend></legend> |
+ <label for="field"></label> |
+ <input type="text" name="field" id="field"> |
+ <div> |
+ <div></div> |
+ <div></div> |
+ <div></div> |
+ <div></div> |
+ </div> |
+</fieldset> |
+<div> |
+ <div></div> |
+ <div></div> |
+ <div></div> |
+ <div></div> |
+</div> |
+<script> |
+description("Use descendant invalidation set for :disabled fieldset.") |
+ |
+var transparent = "rgba(0, 0, 0, 0)"; |
+var green = "rgb(0, 128, 0)"; |
+ |
+shouldBe("getComputedStyle(fieldset, '').backgroundColor", "transparent"); |
+ |
+fieldset.offsetTop; // Force recalc. |
+fieldset.disabled = true; |
+ |
+if (window.internals) { |
+ // There are still instances of SubtreeStyleChange left when updating |
+ // disabled state. This count should become lower. |
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "7"); |
+} |
+ |
+shouldBe("getComputedStyle(fieldset, '').backgroundColor", "green"); |
+</script> |