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

Unified Diff: third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp

Issue 2096653004: Avoid stack allocating StyleSheetCollections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp
diff --git a/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp b/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp
index d1a185bbf8b3af07f744df0a7516d64a3bb4c7c7..55166cf4cc353572ad20661e2b2c0a08da67ca0a 100644
--- a/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp
+++ b/third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.cpp
@@ -113,9 +113,9 @@ static bool findFontFaceRulesFromStyleSheetContents(const HeapVector<Member<Styl
return hasFontFaceRule;
}
-void TreeScopeStyleSheetCollection::analyzeStyleSheetChange(StyleResolverUpdateMode updateMode, const StyleSheetCollection& newCollection, StyleSheetChange& change)
+void TreeScopeStyleSheetCollection::analyzeStyleSheetChange(StyleResolverUpdateMode updateMode, const HeapVector<Member<CSSStyleSheet>>& newActiveAuthorStyleSheets, StyleSheetChange& change)
{
- if (activeLoadingStyleSheetLoaded(newCollection.activeAuthorStyleSheets()))
+ if (activeLoadingStyleSheetLoaded(newActiveAuthorStyleSheets))
return;
if (updateMode != AnalyzedStyleUpdate)
@@ -123,10 +123,10 @@ void TreeScopeStyleSheetCollection::analyzeStyleSheetChange(StyleResolverUpdateM
// Find out which stylesheets are new.
HeapVector<Member<StyleSheetContents>> addedSheets;
- if (m_activeAuthorStyleSheets.size() <= newCollection.activeAuthorStyleSheets().size()) {
- change.styleResolverUpdateType = compareStyleSheets(m_activeAuthorStyleSheets, newCollection.activeAuthorStyleSheets(), addedSheets);
+ if (m_activeAuthorStyleSheets.size() <= newActiveAuthorStyleSheets.size()) {
+ change.styleResolverUpdateType = compareStyleSheets(m_activeAuthorStyleSheets, newActiveAuthorStyleSheets, addedSheets);
} else {
- StyleResolverUpdateType updateType = compareStyleSheets(newCollection.activeAuthorStyleSheets(), m_activeAuthorStyleSheets, addedSheets);
+ StyleResolverUpdateType updateType = compareStyleSheets(newActiveAuthorStyleSheets, m_activeAuthorStyleSheets, addedSheets);
if (updateType != Additive) {
change.styleResolverUpdateType = updateType;
} else {
« no previous file with comments | « third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698