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

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

Issue 180003002: Consistently use on-heap collections for StyleRuleBase descendants. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: addressed reviewers comments Created 6 years, 10 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: Source/core/dom/TreeScopeStyleSheetCollection.cpp
diff --git a/Source/core/dom/TreeScopeStyleSheetCollection.cpp b/Source/core/dom/TreeScopeStyleSheetCollection.cpp
index ea7eef7709c80b88fa40a953614228201983e27e..0f66be41ea3c24c0e41a30495d6fb1445e1ddd86 100644
--- a/Source/core/dom/TreeScopeStyleSheetCollection.cpp
+++ b/Source/core/dom/TreeScopeStyleSheetCollection.cpp
@@ -75,7 +75,7 @@ void TreeScopeStyleSheetCollection::removeStyleSheetCandidateNode(Node* node, Co
m_scopingNodesForStyleScoped.remove(scopingNode);
}
-TreeScopeStyleSheetCollection::StyleResolverUpdateType TreeScopeStyleSheetCollection::compareStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets, Vector<StyleSheetContents*>& addedSheets)
+TreeScopeStyleSheetCollection::StyleResolverUpdateType TreeScopeStyleSheetCollection::compareStyleSheets(const Vector<RefPtr<CSSStyleSheet> >& oldStyleSheets, const Vector<RefPtr<CSSStyleSheet> >& newStylesheets, WillBeHeapVector<RawPtrWillBeMember<StyleSheetContents> >& addedSheets)
{
unsigned newStyleSheetCount = newStylesheets.size();
unsigned oldStyleSheetCount = oldStyleSheets.size();
@@ -121,7 +121,7 @@ bool TreeScopeStyleSheetCollection::activeLoadingStyleSheetLoaded(const Vector<R
return false;
}
-static bool findFontFaceRulesFromStyleSheetContents(Vector<StyleSheetContents*> sheets, Vector<const StyleRuleFontFace*>& fontFaceRules)
+static bool findFontFaceRulesFromStyleSheetContents(const WillBeHeapVector<RawPtrWillBeMember<StyleSheetContents> >& sheets, WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFontFace> >& fontFaceRules)
{
bool hasFontFaceRule = false;
@@ -145,7 +145,7 @@ void TreeScopeStyleSheetCollection::analyzeStyleSheetChange(StyleResolverUpdateM
return;
// Find out which stylesheets are new.
- Vector<StyleSheetContents*> addedSheets;
+ WillBeHeapVector<RawPtrWillBeMember<StyleSheetContents> > addedSheets;
if (m_activeAuthorStyleSheets.size() <= newCollection.activeAuthorStyleSheets().size()) {
change.styleResolverUpdateType = compareStyleSheets(m_activeAuthorStyleSheets, newCollection.activeAuthorStyleSheets(), addedSheets);
} else {

Powered by Google App Engine
This is Rietveld 408576698