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

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

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/resolver/StyleResolver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/resolver/StyleResolver.cpp
diff --git a/sky/engine/core/css/resolver/StyleResolver.cpp b/sky/engine/core/css/resolver/StyleResolver.cpp
index 5fa2b151319c7bc790f049dc0051b6d6118c1961..8d9e3d28e60f9b34e2b8a5e6b014f91573ab30a3 100644
--- a/sky/engine/core/css/resolver/StyleResolver.cpp
+++ b/sky/engine/core/css/resolver/StyleResolver.cpp
@@ -203,7 +203,6 @@ void StyleResolver::resetRuleFeatures()
{
// Need to recreate RuleFeatureSet.
m_features.clear();
- m_attributeRuleSet.clear();
m_needCollectFeatures = true;
}
@@ -241,17 +240,6 @@ void StyleResolver::resetAuthorStyle(TreeScope& treeScope)
treeScope.clearScopedStyleResolver();
}
-static PassOwnPtr<RuleSet> makeRuleSet(const Vector<RuleFeature>& rules)
-{
- size_t size = rules.size();
- if (!size)
- return nullptr;
- OwnPtr<RuleSet> ruleSet = RuleSet::create();
- for (size_t i = 0; i < size; ++i)
- ruleSet->addRule(rules[i].rule, rules[i].selectorIndex, RuleHasNoSpecialState);
- return ruleSet.release();
-}
-
void StyleResolver::collectFeatures()
{
m_features.clear();
@@ -259,7 +247,6 @@ void StyleResolver::collectFeatures()
document().styleEngine()->collectScopedStyleFeaturesTo(m_features);
- m_attributeRuleSet = makeRuleSet(m_features.attributeRules);
m_needCollectFeatures = false;
}
@@ -449,7 +436,7 @@ PassRefPtr<RenderStyle> StyleResolver::styleForElement(Element* element, RenderS
StyleResolverState state(document(), element, defaultParent);
if (sharingBehavior == AllowStyleSharing && state.parentStyle()) {
- SharedStyleFinder styleFinder(state.elementContext(), m_features, m_attributeRuleSet.get(), *this);
+ SharedStyleFinder styleFinder(state.elementContext(), m_features, *this);
if (RefPtr<RenderStyle> sharedStyle = styleFinder.findSharedStyle())
return sharedStyle.release();
}
« no previous file with comments | « sky/engine/core/css/resolver/StyleResolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698