Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: LayoutTests/fast/css/invalidation/disabled-pseudo.html

Issue 540533004: Use style invalidation for more pseudo classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/css/invalidation/disabled-pseudo.html
diff --git a/LayoutTests/fast/css/invalidation/disabled-pseudo.html b/LayoutTests/fast/css/invalidation/disabled-pseudo.html
new file mode 100644
index 0000000000000000000000000000000000000000..f5b12e7afe9f3a3ea880143b8ed0f10bb9f79e25
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/disabled-pseudo.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+input { background: transparent }
+:disabled { background-color: green }
+input + div { color: pink }
+</style>
+<input id="button" type="button"></input>
+<div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+</div>
+<script>
+description("Use descendant invalidation set for :disabled pseudo class.")
+
+var transparent = "rgba(0, 0, 0, 0)";
+var green = "rgb(0, 128, 0)";
+
+shouldBe("getComputedStyle(button, '').backgroundColor", "transparent");
+
+button.offsetTop; // Force recalc.
+
+button.disabled = true;
+
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
+
+shouldBe("getComputedStyle(button, '').backgroundColor", "green");
+</script>

Powered by Google App Engine
This is Rietveld 408576698