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

Unified Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html

Issue 2700943003: Invalidate custom pseudo elements for RuleSet invalidations. (Closed)
Patch Set: Created 3 years, 10 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 | third_party/WebKit/Source/core/css/RuleFeature.h » ('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/sheet-ruleset-invalidation.html
diff --git a/third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html b/third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html
index d513ff27d29d9da3dd2c5aa4918d3c1c7578b5b8..a3afa858611566e6b1e3bd71c83ea75a675e312a 100644
--- a/third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html
+++ b/third_party/WebKit/LayoutTests/fast/css/invalidation/sheet-ruleset-invalidation.html
@@ -13,6 +13,10 @@
</div>
<span></span>
</div>
+<div id="placeholderWrapper">
+ <textarea placeholder="Placeholder text"></textarea>
+</div>
+<textarea placeholder="Placeholder text"></textarea>
<script>
test(() => {
assert_true(!!window.internals, "Tests require window.internals.");
@@ -43,4 +47,22 @@
"#found div { background: red }"), 1,
"Check that only one of the divs is recalculated.");
}, "A type selector scoped by a known id should only invalidate descendants of the element with that id.");
+
+ test(() => {
+ assert_equals(applyRuleAndReturnAffectedElementCount(
+ "::-webkit-input-placeholder { background: green }"), 2,
+ "Check that only custom pseudo elements are recalculated.");
+ }, "A style rule with a custom pseudo element should only invalidate custom pseudo elements.");
+
+ test(() => {
+ assert_equals(applyRuleAndReturnAffectedElementCount(
+ "#notfound ::-webkit-input-placeholder { background: green }"), 0,
+ "Check that no elements are recalculated.");
+ }, "A custom pseudo element scoped in an unknown id should not invalidate any elements.");
+
+ test(() => {
+ assert_equals(applyRuleAndReturnAffectedElementCount(
+ "#placeholderWrapper ::-webkit-input-placeholder { background: green }"), 1,
+ "Check that only the scoped custom pseudo element is recalculated.");
+ }, "A custom pseudo element scoped in a known id should only invalidate descendants of the element with that id.");
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/RuleFeature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698