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

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

Issue 796583002: Use the HashSet of attribute names in SharedStyleFinder. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Use C++11 loops. Created 6 years 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 | « sky/engine/core/css/RuleSet.cpp ('k') | sky/engine/core/css/resolver/SharedStyleFinder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/resolver/SharedStyleFinder.h
diff --git a/sky/engine/core/css/resolver/SharedStyleFinder.h b/sky/engine/core/css/resolver/SharedStyleFinder.h
index 436eb14fbe6e41654e959609046d827628b5533a..6c602019a273a5932ab3721a106a74ebee3e45eb 100644
--- a/sky/engine/core/css/resolver/SharedStyleFinder.h
+++ b/sky/engine/core/css/resolver/SharedStyleFinder.h
@@ -41,11 +41,9 @@ public:
// RuleSets are passed non-const as the act of matching against them can cause them
// to be compacted. :(
SharedStyleFinder(const ElementResolveContext& context,
- const RuleFeatureSet& features,
- RuleSet* attributeRuleSet, StyleResolver& styleResolver)
+ const RuleFeatureSet& features, StyleResolver& styleResolver)
: m_elementAffectedByClassRules(false)
, m_features(features)
- , m_attributeRuleSet(attributeRuleSet)
, m_styleResolver(styleResolver)
, m_context(context)
{ }
@@ -58,20 +56,19 @@ private:
// Only used when we're collecting stats on styles.
bool documentContainsValidCandidate() const;
- bool classNamesAffectedByRules(const SpaceSplitString&) const;
+ bool classNamesAffectedByRules(const Element&) const;
+ bool attributesAffectedByRules(const Element&) const;
bool canShareStyleWithElement(Element& candidate) const;
bool sharingCandidateHasIdenticalStyleAffectingAttributes(Element& candidate) const;
bool sharingCandidateCanShareHostStyles(Element& candidate) const;
bool sharingCandidateDistributedToSameInsertionPoint(Element& candidate) const;
- bool matchesRuleSet(RuleSet*);
Element& element() const { return *m_context.element(); }
Document& document() const { return element().document(); }
bool m_elementAffectedByClassRules;
const RuleFeatureSet& m_features;
- RawPtr<RuleSet> m_attributeRuleSet;
StyleResolver& m_styleResolver;
const ElementResolveContext& m_context;
};
« no previous file with comments | « sky/engine/core/css/RuleSet.cpp ('k') | sky/engine/core/css/resolver/SharedStyleFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698