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

Unified Diff: sky/engine/core/dom/StyleEngine.cpp

Issue 812593004: Remove dirtyTreeScopes tracking code from StyleEngine. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/dom/StyleEngine.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/dom/StyleEngine.cpp
diff --git a/sky/engine/core/dom/StyleEngine.cpp b/sky/engine/core/dom/StyleEngine.cpp
index 4d84959b30c9134289f81f3f49f4992d9d864ed4..7c98b0581b423e2d76add70293ad21756b30db5a 100644
--- a/sky/engine/core/dom/StyleEngine.cpp
+++ b/sky/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 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;
« no previous file with comments | « sky/engine/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698