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

Unified Diff: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
index 03179601ea45fc8cfd2bc849281773b706756112..0ec605295cd51c18409ab4449e3e009c07612085 100644
--- a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
@@ -45,9 +45,9 @@ namespace blink {
class StyleSheetCSSRuleList final : public CSSRuleList {
public:
- static PassOwnPtrWillBeRawPtr<StyleSheetCSSRuleList> create(CSSStyleSheet* sheet)
+ static RawPtr<StyleSheetCSSRuleList> create(CSSStyleSheet* sheet)
{
- return adoptPtrWillBeNoop(new StyleSheetCSSRuleList(sheet));
+ return new StyleSheetCSSRuleList(sheet);
}
DEFINE_INLINE_VIRTUAL_TRACE()
@@ -69,7 +69,7 @@ private:
CSSStyleSheet* styleSheet() const override { return m_styleSheet; }
- RawPtrWillBeMember<CSSStyleSheet> m_styleSheet;
+ Member<CSSStyleSheet> m_styleSheet;
};
#if ENABLE(ASSERT)
@@ -89,30 +89,30 @@ static bool isAcceptableCSSStyleSheetParent(Node* parentNode)
}
#endif
-PassRefPtrWillBeRawPtr<CSSStyleSheet> CSSStyleSheet::create(PassRefPtrWillBeRawPtr<StyleSheetContents> sheet, CSSImportRule* ownerRule)
+RawPtr<CSSStyleSheet> CSSStyleSheet::create(RawPtr<StyleSheetContents> sheet, CSSImportRule* ownerRule)
{
- return adoptRefWillBeNoop(new CSSStyleSheet(sheet, ownerRule));
+ return new CSSStyleSheet(sheet, ownerRule);
}
-PassRefPtrWillBeRawPtr<CSSStyleSheet> CSSStyleSheet::create(PassRefPtrWillBeRawPtr<StyleSheetContents> sheet, Node* ownerNode)
+RawPtr<CSSStyleSheet> CSSStyleSheet::create(RawPtr<StyleSheetContents> sheet, Node* ownerNode)
{
- return adoptRefWillBeNoop(new CSSStyleSheet(sheet, ownerNode, false, TextPosition::minimumPosition()));
+ return new CSSStyleSheet(sheet, ownerNode, false, TextPosition::minimumPosition());
}
-PassRefPtrWillBeRawPtr<CSSStyleSheet> CSSStyleSheet::createInline(PassRefPtrWillBeRawPtr<StyleSheetContents> sheet, Node* ownerNode, const TextPosition& startPosition)
+RawPtr<CSSStyleSheet> CSSStyleSheet::createInline(RawPtr<StyleSheetContents> sheet, Node* ownerNode, const TextPosition& startPosition)
{
ASSERT(sheet);
- return adoptRefWillBeNoop(new CSSStyleSheet(sheet, ownerNode, true, startPosition));
+ return new CSSStyleSheet(sheet, ownerNode, true, startPosition);
}
-PassRefPtrWillBeRawPtr<CSSStyleSheet> CSSStyleSheet::createInline(Node* ownerNode, const KURL& baseURL, const TextPosition& startPosition, const String& encoding)
+RawPtr<CSSStyleSheet> CSSStyleSheet::createInline(Node* ownerNode, const KURL& baseURL, const TextPosition& startPosition, const String& encoding)
{
CSSParserContext parserContext(ownerNode->document(), 0, baseURL, encoding);
- RefPtrWillBeRawPtr<StyleSheetContents> sheet = StyleSheetContents::create(baseURL.getString(), parserContext);
- return adoptRefWillBeNoop(new CSSStyleSheet(sheet.release(), ownerNode, true, startPosition));
+ RawPtr<StyleSheetContents> sheet = StyleSheetContents::create(baseURL.getString(), parserContext);
+ return new CSSStyleSheet(sheet.release(), ownerNode, true, startPosition);
}
-CSSStyleSheet::CSSStyleSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> contents, CSSImportRule* ownerRule)
+CSSStyleSheet::CSSStyleSheet(RawPtr<StyleSheetContents> contents, CSSImportRule* ownerRule)
: m_contents(contents)
, m_isInlineStylesheet(false)
, m_isDisabled(false)
@@ -124,7 +124,7 @@ CSSStyleSheet::CSSStyleSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> contents
m_contents->registerClient(this);
}
-CSSStyleSheet::CSSStyleSheet(PassRefPtrWillBeRawPtr<StyleSheetContents> contents, Node* ownerNode, bool isInlineStylesheet, const TextPosition& startPosition)
+CSSStyleSheet::CSSStyleSheet(RawPtr<StyleSheetContents> contents, Node* ownerNode, bool isInlineStylesheet, const TextPosition& startPosition)
: m_contents(contents)
, m_isInlineStylesheet(isInlineStylesheet)
, m_isDisabled(false)
@@ -221,7 +221,7 @@ void CSSStyleSheet::setDisabled(bool disabled)
didMutate();
}
-void CSSStyleSheet::setMediaQueries(PassRefPtrWillBeRawPtr<MediaQuerySet> mediaQueries)
+void CSSStyleSheet::setMediaQueries(RawPtr<MediaQuerySet> mediaQueries)
{
m_mediaQueries = mediaQueries;
if (m_mediaCSSOMWrapper && m_mediaQueries)
@@ -244,7 +244,7 @@ CSSRule* CSSStyleSheet::item(unsigned index)
m_childRuleCSSOMWrappers.grow(ruleCount);
ASSERT(m_childRuleCSSOMWrappers.size() == ruleCount);
- RefPtrWillBeMember<CSSRule>& cssRule = m_childRuleCSSOMWrappers[index];
+ Member<CSSRule>& cssRule = m_childRuleCSSOMWrappers[index];
if (!cssRule)
cssRule = m_contents->ruleAt(index)->createCSSOMWrapper(this);
return cssRule.get();
@@ -275,7 +275,7 @@ bool CSSStyleSheet::canAccessRules() const
return false;
}
-PassRefPtrWillBeRawPtr<CSSRuleList> CSSStyleSheet::rules()
+RawPtr<CSSRuleList> CSSStyleSheet::rules()
{
return cssRules();
}
@@ -289,7 +289,7 @@ unsigned CSSStyleSheet::insertRule(const String& ruleString, unsigned index, Exc
return 0;
}
CSSParserContext context(m_contents->parserContext(), UseCounter::getFrom(this));
- RefPtrWillBeRawPtr<StyleRuleBase> rule = CSSParser::parseRule(context, m_contents.get(), ruleString);
+ RawPtr<StyleRuleBase> rule = CSSParser::parseRule(context, m_contents.get(), ruleString);
if (!rule) {
exceptionState.throwDOMException(SyntaxError, "Failed to parse the rule '" + ruleString + "'.");
@@ -306,7 +306,7 @@ unsigned CSSStyleSheet::insertRule(const String& ruleString, unsigned index, Exc
return 0;
}
if (!m_childRuleCSSOMWrappers.isEmpty())
- m_childRuleCSSOMWrappers.insert(index, RefPtrWillBeMember<CSSRule>(nullptr));
+ m_childRuleCSSOMWrappers.insert(index, Member<CSSRule>(nullptr));
return index;
}
@@ -361,7 +361,7 @@ int CSSStyleSheet::addRule(const String& selector, const String& style, Exceptio
}
-PassRefPtrWillBeRawPtr<CSSRuleList> CSSStyleSheet::cssRules()
+RawPtr<CSSRuleList> CSSStyleSheet::cssRules()
{
if (!canAccessRules())
return nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSStyleSheet.h ('k') | third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698