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

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

Issue 837883002: Store features in the ScopedStyleResoolver. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Simpler even. Created 5 years, 11 months 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: sky/engine/core/dom/StyleEngine.cpp
diff --git a/sky/engine/core/dom/StyleEngine.cpp b/sky/engine/core/dom/StyleEngine.cpp
index 0d0719a11bf76a12b4b64181a72fced781730cb1..2836d3fcfbddd3823836ff21aa10e9761ca4452a 100644
--- a/sky/engine/core/dom/StyleEngine.cpp
+++ b/sky/engine/core/dom/StyleEngine.cpp
@@ -204,23 +204,6 @@ void StyleEngine::removeSheet(StyleSheetContents* contents)
m_sheetToTextCache.remove(contents);
}
-// TODO(esprehn): This walks the entire document to collect features, instead
-// we should store features per scope and get rid of the global set.
-static void collectFeatures(TreeScope& scope, RuleFeatureSet& features, HashSet<const StyleSheetContents*> visitedSharedStyleSheetContents)
-{
- scope.scopedStyleResolver().collectFeaturesTo(features, visitedSharedStyleSheetContents);
- for (Element* element = ElementTraversal::firstWithin(scope.rootNode()); element; element = ElementTraversal::next(*element, &scope.rootNode())) {
- if (ShadowRoot* root = element->shadowRoot())
- collectFeatures(*root, features, visitedSharedStyleSheetContents);
- }
-}
-
-void StyleEngine::collectScopedStyleFeaturesTo(RuleFeatureSet& features) const
-{
- HashSet<const StyleSheetContents*> visitedSharedStyleSheetContents;
- collectFeatures(*m_document, features, visitedSharedStyleSheetContents);
-}
-
void StyleEngine::fontsNeedUpdate(CSSFontSelector*)
{
if (m_resolver)

Powered by Google App Engine
This is Rietveld 408576698