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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSParser.cpp

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/parser/CSSParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
index 075226045b4d2fee237b3a77fe402e4f3fee58a9..6f892e08afeda035bc1f9b8a592eafbf79de78ee 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
@@ -43,7 +43,7 @@ CSSSelectorList CSSParser::parsePageSelector(const CSSParserContext& context, St
return CSSParserImpl::parsePageSelector(scope.tokenRange(), styleSheetContents);
}
-RawPtr<StyleRuleBase> CSSParser::parseRule(const CSSParserContext& context, StyleSheetContents* styleSheet, const String& rule)
+StyleRuleBase* CSSParser::parseRule(const CSSParserContext& context, StyleSheetContents* styleSheet, const String& rule)
{
return CSSParserImpl::parseRule(rule, context, styleSheet, CSSParserImpl::AllowImportRules);
}
@@ -64,9 +64,9 @@ bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID u
return false;
CSSPropertyID resolvedProperty = resolveCSSPropertyID(unresolvedProperty);
CSSParserMode parserMode = declaration->cssParserMode();
- RawPtr<CSSValue> value = CSSParserFastPaths::maybeParseValue(resolvedProperty, string, parserMode);
+ CSSValue* value = CSSParserFastPaths::maybeParseValue(resolvedProperty, string, parserMode);
if (value)
- return declaration->setProperty(CSSProperty(resolvedProperty, value.release(), important));
+ return declaration->setProperty(CSSProperty(resolvedProperty, value, important));
CSSParserContext context(parserMode, 0);
if (styleSheet) {
context = styleSheet->parserContext();
@@ -89,7 +89,7 @@ bool CSSParser::parseValueForCustomProperty(MutableStylePropertySet* declaration
return CSSParserImpl::parseVariableValue(declaration, propertyName, value, important, context);
}
-RawPtr<ImmutableStylePropertySet> CSSParser::parseCustomPropertySet(CSSParserTokenRange range)
+ImmutableStylePropertySet* CSSParser::parseCustomPropertySet(CSSParserTokenRange range)
{
return CSSParserImpl::parseCustomPropertySet(range);
}
@@ -99,17 +99,17 @@ bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID u
return CSSParserImpl::parseValue(declaration, unresolvedProperty, string, important, context);
}
-RawPtr<CSSValue> CSSParser::parseSingleValue(CSSPropertyID propertyID, const String& string, const CSSParserContext& context)
+CSSValue* CSSParser::parseSingleValue(CSSPropertyID propertyID, const String& string, const CSSParserContext& context)
{
if (string.isEmpty())
return nullptr;
- if (RawPtr<CSSValue> value = CSSParserFastPaths::maybeParseValue(propertyID, string, context.mode()))
+ if (CSSValue* value = CSSParserFastPaths::maybeParseValue(propertyID, string, context.mode()))
return value;
CSSTokenizer::Scope scope(string);
return CSSPropertyParser::parseSingleValue(propertyID, scope.tokenRange(), context);
}
-RawPtr<ImmutableStylePropertySet> CSSParser::parseInlineStyleDeclaration(const String& styleString, Element* element)
+ImmutableStylePropertySet* CSSParser::parseInlineStyleDeclaration(const String& styleString, Element* element)
{
return CSSParserImpl::parseInlineStyleDeclaration(styleString, element);
}
@@ -119,10 +119,10 @@ PassOwnPtr<Vector<double>> CSSParser::parseKeyframeKeyList(const String& keyList
return CSSParserImpl::parseKeyframeKeyList(keyList);
}
-RawPtr<StyleRuleKeyframe> CSSParser::parseKeyframeRule(const CSSParserContext& context, const String& rule)
+StyleRuleKeyframe* CSSParser::parseKeyframeRule(const CSSParserContext& context, const String& rule)
{
- RawPtr<StyleRuleBase> keyframe = CSSParserImpl::parseRule(rule, context, nullptr, CSSParserImpl::KeyframeRules);
- return toStyleRuleKeyframe(keyframe.get());
+ StyleRuleBase* keyframe = CSSParserImpl::parseRule(rule, context, nullptr, CSSParserImpl::KeyframeRules);
+ return toStyleRuleKeyframe(keyframe);
}
bool CSSParser::parseSupportsCondition(const String& condition)
@@ -145,7 +145,7 @@ bool CSSParser::parseColor(Color& color, const String& string, bool strict)
return true;
}
- RawPtr<CSSValue> value = CSSParserFastPaths::parseColor(string, strict ? HTMLStandardMode : HTMLQuirksMode);
+ CSSValue* value = CSSParserFastPaths::parseColor(string, strict ? HTMLStandardMode : HTMLQuirksMode);
// TODO(timloh): Why is this always strict mode?
if (!value)
value = parseSingleValue(CSSPropertyColor, string, strictCSSParserContext());
@@ -168,7 +168,7 @@ bool CSSParser::parseSystemColor(Color& color, const String& colorString)
return true;
}
-RawPtr<CSSValue> CSSParser::parseFontFaceDescriptor(CSSPropertyID propertyID, const String& propertyValue, const CSSParserContext& context)
+CSSValue* CSSParser::parseFontFaceDescriptor(CSSPropertyID propertyID, const String& propertyValue, const CSSParserContext& context)
{
StringBuilder builder;
builder.appendLiteral("@font-face { ");
@@ -176,10 +176,10 @@ RawPtr<CSSValue> CSSParser::parseFontFaceDescriptor(CSSPropertyID propertyID, co
builder.appendLiteral(" : ");
builder.append(propertyValue);
builder.appendLiteral("; }");
- RawPtr<StyleRuleBase> rule = parseRule(context, nullptr, builder.toString());
+ StyleRuleBase* rule = parseRule(context, nullptr, builder.toString());
if (!rule || !rule->isFontFaceRule())
return nullptr;
- return toStyleRuleFontFace(rule.get())->properties().getPropertyCSSValue(propertyID);
+ return toStyleRuleFontFace(rule)->properties().getPropertyCSSValue(propertyID);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParser.h ('k') | third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698