| Index: Source/core/css/parser/CSSParserFastPaths.cpp
|
| diff --git a/Source/core/css/parser/CSSParserFastPaths.cpp b/Source/core/css/parser/CSSParserFastPaths.cpp
|
| index 5acbbab07b0db11e5b05c88526471319eb90af19..28e4bda965a5a762a4ce57b3517e22b1cccaa494 100644
|
| --- a/Source/core/css/parser/CSSParserFastPaths.cpp
|
| +++ b/Source/core/css/parser/CSSParserFastPaths.cpp
|
| @@ -85,7 +85,7 @@ static inline bool parseSimpleLength(const CharacterType* characters, unsigned l
|
| return ok;
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> parseSimpleLengthValue(CSSPropertyID propertyId, const String& string, CSSParserMode cssParserMode)
|
| +static NullableCSSValue parseSimpleLengthValue(CSSPropertyID propertyId, const String& string, CSSParserMode cssParserMode)
|
| {
|
| ASSERT(!string.isEmpty());
|
| bool acceptsNegativeNumbers = false;
|
| @@ -428,7 +428,7 @@ static bool fastParseColorInternal(RGBA32& rgb, const CharacterType* characters,
|
| return false;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSParserFastPaths::parseColor(const String& string, bool quirksMode)
|
| +NullableCSSValue CSSParserFastPaths::parseColor(const String& string, bool quirksMode)
|
| {
|
| ASSERT(!string.isEmpty());
|
| CSSParserString cssString;
|
| @@ -749,7 +749,7 @@ bool CSSParserFastPaths::isKeywordPropertyID(CSSPropertyID propertyId)
|
| }
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> parseKeywordValue(CSSPropertyID propertyId, const String& string)
|
| +static NullableCSSValue parseKeywordValue(CSSPropertyID propertyId, const String& string)
|
| {
|
| ASSERT(!string.isEmpty());
|
|
|
| @@ -926,7 +926,7 @@ static PassRefPtrWillBeRawPtr<CSSValueList> parseSimpleTransformList(CharType*&
|
| return transformList.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> parseSimpleTransform(CSSPropertyID propertyID, const String& string)
|
| +static NullableCSSValue parseSimpleTransform(CSSPropertyID propertyID, const String& string)
|
| {
|
| ASSERT(!string.isEmpty());
|
|
|
| @@ -942,16 +942,16 @@ static PassRefPtrWillBeRawPtr<CSSValue> parseSimpleTransform(CSSPropertyID prope
|
| return parseSimpleTransformList(pos, end);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID, const String& string, CSSParserMode parserMode)
|
| +NullableCSSValue CSSParserFastPaths::maybeParseValue(CSSPropertyID propertyID, const String& string, CSSParserMode parserMode)
|
| {
|
| - if (RefPtrWillBeRawPtr<CSSValue> length = parseSimpleLengthValue(propertyID, string, parserMode))
|
| - return length.release();
|
| + if (NullableCSSValue length = parseSimpleLengthValue(propertyID, string, parserMode))
|
| + return length;
|
| if (isColorPropertyID(propertyID))
|
| return parseColor(string, isQuirksModeBehavior(parserMode));
|
| - if (RefPtrWillBeRawPtr<CSSValue> keyword = parseKeywordValue(propertyID, string))
|
| - return keyword.release();
|
| - if (RefPtrWillBeRawPtr<CSSValue> transform = parseSimpleTransform(propertyID, string))
|
| - return transform.release();
|
| + if (NullableCSSValue keyword = parseKeywordValue(propertyID, string))
|
| + return keyword;
|
| + if (NullableCSSValue transform = parseSimpleTransform(propertyID, string))
|
| + return transform;
|
| return nullptr;
|
| }
|
|
|
|
|