| Index: Source/core/dom/StyleEngine.cpp
|
| diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp
|
| index 3ddc6cebdb07b5fa0279d56c0e71c8cb7606936c..16899c6e70498422bc92b6c3986e5df9753b9925 100644
|
| --- a/Source/core/dom/StyleEngine.cpp
|
| +++ b/Source/core/dom/StyleEngine.cpp
|
| @@ -91,8 +91,10 @@ void StyleEngine::detachFromDocument()
|
|
|
| if (m_fontSelector) {
|
| m_fontSelector->clearDocument();
|
| +#if !ENABLE(OILPAN)
|
| if (m_resolver)
|
| m_fontSelector->unregisterForInvalidationCallbacks(m_resolver.get());
|
| +#endif
|
| }
|
|
|
| // Decrement reference counts for things we could be keeping alive.
|
| @@ -448,7 +450,7 @@ void StyleEngine::createResolver()
|
| ASSERT(m_document.frame());
|
| ASSERT(m_fontSelector);
|
|
|
| - m_resolver = adoptPtr(new StyleResolver(m_document));
|
| + m_resolver = adoptPtrWillBeNoop(new StyleResolver(m_document));
|
| appendActiveAuthorStyleSheets();
|
| m_fontSelector->registerForInvalidationCallbacks(m_resolver.get());
|
| combineCSSFeatureFlags(m_resolver->ensureUpdatedRuleFeatureSet());
|
| @@ -461,7 +463,9 @@ void StyleEngine::clearResolver()
|
| ASSERT(m_fontSelector || !m_resolver);
|
| if (m_resolver) {
|
| m_document.updateStyleInvalidationIfNeeded();
|
| +#if !ENABLE(OILPAN)
|
| m_fontSelector->unregisterForInvalidationCallbacks(m_resolver.get());
|
| +#endif
|
| }
|
| m_resolver.clear();
|
| }
|
| @@ -586,7 +590,7 @@ PassRefPtrWillBeRawPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const
|
| if (!e->document().inQuirksMode()) {
|
| AtomicString textContent(text);
|
|
|
| - HashMap<AtomicString, StyleSheetContents*>::AddResult result = m_textToSheetCache.add(textContent, 0);
|
| + WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents> >::AddResult result = m_textToSheetCache.add(textContent, nullptr);
|
| if (result.isNewEntry || !result.storedValue->value) {
|
| styleSheet = StyleEngine::parseSheet(e, text, startPosition, createdByParser);
|
| if (result.isNewEntry && isCacheableForStyleElement(*styleSheet->contents())) {
|
| @@ -620,7 +624,7 @@ PassRefPtrWillBeRawPtr<CSSStyleSheet> StyleEngine::parseSheet(Element* e, const
|
|
|
| void StyleEngine::removeSheet(StyleSheetContents* contents)
|
| {
|
| - HashMap<StyleSheetContents*, AtomicString>::iterator it = m_sheetToTextCache.find(contents);
|
| + WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString>::iterator it = m_sheetToTextCache.find(contents);
|
| if (it == m_sheetToTextCache.end())
|
| return;
|
|
|
| @@ -634,6 +638,9 @@ void StyleEngine::trace(Visitor* visitor)
|
| visitor->trace(m_authorStyleSheets);
|
| visitor->trace(m_documentStyleSheetCollection);
|
| visitor->trace(m_styleSheetCollectionMap);
|
| + visitor->trace(m_resolver);
|
| + visitor->trace(m_textToSheetCache);
|
| + visitor->trace(m_sheetToTextCache);
|
| }
|
|
|
| }
|
|
|