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

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

Issue 660273002: Use style invalidation sets for :-webkit-autofill. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
Patch Set: Created 6 years, 2 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/autofill-pseudo.html
diff --git a/LayoutTests/fast/css/invalidation/autofill-pseudo.html b/LayoutTests/fast/css/invalidation/autofill-pseudo.html
new file mode 100644
index 0000000000000000000000000000000000000000..8f37616c2fc1498cfb718768ba354082445ee8a9
--- /dev/null
+++ b/LayoutTests/fast/css/invalidation/autofill-pseudo.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<script src="../../../resources/js-test.js"></script>
+<style>
+:-webkit-autofill { text-decoration: underline }
+input + div { color: pink }
+</style>
+<input id="text" type="text"></input>
+<div>
+ <div></div>
+ <div></div>
+ <div></div>
+ <div></div>
+</div>
+<script>
+description("Use descendant invalidation set for :-webkit-autofill pseudo class.")
+
+shouldBeDefined(window.internals);
+shouldBe("getComputedStyle(text, '').textDecorationLine", "'none'");
+
+text.offsetTop; // Force recalc.
+
+internals.setAutofilled(text, true);
+
+shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
+shouldBe("getComputedStyle(text, '').textDecorationLine", "'underline'");
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/invalidation/autofill-pseudo-expected.txt » ('j') | Source/core/css/RuleFeature.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698