diff --git a/engine/core/dom/Document.cpp b/engine/core/dom/Document.cpp index 31801212848..d4284fd180d 100644 --- a/engine/core/dom/Document.cpp +++ b/engine/core/dom/Document.cpp @@ -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(); } diff --git a/engine/core/dom/StyleEngine.cpp b/engine/core/dom/StyleEngine.cpp index 4d84959b30c..7c98b0581b4 100644 --- a/engine/core/dom/StyleEngine.cpp +++ b/engine/core/dom/StyleEngine.cpp @@ -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 VectorinvalidateMatchedPropertiesCache(); } -void StyleEngine::markTreeScopeDirty(TreeScope& scope) -{ - // TODO(esprehn): Make document not special. - if (scope == m_document) - return; - m_dirtyTreeScopes.add(&scope); -} - PassRefPtr StyleEngine::createSheet(Element* e, const String& text) { RefPtr styleSheet; diff --git a/engine/core/dom/StyleEngine.h b/engine/core/dom/StyleEngine.h index 24aef6d5067..88a47e8173e 100644 --- a/engine/core/dom/StyleEngine.h +++ b/engine/core/dom/StyleEngine.h @@ -72,7 +72,6 @@ public: const Vector>& 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 TreeScopeSet; - TreeScopeSet m_dirtyTreeScopes; TreeScopeSet m_activeTreeScopes; bool m_ignorePendingStylesheets;