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

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

Issue 85693009: Get rid of Reset and ResetStyleResolverAndFontSelector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 504b78502509d41b7da274a79b92bbfd7c250fb5..414d1e0161882b6866ca97561d4f9862d8884189 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -189,12 +189,6 @@ void StyleResolver::lazyAppendAuthorStyleSheets(unsigned firstNew, const Vector<
m_pendingStyleSheets.add(styleSheets[i].get());
}
-void StyleResolver::removePendingAuthorStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& styleSheets)
-{
- for (unsigned i = 0; i < styleSheets.size(); ++i)
- m_pendingStyleSheets.remove(styleSheets[i].get());
-}
-
void StyleResolver::appendCSSStyleSheet(CSSStyleSheet* cssSheet)
{
ASSERT(cssSheet);
@@ -244,15 +238,6 @@ void StyleResolver::finishAppendAuthorStyleSheets()
document().styleEngine()->resetCSSFeatureFlags(m_features);
}
-void StyleResolver::resetRuleFeatures()
-{
- // Need to recreate RuleFeatureSet.
- m_features.clear();
- m_siblingRuleSet.clear();
- m_uncommonAttributeRuleSet.clear();
- m_needCollectFeatures = true;
-}
-
void StyleResolver::addTreeBoundaryCrossingRules(const Vector<MinimalRuleData>& rules, ContainerNode* scope)
{
for (unsigned i = 0; i < rules.size(); ++i) {
@@ -281,35 +266,6 @@ void StyleResolver::processScopedRules(const RuleSet& authorRules, const KURL& s
}
}
-void StyleResolver::resetFontSelector()
-{
- ASSERT(m_fontSelector);
- m_fontSelector->unregisterForInvalidationCallbacks(this);
- m_fontSelector->clearDocument();
- invalidateMatchedPropertiesCache();
-
- m_fontSelector = CSSFontSelector::create(&m_document);
- m_fontSelector->registerForInvalidationCallbacks(this);
-}
-
-void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode)
-{
- // FIXME: When chanking scoped attribute, scopingNode's hasScopedHTMLStyleChild has been already modified.
- // So we cannot use hasScopedHTMLStyleChild flag here.
- ScopedStyleResolver* resolver = scopingNode ? m_styleTree.lookupScopedStyleResolverFor(scopingNode) : m_styleTree.scopedStyleResolverForDocument();
- if (!resolver)
- return;
-
- treeBoundaryCrossingRules().reset(scopingNode);
-
- resolver->resetAuthorStyle();
- resetRuleFeatures();
- if (!scopingNode)
- return;
-
- m_styleTree.remove(scopingNode);
-}
-
static PassOwnPtr<RuleSet> makeRuleSet(const Vector<RuleFeature>& rules)
{
size_t size = rules.size();

Powered by Google App Engine
This is Rietveld 408576698