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

Unified Diff: Source/core/css/RuleFeature.cpp

Issue 565493002: Use invalidation set for :empty pseudo changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@empty-flag-20140910
Patch Set: 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 | « LayoutTests/fast/css/invalidation/empty-pseudo-sibling-expected.txt ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/RuleFeature.cpp
diff --git a/Source/core/css/RuleFeature.cpp b/Source/core/css/RuleFeature.cpp
index 23e821930aa27db742e350dcc2bac6983686346a..84e130f4fae6a40e7a62d0723e2d41685e0c8751 100644
--- a/Source/core/css/RuleFeature.cpp
+++ b/Source/core/css/RuleFeature.cpp
@@ -212,9 +212,15 @@ DescendantInvalidationSet* RuleFeatureSet::invalidationSetForSelector(const CSSS
if (selector.match() == CSSSelector::Id)
return &ensureIdInvalidationSet(selector.value());
if (selector.match() == CSSSelector::PseudoClass) {
- CSSSelector::PseudoType pseudo = selector.pseudoType();
- if (pseudo == CSSSelector::PseudoHover || pseudo == CSSSelector::PseudoActive || pseudo == CSSSelector::PseudoFocus)
- return &ensurePseudoInvalidationSet(pseudo);
+ switch (selector.pseudoType()) {
+ case CSSSelector::PseudoEmpty:
+ case CSSSelector::PseudoHover:
+ case CSSSelector::PseudoActive:
+ case CSSSelector::PseudoFocus:
+ return &ensurePseudoInvalidationSet(selector.pseudoType());
+ default:
+ break;
+ }
}
return 0;
}
« no previous file with comments | « LayoutTests/fast/css/invalidation/empty-pseudo-sibling-expected.txt ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698