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

Unified Diff: sky/engine/core/css/resolver/SharedStyleFinder.cpp

Issue 837883002: Store features in the ScopedStyleResoolver. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Simpler even. Created 5 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
Index: sky/engine/core/css/resolver/SharedStyleFinder.cpp
diff --git a/sky/engine/core/css/resolver/SharedStyleFinder.cpp b/sky/engine/core/css/resolver/SharedStyleFinder.cpp
index 67f52705bbae67b23aa140ac6d1418c6432d2107..2a8be59c2fd3a0846a095c375250aaf0f5dbe1a6 100644
--- a/sky/engine/core/css/resolver/SharedStyleFinder.cpp
+++ b/sky/engine/core/css/resolver/SharedStyleFinder.cpp
@@ -53,7 +53,7 @@ bool SharedStyleFinder::classNamesAffectedByRules(const Element& element) const
const SpaceSplitString& classNames = element.classNames();
unsigned count = classNames.size();
for (unsigned i = 0; i < count; ++i) {
- if (m_features.hasSelectorForClass(classNames[i]))
+ if (element.affectedByClassSelector(classNames[i]))
return true;
}
return false;
@@ -62,7 +62,7 @@ bool SharedStyleFinder::classNamesAffectedByRules(const Element& element) const
bool SharedStyleFinder::attributesAffectedByRules(const Element& element) const
{
for (auto& attribute : element.attributesWithoutUpdate()) {
- if (m_features.hasSelectorForAttribute(attribute.localName()))
+ if (element.affectedByAttributeSelector(attribute.localName()))
return true;
}
return false;

Powered by Google App Engine
This is Rietveld 408576698