Remove dirtyTreeScopes tracking code from StyleEngine.

This code is dead, nothing ever reads m_dirtyTreeScopes.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/812593004
This commit is contained in:
Elliott Sprehn 2014-12-16 18:44:40 -08:00
parent b3400475d5
commit 58d3a54d7b
3 changed files with 0 additions and 35 deletions

View File

@ -2697,8 +2697,6 @@ void Document::removedStyleSheet(CSSStyleSheet* sheet)
// If we're in document teardown, then we don't need this notification of our sheet's removal.
// styleResolverChanged() is needed even when the document is inactive so that
// imported docuements (which is inactive) notifies the change to the master document.
if (isActive())
styleEngine()->modifiedStyleSheet(sheet);
styleResolverChanged();
}
@ -2707,8 +2705,6 @@ void Document::modifiedStyleSheet(CSSStyleSheet* sheet)
// If we're in document teardown, then we don't need this notification of our sheet's removal.
// styleResolverChanged() is needed even when the document is inactive so that
// imported docuements (which is inactive) notifies the change to the master document.
if (isActive())
styleEngine()->modifiedStyleSheet(sheet);
styleResolverChanged();
}

View File

@ -105,21 +105,6 @@ StyleSheetCollection* StyleEngine::styleSheetCollectionFor(TreeScope& treeScope)
return it->value.get();
}
void StyleEngine::modifiedStyleSheet(CSSStyleSheet* sheet)
{
if (!sheet)
return;
Node* node = sheet->ownerNode();
if (!node || !node->inDocument())
return;
TreeScope& treeScope = isHTMLStyleElement(*node) ? node->treeScope() : *m_document;
ASSERT(isHTMLStyleElement(node) || treeScope == m_document);
markTreeScopeDirty(treeScope);
}
void StyleEngine::addStyleSheetCandidateNode(Node* node, bool createdByParser)
{
if (!node->inDocument())
@ -131,7 +116,6 @@ void StyleEngine::addStyleSheetCandidateNode(Node* node, bool createdByParser)
ASSERT(collection);
collection->addStyleSheetCandidateNode(node, createdByParser);
markTreeScopeDirty(treeScope);
if (treeScope != m_document)
m_activeTreeScopes.add(&treeScope);
}
@ -144,7 +128,6 @@ void StyleEngine::removeStyleSheetCandidateNode(Node* node, ContainerNode* scopi
ASSERT(collection);
collection->removeStyleSheetCandidateNode(node, scopingNode);
markTreeScopeDirty(treeScope);
m_activeTreeScopes.remove(&treeScope);
}
@ -170,8 +153,6 @@ void StyleEngine::updateActiveStyleSheets()
treeScopesRemoved.add(treeScope);
}
m_activeTreeScopes.removeAll(treeScopesRemoved);
m_dirtyTreeScopes.clear();
}
void StyleEngine::didRemoveShadowRoot(ShadowRoot* shadowRoot)
@ -267,14 +248,6 @@ void StyleEngine::removeFontFaceRules(const Vector<RawPtr<const StyleRuleFontFac
m_resolver->invalidateMatchedPropertiesCache();
}
void StyleEngine::markTreeScopeDirty(TreeScope& scope)
{
// TODO(esprehn): Make document not special.
if (scope == m_document)
return;
m_dirtyTreeScopes.add(&scope);
}
PassRefPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& text)
{
RefPtr<CSSStyleSheet> styleSheet;

View File

@ -72,7 +72,6 @@ public:
const Vector<RefPtr<CSSStyleSheet>>& activeAuthorStyleSheetsFor(TreeScope&);
void modifiedStyleSheet(CSSStyleSheet*);
void addStyleSheetCandidateNode(Node*, bool createdByParser);
void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode, TreeScope&);
@ -129,8 +128,6 @@ private:
StyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&);
StyleSheetCollection* styleSheetCollectionFor(TreeScope&);
void markTreeScopeDirty(TreeScope&);
void createResolver();
const StyleSheetCollection* documentStyleSheetCollection() const
@ -152,7 +149,6 @@ private:
StyleSheetCollectionMap m_styleSheetCollectionMap;
typedef ListHashSet<TreeScope*, 16> TreeScopeSet;
TreeScopeSet m_dirtyTreeScopes;
TreeScopeSet m_activeTreeScopes;
bool m_ignorePendingStylesheets;