Index: Source/core/dom/StyleEngine.cpp |
diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp |
index 3943305ebf108caf542c031dac82ced750bf351c..65ed280169245b6df8811c6e0c8bccecdd1dbd00 100644 |
--- a/Source/core/dom/StyleEngine.cpp |
+++ b/Source/core/dom/StyleEngine.cpp |
@@ -143,9 +143,9 @@ TreeScopeStyleSheetCollection* StyleEngine::ensureStyleSheetCollectionFor(TreeSc |
if (treeScope == m_document) |
return &m_documentStyleSheetCollection; |
- HashMap<TreeScope*, OwnPtr<TreeScopeStyleSheetCollection> >::AddResult result = m_styleSheetCollectionMap.add(&treeScope, nullptr); |
+ WillBeHeapHashMap<TreeScope*, OwnPtrWillBeMember<ShadowTreeStyleSheetCollection> >::AddResult result = m_styleSheetCollectionMap.add(&treeScope, nullptr); |
if (result.isNewEntry) |
- result.storedValue->value = adoptPtr(new ShadowTreeStyleSheetCollection(toShadowRoot(treeScope))); |
+ result.storedValue->value = adoptPtrWillBeNoop(new ShadowTreeStyleSheetCollection(toShadowRoot(treeScope))); |
return result.storedValue->value.get(); |
} |
@@ -154,7 +154,7 @@ TreeScopeStyleSheetCollection* StyleEngine::styleSheetCollectionFor(TreeScope& t |
if (treeScope == m_document) |
return &m_documentStyleSheetCollection; |
- HashMap<TreeScope*, OwnPtr<TreeScopeStyleSheetCollection> >::iterator it = m_styleSheetCollectionMap.find(&treeScope); |
+ WillBeHeapHashMap<TreeScope*, OwnPtrWillBeMember<ShadowTreeStyleSheetCollection> >::iterator it = m_styleSheetCollectionMap.find(&treeScope); |
if (it == m_styleSheetCollectionMap.end()) |
return 0; |
return it->value.get(); |
@@ -562,9 +562,9 @@ void StyleEngine::markDocumentDirty() |
m_document.import()->master()->styleEngine()->markDocumentDirty(); |
} |
-PassRefPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& text, TextPosition startPosition, bool createdByParser) |
+PassRefPtrWillBeRawPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& text, TextPosition startPosition, bool createdByParser) |
{ |
- RefPtr<CSSStyleSheet> styleSheet; |
+ RefPtrWillBeRawPtr<CSSStyleSheet> styleSheet; |
e->document().styleEngine()->addPendingSheet(); |
@@ -593,9 +593,9 @@ PassRefPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& tex |
return styleSheet; |
} |
-PassRefPtr<CSSStyleSheet> StyleEngine::parseSheet(Element* e, const String& text, TextPosition startPosition, bool createdByParser) |
+PassRefPtrWillBeRawPtr<CSSStyleSheet> StyleEngine::parseSheet(Element* e, const String& text, TextPosition startPosition, bool createdByParser) |
{ |
- RefPtr<CSSStyleSheet> styleSheet; |
+ RefPtrWillBeRawPtr<CSSStyleSheet> styleSheet; |
styleSheet = CSSStyleSheet::createInline(e, KURL(), startPosition, e->document().inputEncoding()); |
styleSheet->contents()->parseStringAtPosition(text, startPosition, createdByParser); |
return styleSheet; |
@@ -615,6 +615,8 @@ void StyleEngine::trace(Visitor* visitor) |
{ |
visitor->trace(m_injectedAuthorStyleSheets); |
visitor->trace(m_authorStyleSheets); |
+ visitor->trace(m_documentStyleSheetCollection); |
+ visitor->trace(m_styleSheetCollectionMap); |
} |
} |