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

Unified Diff: Source/core/css/resolver/SharedStyleFinder.cpp

Issue 143653010: Refactor RuleFeatureSet to simplify iteration over CSS Selectors when collecting data. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged. Created 6 years, 11 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 | « Source/core/css/RuleFeature.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/SharedStyleFinder.cpp
diff --git a/Source/core/css/resolver/SharedStyleFinder.cpp b/Source/core/css/resolver/SharedStyleFinder.cpp
index 92890d6c3af2feb711a6a4dcab21abb536db0a2c..b4aa9a467e3ea39d7f645865a23e6ed4d839b09c 100644
--- a/Source/core/css/resolver/SharedStyleFinder.cpp
+++ b/Source/core/css/resolver/SharedStyleFinder.cpp
@@ -100,7 +100,7 @@ bool SharedStyleFinder::classNamesAffectedByRules(const SpaceSplitString& classN
{
unsigned count = classNames.size();
for (unsigned i = 0; i < count; ++i) {
- if (m_features.classesInRules.contains(classNames[i]))
+ if (m_features.hasSelectorForClass(classNames[i]))
return true;
}
return false;
@@ -195,7 +195,7 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const
return false;
if (candidate.additionalPresentationAttributeStyle() != element().additionalPresentationAttributeStyle())
return false;
- if (candidate.hasID() && m_features.idsInRules.contains(candidate.idForStyleResolution()))
+ if (candidate.hasID() && m_features.hasSelectorForId(candidate.idForStyleResolution()))
return false;
if (candidate.hasScopedHTMLStyleChild())
return false;
@@ -229,7 +229,7 @@ bool SharedStyleFinder::canShareStyleWithElement(Element& candidate) const
return false;
if (parent->isSVGElement() && toSVGElement(parent)->animatedSMILStyleProperties())
return false;
- if (parent->hasID() && m_features.idsInRules.contains(parent->idForStyleResolution()))
+ if (parent->hasID() && m_features.hasSelectorForId(parent->idForStyleResolution()))
return false;
if (!parent->childrenSupportStyleSharing())
return false;
« no previous file with comments | « Source/core/css/RuleFeature.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698