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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/range-pseudo.html

Issue 1469183003: Use invalidation sets for :in-range and :out-of-range. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review issue and expected results Created 5 years, 1 month 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 | third_party/WebKit/LayoutTests/fast/css/invalidation/range-pseudo-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/css/invalidation/range-pseudo.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/range-pseudo.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/range-pseudo.html
new file mode 100644
index 0000000000000000000000000000000000000000..9c1a0f675fc97c2a675826043b47baf661af56b1
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/range-pseudo.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+:out-of-range {
+ background-color: red
+}
+
+:in-range, :in-range + div #descendant {
+ background-color: green
+}
+
+</style>
+<input id="input" type="number" min="1" max="10" value="17"></input>
+<div>
+ <div></div>
+ <div id="descendant"></div>
+ <div></div>
+</div>
+
+<script>
+description("Use descendant invalidation sets for :in-range and :out-of-range pseudo classes.")
+
+var transparent = "rgba(0, 0, 0, 0)";
+var red = "rgb(255, 0, 0)";
+var green = "rgb(0, 128, 0)";
+
+shouldBe("getComputedStyle(input).backgroundColor", "red");
+shouldBe("getComputedStyle(descendant).backgroundColor", "transparent");
+
+document.body.offsetTop; // Force recalc.
+input.value = "5";
+
+if (window.internals)
+ shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "2");
+shouldBe("getComputedStyle(input).backgroundColor", "green");
+shouldBe("getComputedStyle(descendant).backgroundColor", "green");
+
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/range-pseudo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698