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

Unified Diff: LayoutTests/fast/css/invalidation/checked-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
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/checked-pseudo-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/invalidation/checked-pseudo.html
diff --git a/LayoutTests/fast/css/invalidation/checked-pseudo.html b/LayoutTests/fast/css/invalidation/checked-pseudo.html
new file mode 100644
index 0000000000000000000000000000000000000000..7ff41448a6bd303ed34c3ffd65984a2e114a5f5a
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/checked-pseudo.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+:checked { background-color: green }
+input + div { color: pink }
+</style>
+<input id="checkbox" type="checkbox"></input>
+<div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+</div>
+<script>
+description("Use descendant invalidation set for :checked pseudo class.")
+
+var transparent = "rgba(0, 0, 0, 0)";
+var green = "rgb(0, 128, 0)";
+
+shouldBe("getComputedStyle(checkbox, '').backgroundColor", "transparent");
+
+checkbox.offsetTop; // Force recalc.
+
+checkbox.checked = true;
+
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
+
+shouldBe("getComputedStyle(checkbox, '').backgroundColor", "green");
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/checked-pseudo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698