| 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 65d35a495c2bea315b815a173f321f985edba6f6..c04eb00a8d3c3eec7cf30608600d4db6199a6e80 100644
|
| --- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
|
| @@ -113,7 +113,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();
|
| }
|
|
|
| @@ -128,7 +128,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();
|
| @@ -153,7 +153,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));
|
| document().addedStyleSheet(m_injectedAuthorStyleSheets.last().get());
|
| @@ -277,7 +277,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);
|
| @@ -328,12 +328,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) {
|
| @@ -477,7 +477,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;
|
| @@ -522,15 +522,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())) {
|
| @@ -550,9 +550,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;
|
| @@ -560,7 +560,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;
|
|
|
| @@ -570,7 +570,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) {
|
| @@ -594,7 +594,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)
|
|
|