| Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| index 6e10d0a669856f096c4619b06d57cf270511920e..f97960b802970f500b5e61641e547a5d53fe9ac9 100644
|
| --- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| @@ -116,7 +116,7 @@ TreeScopeStyleSheetCollection* StyleEngine::ensureStyleSheetCollectionFor(TreeSc
|
|
|
| StyleSheetCollectionMap::AddResult result = m_styleSheetCollectionMap.add(&treeScope, nullptr);
|
| if (result.isNewEntry)
|
| - result.storedValue->value = adoptPtrWillBeNoop(new ShadowTreeStyleSheetCollection(toShadowRoot(treeScope)));
|
| + result.storedValue->value = new ShadowTreeStyleSheetCollection(toShadowRoot(treeScope));
|
| return result.storedValue->value.get();
|
| }
|
|
|
| @@ -131,7 +131,7 @@ TreeScopeStyleSheetCollection* StyleEngine::styleSheetCollectionFor(TreeScope& t
|
| return it->value.get();
|
| }
|
|
|
| -const WillBeHeapVector<RefPtrWillBeMember<StyleSheet>>& StyleEngine::styleSheetsForStyleSheetList(TreeScope& treeScope)
|
| +const HeapVector<Member<StyleSheet>>& StyleEngine::styleSheetsForStyleSheetList(TreeScope& treeScope)
|
| {
|
| if (treeScope == m_document)
|
| return documentStyleSheetCollection()->styleSheetsForStyleSheetList();
|
| @@ -147,7 +147,7 @@ void StyleEngine::resetCSSFeatureFlags(const RuleFeatureSet& features)
|
| m_maxDirectAdjacentSelectors = features.maxDirectAdjacentSelectors();
|
| }
|
|
|
| -void StyleEngine::injectAuthorSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> authorSheet)
|
| +void StyleEngine::injectAuthorSheet(RawPtr<StyleSheetContents> authorSheet)
|
| {
|
| m_injectedAuthorStyleSheets.append(CSSStyleSheet::create(authorSheet, m_document));
|
| markDocumentDirty();
|
| @@ -279,7 +279,7 @@ void StyleEngine::clearMediaQueryRuleSetStyleSheets()
|
| void StyleEngine::updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector)
|
| {
|
| ASSERT(!isMaster());
|
| - WillBeHeapVector<RefPtrWillBeMember<StyleSheet>> sheetsForList;
|
| + HeapVector<Member<StyleSheet>> sheetsForList;
|
| ImportedDocumentStyleSheetCollector subcollector(parentCollector, sheetsForList);
|
| documentStyleSheetCollection()->collectStyleSheets(*this, subcollector);
|
| documentStyleSheetCollection()->swapSheetsForSheetList(sheetsForList);
|
| @@ -330,12 +330,12 @@ void StyleEngine::updateActiveStyleSheets(StyleResolverUpdateMode updateMode)
|
| m_documentScopeDirty = false;
|
| }
|
|
|
| -const WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> StyleEngine::activeStyleSheetsForInspector() const
|
| +const HeapVector<Member<CSSStyleSheet>> StyleEngine::activeStyleSheetsForInspector() const
|
| {
|
| if (m_activeTreeScopes.isEmpty())
|
| return documentStyleSheetCollection()->activeAuthorStyleSheets();
|
|
|
| - WillBeHeapVector<RefPtrWillBeMember<CSSStyleSheet>> activeStyleSheets;
|
| + HeapVector<Member<CSSStyleSheet>> activeStyleSheets;
|
|
|
| activeStyleSheets.appendVector(documentStyleSheetCollection()->activeAuthorStyleSheets());
|
| for (TreeScope* treeScope : m_activeTreeScopes) {
|
| @@ -478,7 +478,7 @@ void StyleEngine::updateGenericFontFamilySettings()
|
| FontCache::fontCache()->invalidateShapeCache();
|
| }
|
|
|
| -void StyleEngine::removeFontFaceRules(const WillBeHeapVector<RawPtrWillBeMember<const StyleRuleFontFace>>& fontFaceRules)
|
| +void StyleEngine::removeFontFaceRules(const HeapVector<Member<const StyleRuleFontFace>>& fontFaceRules)
|
| {
|
| if (!m_fontSelector)
|
| return;
|
| @@ -523,15 +523,15 @@ static bool isCacheableForStyleElement(const StyleSheetContents& contents)
|
| return true;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& text, TextPosition startPosition)
|
| +RawPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const String& text, TextPosition startPosition)
|
| {
|
| - RefPtrWillBeRawPtr<CSSStyleSheet> styleSheet = nullptr;
|
| + RawPtr<CSSStyleSheet> styleSheet = nullptr;
|
|
|
| e->document().styleEngine().addPendingSheet();
|
|
|
| AtomicString textContent(text);
|
|
|
| - WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents>>::AddResult result = m_textToSheetCache.add(textContent, nullptr);
|
| + HeapHashMap<AtomicString, Member<StyleSheetContents>>::AddResult result = m_textToSheetCache.add(textContent, nullptr);
|
| if (result.isNewEntry || !result.storedValue->value) {
|
| styleSheet = StyleEngine::parseSheet(e, text, startPosition);
|
| if (result.isNewEntry && isCacheableForStyleElement(*styleSheet->contents())) {
|
| @@ -551,9 +551,9 @@ PassRefPtrWillBeRawPtr<CSSStyleSheet> StyleEngine::createSheet(Element* e, const
|
| return styleSheet;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSStyleSheet> StyleEngine::parseSheet(Element* e, const String& text, TextPosition startPosition)
|
| +RawPtr<CSSStyleSheet> StyleEngine::parseSheet(Element* e, const String& text, TextPosition startPosition)
|
| {
|
| - RefPtrWillBeRawPtr<CSSStyleSheet> styleSheet = nullptr;
|
| + RawPtr<CSSStyleSheet> styleSheet = nullptr;
|
| styleSheet = CSSStyleSheet::createInline(e, KURL(), startPosition, e->document().characterSet());
|
| styleSheet->contents()->parseStringAtPosition(text, startPosition);
|
| return styleSheet;
|
| @@ -561,7 +561,7 @@ PassRefPtrWillBeRawPtr<CSSStyleSheet> StyleEngine::parseSheet(Element* e, const
|
|
|
| void StyleEngine::removeSheet(StyleSheetContents* contents)
|
| {
|
| - WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString>::iterator it = m_sheetToTextCache.find(contents);
|
| + HeapHashMap<Member<StyleSheetContents>, AtomicString>::iterator it = m_sheetToTextCache.find(contents);
|
| if (it == m_sheetToTextCache.end())
|
| return;
|
|
|
| @@ -571,7 +571,7 @@ void StyleEngine::removeSheet(StyleSheetContents* contents)
|
|
|
| void StyleEngine::collectScopedStyleFeaturesTo(RuleFeatureSet& features) const
|
| {
|
| - WillBeHeapHashSet<RawPtrWillBeMember<const StyleSheetContents>> visitedSharedStyleSheetContents;
|
| + HeapHashSet<Member<const StyleSheetContents>> visitedSharedStyleSheetContents;
|
| if (document().scopedStyleResolver())
|
| document().scopedStyleResolver()->collectFeaturesTo(features, visitedSharedStyleSheetContents);
|
| for (TreeScope* treeScope : m_activeTreeScopes) {
|
| @@ -595,7 +595,7 @@ void StyleEngine::fontsNeedUpdate(CSSFontSelector*)
|
| document().setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::Fonts));
|
| }
|
|
|
| -void StyleEngine::setFontSelector(PassRefPtrWillBeRawPtr<CSSFontSelector> fontSelector)
|
| +void StyleEngine::setFontSelector(RawPtr<CSSFontSelector> fontSelector)
|
| {
|
| #if !ENABLE(OILPAN)
|
| if (m_fontSelector)
|
|
|