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

Unified Diff: Source/core/dom/DocumentStyleSheetCollection.cpp

Issue 42543007: StyleResolver should update RuleSets lazily. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: modify Document::styleResolver 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/dom/DocumentStyleSheetCollection.cpp
diff --git a/Source/core/dom/DocumentStyleSheetCollection.cpp b/Source/core/dom/DocumentStyleSheetCollection.cpp
index 01c32420b3026f93db400dd5fb3a402782e1f3aa..cc38e4a74fe61dfd6f9b5fcf2499ec1da4d531ed 100644
--- a/Source/core/dom/DocumentStyleSheetCollection.cpp
+++ b/Source/core/dom/DocumentStyleSheetCollection.cpp
@@ -167,10 +167,11 @@ bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleEngine* collecti
styleResolver->setBuildScopedStyleTreeInDocumentOrder(false);
if (styleResolverUpdateType == Reset) {
resetAllRuleSetsInTreeScope(styleResolver);
- styleResolver->appendAuthorStyleSheets(0, activeCSSStyleSheets);
+ styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleSheets);
+ styleResolver->lazyAppendAuthorStyleSheets(0, activeCSSStyleSheets);
} else {
ASSERT(styleResolverUpdateType == Additive);
- styleResolver->appendAuthorStyleSheets(m_activeAuthorStyleSheets.size(), activeCSSStyleSheets);
+ styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets.size(), activeCSSStyleSheets);
}
}
m_scopingNodesForStyleScoped.didRemoveScopingNodes();

Powered by Google App Engine
This is Rietveld 408576698