| Index: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| index e3c41b2ec5d7302c1a113db7b5443f08a4d38d6a..477d2fb0d0ccf7357344f44b91e7bfdb2aae6d70 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
|
| @@ -53,7 +53,7 @@
|
|
|
| namespace blink {
|
|
|
| -void CSSPropertyParser::addProperty(CSSPropertyID propId, PassRefPtrWillBeRawPtr<CSSValue> value, bool important, bool implicit)
|
| +void CSSPropertyParser::addProperty(CSSPropertyID propId, RawPtr<CSSValue> value, bool important, bool implicit)
|
| {
|
| ASSERT(!isPropertyAlias(propId));
|
|
|
| @@ -205,7 +205,7 @@ bool CSSPropertyParser::validUnit(CSSParserValue* value, Units unitflags, CSSPar
|
| }
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveNumericValue(CSSParserValue* value)
|
| +RawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveNumericValue(CSSParserValue* value)
|
| {
|
| if (m_parsedCalculation) {
|
| ASSERT(isCalculation(value));
|
| @@ -219,7 +219,7 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveNume
|
| return cssValuePool().createValue(value->fValue, value->unit());
|
| }
|
|
|
| -inline PassRefPtrWillBeRawPtr<CSSCustomIdentValue> CSSPropertyParser::createPrimitiveCustomIdentValue(CSSParserValue* value)
|
| +inline RawPtr<CSSCustomIdentValue> CSSPropertyParser::createPrimitiveCustomIdentValue(CSSParserValue* value)
|
| {
|
| ASSERT(value->m_unit == CSSParserValue::String || value->m_unit == CSSParserValue::Identifier);
|
| return CSSCustomIdentValue::create(value->string);
|
| @@ -246,7 +246,7 @@ static inline bool isForwardSlashOperator(CSSParserValue* value)
|
| return value->m_unit == CSSParserValue::Operator && value->iValue == '/';
|
| }
|
|
|
| -inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPrimitive(CSSValueID identifier, CSSParserValue* value)
|
| +inline RawPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPrimitive(CSSValueID identifier, CSSParserValue* value)
|
| {
|
| if (identifier)
|
| return cssValuePool().createIdentifierValue(identifier);
|
| @@ -266,7 +266,7 @@ inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPr
|
| return nullptr;
|
| }
|
|
|
| -void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtrWillBeRawPtr<CSSValue> prpValue, bool important)
|
| +void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, RawPtr<CSSValue> prpValue, bool important)
|
| {
|
| const StylePropertyShorthand& shorthand = shorthandForProperty(propId);
|
| unsigned shorthandLength = shorthand.length();
|
| @@ -275,7 +275,7 @@ void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, PassRe
|
| return;
|
| }
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> value = prpValue;
|
| + RawPtr<CSSValue> value = prpValue;
|
| ShorthandScope scope(this, propId);
|
| const CSSPropertyID* longhands = shorthand.properties();
|
| for (unsigned i = 0; i < shorthandLength; ++i)
|
| @@ -284,14 +284,14 @@ void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, PassRe
|
|
|
| bool CSSPropertyParser::legacyParseAndApplyValue(CSSPropertyID propertyID, bool important)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValue> result = legacyParseValue(propertyID);
|
| + RawPtr<CSSValue> result = legacyParseValue(propertyID);
|
| if (!result)
|
| return false;
|
| addProperty(propertyID, result.release(), important);
|
| return true;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::legacyParseValue(CSSPropertyID unresolvedProperty)
|
| +RawPtr<CSSValue> CSSPropertyParser::legacyParseValue(CSSPropertyID unresolvedProperty)
|
| {
|
| CSSPropertyID propId = resolveCSSPropertyID(unresolvedProperty);
|
|
|
| @@ -304,7 +304,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::legacyParseValue(CSSProperty
|
| CSSValueID id = value->id;
|
|
|
| bool validPrimitive = false;
|
| - RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
|
| + RawPtr<CSSValue> parsedValue = nullptr;
|
|
|
| switch (propId) {
|
| case CSSPropertyBackgroundColor: // <color> | inherit
|
| @@ -340,7 +340,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::legacyParseValue(CSSProperty
|
| case CSSPropertyWebkitMaskRepeatX:
|
| case CSSPropertyWebkitMaskRepeatY:
|
| {
|
| - RefPtrWillBeRawPtr<CSSValue> dummyValue = nullptr;
|
| + RawPtr<CSSValue> dummyValue = nullptr;
|
| CSSPropertyID propId1, propId2;
|
| if (!parseFillProperty(unresolvedProperty, propId1, propId2, parsedValue, dummyValue))
|
| return nullptr;
|
| @@ -450,8 +450,8 @@ bool CSSPropertyParser::legacyParseShorthand(CSSPropertyID propertyID, bool impo
|
| case CSSPropertyBackgroundRepeat:
|
| case CSSPropertyWebkitMaskPosition:
|
| case CSSPropertyWebkitMaskRepeat: {
|
| - RefPtrWillBeRawPtr<CSSValue> val1 = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> val2 = nullptr;
|
| + RawPtr<CSSValue> val1 = nullptr;
|
| + RawPtr<CSSValue> val2 = nullptr;
|
| CSSPropertyID propId1, propId2;
|
| if (parseFillProperty(propertyID, propId1, propId2, val1, val2)) {
|
| ShorthandScope scope(this, propertyID);
|
| @@ -510,14 +510,14 @@ bool CSSPropertyParser::legacyParseShorthand(CSSPropertyID propertyID, bool impo
|
| }
|
| }
|
|
|
| -void CSSPropertyParser::addFillValue(RefPtrWillBeRawPtr<CSSValue>& lval, PassRefPtrWillBeRawPtr<CSSValue> rval)
|
| +void CSSPropertyParser::addFillValue(RawPtr<CSSValue>& lval, RawPtr<CSSValue> rval)
|
| {
|
| if (lval) {
|
| if (lval->isBaseValueList())
|
| toCSSValueList(lval.get())->append(rval);
|
| else {
|
| - PassRefPtrWillBeRawPtr<CSSValue> oldlVal(lval.release());
|
| - PassRefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValue> oldlVal(lval.release());
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| list->append(oldlVal);
|
| list->append(rval);
|
| lval = list;
|
| @@ -527,7 +527,7 @@ void CSSPropertyParser::addFillValue(RefPtrWillBeRawPtr<CSSValue>& lval, PassRef
|
| lval = rval;
|
| }
|
|
|
| -static bool parseBackgroundClip(CSSParserValue* parserValue, RefPtrWillBeRawPtr<CSSValue>& cssValue)
|
| +static bool parseBackgroundClip(CSSParserValue* parserValue, RawPtr<CSSValue>& cssValue)
|
| {
|
| if (parserValue->id == CSSValueBorderBox || parserValue->id == CSSValuePaddingBox
|
| || parserValue->id == CSSValueContentBox || parserValue->id == CSSValueWebkitText) {
|
| @@ -548,14 +548,14 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
|
| ShorthandScope scope(this, propId);
|
|
|
| bool parsedProperty[cMaxFillProperties] = { false };
|
| - RefPtrWillBeRawPtr<CSSValue> values[cMaxFillProperties];
|
| + RawPtr<CSSValue> values[cMaxFillProperties];
|
| #if ENABLE(OILPAN)
|
| // Zero initialize the array of raw pointers.
|
| memset(&values, 0, sizeof(values));
|
| #endif
|
| - RefPtrWillBeRawPtr<CSSValue> clipValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> positionYValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> repeatYValue = nullptr;
|
| + RawPtr<CSSValue> clipValue = nullptr;
|
| + RawPtr<CSSValue> positionYValue = nullptr;
|
| + RawPtr<CSSValue> repeatYValue = nullptr;
|
| bool foundClip = false;
|
| int i;
|
| bool foundPositionCSSProperty = false;
|
| @@ -604,8 +604,8 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
|
| continue;
|
|
|
| if (!parsedProperty[i]) {
|
| - RefPtrWillBeRawPtr<CSSValue> val1 = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> val2 = nullptr;
|
| + RawPtr<CSSValue> val1 = nullptr;
|
| + RawPtr<CSSValue> val2 = nullptr;
|
| CSSPropertyID propId1, propId2;
|
| CSSParserValue* parserValue = m_valueList->current();
|
| // parseFillProperty() may modify m_implicitShorthand, so we MUST reset it
|
| @@ -692,7 +692,7 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
|
| return true;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseColor(const CSSParserValue* value, bool acceptQuirkyColors)
|
| +RawPtr<CSSValue> CSSPropertyParser::parseColor(const CSSParserValue* value, bool acceptQuirkyColors)
|
| {
|
| CSSValueID id = value->id;
|
| if (isColorKeyword(id)) {
|
| @@ -708,7 +708,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseColor(const CSSParserVa
|
| return cssValuePool().createColorValue(c);
|
| }
|
|
|
| -bool CSSPropertyParser::parseFillImage(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& value)
|
| +bool CSSPropertyParser::parseFillImage(CSSParserValueList* valueList, RawPtr<CSSValue>& value)
|
| {
|
| if (valueList->current()->id == CSSValueNone) {
|
| value = cssValuePool().createIdentifierValue(CSSValueNone);
|
| @@ -733,7 +733,7 @@ bool CSSPropertyParser::parseFillImage(CSSParserValueList* valueList, RefPtrWill
|
| return false;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillPositionX(CSSParserValueList* valueList)
|
| +RawPtr<CSSValue> CSSPropertyParser::parseFillPositionX(CSSParserValueList* valueList)
|
| {
|
| int id = valueList->current()->id;
|
| if (id == CSSValueLeft || id == CSSValueRight || id == CSSValueCenter) {
|
| @@ -749,7 +749,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillPositionX(CSSParser
|
| return nullptr;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillPositionY(CSSParserValueList* valueList)
|
| +RawPtr<CSSValue> CSSPropertyParser::parseFillPositionY(CSSParserValueList* valueList)
|
| {
|
| int id = valueList->current()->id;
|
| if (id == CSSValueTop || id == CSSValueBottom || id == CSSValueCenter) {
|
| @@ -765,7 +765,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillPositionY(CSSParser
|
| return nullptr;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseFillPositionComponent(CSSParserValueList* valueList, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillPositionParsingMode parsingMode, Units unitless)
|
| +RawPtr<CSSPrimitiveValue> CSSPropertyParser::parseFillPositionComponent(CSSParserValueList* valueList, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillPositionParsingMode parsingMode, Units unitless)
|
| {
|
| CSSValueID id = valueList->current()->id;
|
| if (id == CSSValueLeft || id == CSSValueTop || id == CSSValueRight || id == CSSValueBottom || id == CSSValueCenter) {
|
| @@ -830,7 +830,7 @@ static bool isFillPositionKeyword(CSSValueID value)
|
| return value == CSSValueLeft || value == CSSValueTop || value == CSSValueBottom || value == CSSValueRight || value == CSSValueCenter;
|
| }
|
|
|
| -void CSSPropertyParser::parse4ValuesFillPosition(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& value1, RefPtrWillBeRawPtr<CSSValue>& value2, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue1, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue2)
|
| +void CSSPropertyParser::parse4ValuesFillPosition(CSSParserValueList* valueList, RawPtr<CSSValue>& value1, RawPtr<CSSValue>& value2, RawPtr<CSSPrimitiveValue> parsedValue1, RawPtr<CSSPrimitiveValue> parsedValue2)
|
| {
|
| // [ left | right ] [ <percentage] | <length> ] && [ top | bottom ] [ <percentage> | <length> ]
|
| // In the case of 4 values <position> requires the second value to be a length or a percentage.
|
| @@ -839,7 +839,7 @@ void CSSPropertyParser::parse4ValuesFillPosition(CSSParserValueList* valueList,
|
|
|
| unsigned cumulativeFlags = 0;
|
| FillPositionFlag value3Flag = InvalidFillPosition;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
|
| + RawPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
|
| if (!value3)
|
| return;
|
|
|
| @@ -862,7 +862,7 @@ void CSSPropertyParser::parse4ValuesFillPosition(CSSParserValueList* valueList,
|
|
|
| cumulativeFlags = 0;
|
| FillPositionFlag value4Flag = InvalidFillPosition;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> value4 = parseFillPositionComponent(valueList, cumulativeFlags, value4Flag, ResolveValuesAsKeyword);
|
| + RawPtr<CSSPrimitiveValue> value4 = parseFillPositionComponent(valueList, cumulativeFlags, value4Flag, ResolveValuesAsKeyword);
|
| if (!value4)
|
| return;
|
|
|
| @@ -878,11 +878,11 @@ void CSSPropertyParser::parse4ValuesFillPosition(CSSParserValueList* valueList,
|
|
|
| valueList->next();
|
| }
|
| -void CSSPropertyParser::parse3ValuesFillPosition(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& value1, RefPtrWillBeRawPtr<CSSValue>& value2, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue1, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue2)
|
| +void CSSPropertyParser::parse3ValuesFillPosition(CSSParserValueList* valueList, RawPtr<CSSValue>& value1, RawPtr<CSSValue>& value2, RawPtr<CSSPrimitiveValue> parsedValue1, RawPtr<CSSPrimitiveValue> parsedValue2)
|
| {
|
| unsigned cumulativeFlags = 0;
|
| FillPositionFlag value3Flag = InvalidFillPosition;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
|
| + RawPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
|
|
|
| // value3 is not an expected value, we return.
|
| if (!value3)
|
| @@ -926,8 +926,8 @@ void CSSPropertyParser::parse3ValuesFillPosition(CSSParserValueList* valueList,
|
| value1 = CSSValuePair::create(parsedValue1, parsedValue2, CSSValuePair::DropIdenticalValues);
|
| value2 = CSSValuePair::create(cssValuePool().createIdentifierValue(secondPositionKeyword), cssValuePool().createValue(50, CSSPrimitiveValue::UnitType::Percentage), CSSValuePair::DropIdenticalValues);
|
| } else {
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> firstPositionValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> secondPositionValue = nullptr;
|
| + RawPtr<CSSPrimitiveValue> firstPositionValue = nullptr;
|
| + RawPtr<CSSPrimitiveValue> secondPositionValue = nullptr;
|
|
|
| if (isFillPositionKeyword(ident2)) {
|
| // To match CSS grammar, we should only accept: [ center | left | right | bottom | top ] [ left | right | top | bottom ] [ <percentage> | <length> ].
|
| @@ -974,7 +974,7 @@ inline bool CSSPropertyParser::isPotentialPositionValue(CSSParserValue* value)
|
| return isFillPositionKeyword(value->id) || validUnit(value, FPercent | FLength, ReleaseParsedCalcValue);
|
| }
|
|
|
| -void CSSPropertyParser::parseFillPosition(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& value1, RefPtrWillBeRawPtr<CSSValue>& value2, Units unitless)
|
| +void CSSPropertyParser::parseFillPosition(CSSParserValueList* valueList, RawPtr<CSSValue>& value1, RawPtr<CSSValue>& value2, Units unitless)
|
| {
|
| unsigned numberOfValues = 0;
|
| for (unsigned i = valueList->currentIndex(); i < valueList->size(); ++i, ++numberOfValues) {
|
| @@ -1021,8 +1021,8 @@ void CSSPropertyParser::parseFillPosition(CSSParserValueList* valueList, RefPtrW
|
| return;
|
| }
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue1 = toCSSPrimitiveValue(value1.get());
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue2 = toCSSPrimitiveValue(value2.get());
|
| + RawPtr<CSSPrimitiveValue> parsedValue1 = toCSSPrimitiveValue(value1.get());
|
| + RawPtr<CSSPrimitiveValue> parsedValue2 = toCSSPrimitiveValue(value2.get());
|
|
|
| value1.clear();
|
| value2.clear();
|
| @@ -1037,7 +1037,7 @@ void CSSPropertyParser::parseFillPosition(CSSParserValueList* valueList, RefPtrW
|
| parse4ValuesFillPosition(valueList, value1, value2, parsedValue1.release(), parsedValue2.release());
|
| }
|
|
|
| -void CSSPropertyParser::parse2ValuesFillPosition(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& value1, RefPtrWillBeRawPtr<CSSValue>& value2, Units unitless)
|
| +void CSSPropertyParser::parse2ValuesFillPosition(CSSParserValueList* valueList, RawPtr<CSSValue>& value1, RawPtr<CSSValue>& value2, Units unitless)
|
| {
|
| // Parse the first value. We're just making sure that it is one of the valid keywords or a percentage/length.
|
| unsigned cumulativeFlags = 0;
|
| @@ -1080,7 +1080,7 @@ void CSSPropertyParser::parse2ValuesFillPosition(CSSParserValueList* valueList,
|
| value1.swap(value2);
|
| }
|
|
|
| -void CSSPropertyParser::parseFillRepeat(RefPtrWillBeRawPtr<CSSValue>& value1, RefPtrWillBeRawPtr<CSSValue>& value2)
|
| +void CSSPropertyParser::parseFillRepeat(RawPtr<CSSValue>& value1, RawPtr<CSSValue>& value2)
|
| {
|
| CSSValueID id = m_valueList->current()->id;
|
| if (id == CSSValueRepeatX) {
|
| @@ -1121,7 +1121,7 @@ void CSSPropertyParser::parseFillRepeat(RefPtrWillBeRawPtr<CSSValue>& value1, Re
|
| value2 = cssValuePool().createIdentifierValue(toCSSPrimitiveValue(value1.get())->getValueID());
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID unresolvedProperty)
|
| +RawPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID unresolvedProperty)
|
| {
|
| CSSParserValue* value = m_valueList->current();
|
| m_valueList->next();
|
| @@ -1129,7 +1129,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID
|
| if (value->id == CSSValueContain || value->id == CSSValueCover)
|
| return cssValuePool().createIdentifierValue(value->id);
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue1 = nullptr;
|
| + RawPtr<CSSPrimitiveValue> parsedValue1 = nullptr;
|
|
|
| if (value->id == CSSValueAuto)
|
| parsedValue1 = cssValuePool().createIdentifierValue(CSSValueAuto);
|
| @@ -1139,7 +1139,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID
|
| parsedValue1 = createPrimitiveNumericValue(value);
|
| }
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue2 = nullptr;
|
| + RawPtr<CSSPrimitiveValue> parsedValue2 = nullptr;
|
| value = m_valueList->current();
|
| if (value) {
|
| if (value->id == CSSValueAuto) {
|
| @@ -1163,14 +1163,14 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID
|
| }
|
|
|
| bool CSSPropertyParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2,
|
| - RefPtrWillBeRawPtr<CSSValue>& retValue1, RefPtrWillBeRawPtr<CSSValue>& retValue2)
|
| + RawPtr<CSSValue>& retValue1, RawPtr<CSSValue>& retValue2)
|
| {
|
| // We initially store the first value in value/value2, and only create
|
| // CSSValueLists if we have more values.
|
| - RefPtrWillBeRawPtr<CSSValueList> values = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValueList> values2 = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> value = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> value2 = nullptr;
|
| + RawPtr<CSSValueList> values = nullptr;
|
| + RawPtr<CSSValueList> values2 = nullptr;
|
| + RawPtr<CSSValue> value = nullptr;
|
| + RawPtr<CSSValue> value2 = nullptr;
|
|
|
| retValue1 = retValue2 = nullptr;
|
| propId1 = resolveCSSPropertyID(propId);
|
| @@ -1190,8 +1190,8 @@ bool CSSPropertyParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& p
|
| }
|
|
|
| while (true) {
|
| - RefPtrWillBeRawPtr<CSSValue> currValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> currValue2 = nullptr;
|
| + RawPtr<CSSValue> currValue = nullptr;
|
| + RawPtr<CSSValue> currValue2 = nullptr;
|
|
|
| Units unitless = FUnknown;
|
| CSSParserValue* val = m_valueList->current();
|
| @@ -1370,7 +1370,7 @@ static inline bool isValidCustomIdentForGridPositions(const CSSParserValue& valu
|
| }
|
|
|
| // The function parses [ <integer> || <custom-ident> ] in <grid-line> (which can be stand alone or with 'span').
|
| -bool CSSPropertyParser::parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRawPtr<CSSPrimitiveValue>& numericValue, RefPtrWillBeRawPtr<CSSCustomIdentValue>& gridLineName)
|
| +bool CSSPropertyParser::parseIntegerOrCustomIdentFromGridPosition(RawPtr<CSSPrimitiveValue>& numericValue, RawPtr<CSSCustomIdentValue>& gridLineName)
|
| {
|
| CSSParserValue* value = m_valueList->current();
|
| if (validUnit(value, FInteger) && value->fValue) {
|
| @@ -1396,7 +1396,7 @@ bool CSSPropertyParser::parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRa
|
| return false;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
|
| +RawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
|
| {
|
| ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
|
|
|
| @@ -1406,8 +1406,8 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
|
| return cssValuePool().createIdentifierValue(CSSValueAuto);
|
| }
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> numericValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSCustomIdentValue> gridLineName = nullptr;
|
| + RawPtr<CSSPrimitiveValue> numericValue = nullptr;
|
| + RawPtr<CSSCustomIdentValue> gridLineName = nullptr;
|
| bool hasSeenSpanKeyword = false;
|
|
|
| if (parseIntegerOrCustomIdentFromGridPosition(numericValue, gridLineName)) {
|
| @@ -1441,7 +1441,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
|
| if (gridLineName && !numericValue && !hasSeenSpanKeyword)
|
| return CSSCustomIdentValue::create(gridLineName->value());
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
|
| if (hasSeenSpanKeyword)
|
| values->append(cssValuePool().createIdentifierValue(CSSValueSpan));
|
| if (numericValue)
|
| @@ -1452,7 +1452,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
|
| return values.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> gridMissingGridPositionValue(CSSValue* value)
|
| +static RawPtr<CSSValue> gridMissingGridPositionValue(CSSValue* value)
|
| {
|
| if (value->isCustomIdentValue())
|
| return value;
|
| @@ -1466,11 +1466,11 @@ bool CSSPropertyParser::parseGridItemPositionShorthand(CSSPropertyID shorthandId
|
| const StylePropertyShorthand& shorthand = shorthandForProperty(shorthandId);
|
| ASSERT(shorthand.length() == 2);
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> startValue = parseGridPosition();
|
| + RawPtr<CSSValue> startValue = parseGridPosition();
|
| if (!startValue)
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> endValue = nullptr;
|
| + RawPtr<CSSValue> endValue = nullptr;
|
| if (m_valueList->current()) {
|
| if (!isForwardSlashOperator(m_valueList->current()))
|
| return false;
|
| @@ -1502,8 +1502,8 @@ bool CSSPropertyParser::parseGridGapShorthand(bool important)
|
| if (!validUnit(value, FLength | FNonNeg))
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> columnGap = createPrimitiveNumericValue(value);
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> rowGap = nullptr;
|
| + RawPtr<CSSPrimitiveValue> columnGap = createPrimitiveNumericValue(value);
|
| + RawPtr<CSSPrimitiveValue> rowGap = nullptr;
|
|
|
| value = m_valueList->next();
|
| if (value) {
|
| @@ -1523,13 +1523,13 @@ bool CSSPropertyParser::parseGridGapShorthand(bool important)
|
| return true;
|
| }
|
|
|
| -bool CSSPropertyParser::parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSSValue> templateColumns, bool important)
|
| +bool CSSPropertyParser::parseGridTemplateRowsAndAreas(RawPtr<CSSValue> templateColumns, bool important)
|
| {
|
| NamedGridAreaMap gridAreaMap;
|
| size_t rowCount = 0;
|
| size_t columnCount = 0;
|
| bool trailingIdentWasAdded = false;
|
| - RefPtrWillBeRawPtr<CSSValueList> templateRows = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> templateRows = CSSValueList::createSpaceSeparated();
|
|
|
| // At least template-areas strings must be defined.
|
| if (!m_valueList->current())
|
| @@ -1547,7 +1547,7 @@ bool CSSPropertyParser::parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSS
|
|
|
| // Handle template-rows's track-size.
|
| if (m_valueList->current() && m_valueList->current()->m_unit != CSSParserValue::String) {
|
| - RefPtrWillBeRawPtr<CSSValue> value = parseGridTrackSize(*m_valueList);
|
| + RawPtr<CSSValue> value = parseGridTrackSize(*m_valueList);
|
| if (!value)
|
| return false;
|
| templateRows->append(value);
|
| @@ -1568,7 +1568,7 @@ bool CSSPropertyParser::parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSS
|
| addProperty(CSSPropertyGridTemplateColumns, cssValuePool().createIdentifierValue(CSSValueNone), important);
|
|
|
| // [<line-names>? <string> [<track-size> <line-names>]? ]+
|
| - RefPtrWillBeRawPtr<CSSValue> templateAreas = CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount);
|
| + RawPtr<CSSValue> templateAreas = CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount);
|
| addProperty(CSSPropertyGridTemplateAreas, templateAreas.release(), important);
|
| addProperty(CSSPropertyGridTemplateRows, templateRows.release(), important);
|
|
|
| @@ -1598,7 +1598,7 @@ bool CSSPropertyParser::parseGridTemplateShorthand(bool important)
|
| }
|
|
|
| unsigned index = 0;
|
| - RefPtrWillBeRawPtr<CSSValue> columnsValue = nullptr;
|
| + RawPtr<CSSValue> columnsValue = nullptr;
|
| if (firstValueIsNone) {
|
| columnsValue = cssValuePool().createIdentifierValue(CSSValueNone);
|
| } else {
|
| @@ -1610,7 +1610,7 @@ bool CSSPropertyParser::parseGridTemplateShorthand(bool important)
|
| if (!(m_valueList->current() && isForwardSlashOperator(m_valueList->current()) && m_valueList->next()))
|
| return false;
|
| index = m_valueList->currentIndex();
|
| - if (RefPtrWillBeRawPtr<CSSValue> rowsValue = parseGridTrackList()) {
|
| + if (RawPtr<CSSValue> rowsValue = parseGridTrackList()) {
|
| if (m_valueList->current())
|
| return false;
|
| addProperty(CSSPropertyGridTemplateColumns, columnsValue, important);
|
| @@ -1654,8 +1654,8 @@ bool CSSPropertyParser::parseGridShorthand(bool important)
|
| if (!legacyParseAndApplyValue(CSSPropertyGridAutoFlow, important))
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> autoColumnsValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> autoRowsValue = nullptr;
|
| + RawPtr<CSSValue> autoColumnsValue = nullptr;
|
| + RawPtr<CSSValue> autoRowsValue = nullptr;
|
|
|
| if (m_valueList->current()) {
|
| autoColumnsValue = parseGridTrackSize(*m_valueList);
|
| @@ -1702,19 +1702,19 @@ bool CSSPropertyParser::parseGridAreaShorthand(bool important)
|
| const StylePropertyShorthand& shorthand = gridAreaShorthand();
|
| ASSERT_UNUSED(shorthand, shorthand.length() == 4);
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> rowStartValue = parseGridPosition();
|
| + RawPtr<CSSValue> rowStartValue = parseGridPosition();
|
| if (!rowStartValue)
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> columnStartValue = nullptr;
|
| + RawPtr<CSSValue> columnStartValue = nullptr;
|
| if (!parseSingleGridAreaLonghand(columnStartValue))
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> rowEndValue = nullptr;
|
| + RawPtr<CSSValue> rowEndValue = nullptr;
|
| if (!parseSingleGridAreaLonghand(rowEndValue))
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> columnEndValue = nullptr;
|
| + RawPtr<CSSValue> columnEndValue = nullptr;
|
| if (!parseSingleGridAreaLonghand(columnEndValue))
|
| return false;
|
|
|
| @@ -1734,7 +1734,7 @@ bool CSSPropertyParser::parseGridAreaShorthand(bool important)
|
| return true;
|
| }
|
|
|
| -bool CSSPropertyParser::parseSingleGridAreaLonghand(RefPtrWillBeRawPtr<CSSValue>& property)
|
| +bool CSSPropertyParser::parseSingleGridAreaLonghand(RawPtr<CSSValue>& property)
|
| {
|
| if (!m_valueList->current())
|
| return true;
|
| @@ -1762,7 +1762,7 @@ bool CSSPropertyParser::parseGridLineNames(CSSParserValueList& inputList, CSSVal
|
| // Skip '['
|
| inputList.next();
|
|
|
| - RefPtrWillBeRawPtr<CSSGridLineNamesValue> lineNames = previousNamedAreaTrailingLineNames;
|
| + RawPtr<CSSGridLineNamesValue> lineNames = previousNamedAreaTrailingLineNames;
|
| if (!lineNames)
|
| lineNames = CSSGridLineNamesValue::create();
|
|
|
| @@ -1773,7 +1773,7 @@ bool CSSPropertyParser::parseGridLineNames(CSSParserValueList& inputList, CSSVal
|
| if (!isValidCustomIdentForGridPositions(*identValue))
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSCustomIdentValue> lineName = createPrimitiveCustomIdentValue(identValue);
|
| + RawPtr<CSSCustomIdentValue> lineName = createPrimitiveCustomIdentValue(identValue);
|
| lineNames->append(lineName.release());
|
| inputList.next();
|
| }
|
| @@ -1789,7 +1789,7 @@ bool CSSPropertyParser::parseGridLineNames(CSSParserValueList& inputList, CSSVal
|
| return true;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackList()
|
| +RawPtr<CSSValue> CSSPropertyParser::parseGridTrackList()
|
| {
|
| ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
|
|
|
| @@ -1799,7 +1799,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackList()
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
| }
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
|
| // Handle leading <custom-ident>*.
|
| if (!parseGridLineNames(*m_valueList, *values))
|
| return nullptr;
|
| @@ -1818,7 +1818,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackList()
|
| seenTrackSizeOrRepeatFunction = true;
|
| seenAutoRepeat = seenAutoRepeat || isAutoRepeat;
|
| } else {
|
| - RefPtrWillBeRawPtr<CSSValue> value = parseGridTrackSize(*m_valueList, seenAutoRepeat ? FixedSizeOnly : AllowAll);
|
| + RawPtr<CSSValue> value = parseGridTrackSize(*m_valueList, seenAutoRepeat ? FixedSizeOnly : AllowAll);
|
| if (!value)
|
| return nullptr;
|
| values->append(value);
|
| @@ -1867,7 +1867,7 @@ bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list, bool& i
|
| // because it will be computed later, let's set it to 1.
|
| size_t repetitions = isAutoRepeat ? 1 : clampTo<size_t>(currentValue->fValue, 0, kGridMaxTracks);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceSeparated();
|
| arguments->next(); // Skip the repetition count.
|
| arguments->next(); // Skip the comma.
|
|
|
| @@ -1881,7 +1881,7 @@ bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list, bool& i
|
| if (isAutoRepeat && numberOfTracks)
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> trackSize = parseGridTrackSize(*arguments, restriction);
|
| + RawPtr<CSSValue> trackSize = parseGridTrackSize(*arguments, restriction);
|
| if (!trackSize)
|
| return false;
|
|
|
| @@ -1912,7 +1912,7 @@ bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list, bool& i
|
| }
|
|
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackSize(CSSParserValueList& inputList, TrackSizeRestriction restriction)
|
| +RawPtr<CSSValue> CSSPropertyParser::parseGridTrackSize(CSSParserValueList& inputList, TrackSizeRestriction restriction)
|
| {
|
| ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
|
|
|
| @@ -1928,15 +1928,15 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackSize(CSSParser
|
| if (!arguments || arguments->size() != 3 || !isComma(arguments->valueAt(1)))
|
| return nullptr;
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> minTrackBreadth = parseGridBreadth(arguments->valueAt(0), restriction);
|
| + RawPtr<CSSPrimitiveValue> minTrackBreadth = parseGridBreadth(arguments->valueAt(0), restriction);
|
| if (!minTrackBreadth)
|
| return nullptr;
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> maxTrackBreadth = parseGridBreadth(arguments->valueAt(2));
|
| + RawPtr<CSSPrimitiveValue> maxTrackBreadth = parseGridBreadth(arguments->valueAt(2));
|
| if (!maxTrackBreadth)
|
| return nullptr;
|
|
|
| - RefPtrWillBeRawPtr<CSSFunctionValue> result = CSSFunctionValue::create(CSSValueMinmax);
|
| + RawPtr<CSSFunctionValue> result = CSSFunctionValue::create(CSSValueMinmax);
|
| result->append(minTrackBreadth);
|
| result->append(maxTrackBreadth);
|
| return result.release();
|
| @@ -1945,7 +1945,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackSize(CSSParser
|
| return parseGridBreadth(currentValue, restriction);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseGridBreadth(CSSParserValue* currentValue, TrackSizeRestriction restriction)
|
| +RawPtr<CSSPrimitiveValue> CSSPropertyParser::parseGridBreadth(CSSParserValue* currentValue, TrackSizeRestriction restriction)
|
| {
|
| if (currentValue->id == CSSValueMinContent || currentValue->id == CSSValueMaxContent || currentValue->id == CSSValueAuto)
|
| return restriction == AllowAll ? cssValuePool().createIdentifierValue(currentValue->id) : nullptr;
|
| @@ -2069,7 +2069,7 @@ bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap,
|
| return true;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas()
|
| +RawPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas()
|
| {
|
| if (m_valueList->current() && m_valueList->current()->id == CSSValueNone) {
|
| m_valueList->next();
|
| @@ -2092,7 +2092,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas()
|
| return CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridAutoFlow(CSSParserValueList& list)
|
| +RawPtr<CSSValue> CSSPropertyParser::parseGridAutoFlow(CSSParserValueList& list)
|
| {
|
| // [ row | column ] || dense
|
| ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
|
| @@ -2101,7 +2101,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridAutoFlow(CSSParserV
|
| if (!value)
|
| return nullptr;
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
|
|
|
| // First parameter.
|
| CSSValueID firstId = value->id;
|
| @@ -2149,7 +2149,7 @@ static bool isItemPositionKeyword(CSSValueID id)
|
| || id == CSSValueFlexEnd || id == CSSValueLeft || id == CSSValueRight;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseLegacyPosition()
|
| +RawPtr<CSSValue> CSSPropertyParser::parseLegacyPosition()
|
| {
|
| // [ legacy && [ left | right | center ]
|
|
|
| @@ -2173,7 +2173,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseLegacyPosition()
|
| return CSSValuePair::create(cssValuePool().createIdentifierValue(CSSValueLegacy), cssValuePool().createIdentifierValue(value->id), CSSValuePair::DropIdenticalValues);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseItemPositionOverflowPosition()
|
| +RawPtr<CSSValue> CSSPropertyParser::parseItemPositionOverflowPosition()
|
| {
|
| // auto | stretch | <baseline-position> | [<item-position> && <overflow-position>? ]
|
| // <baseline-position> = baseline | last-baseline;
|
| @@ -2188,8 +2188,8 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseItemPositionOverflowPos
|
| return cssValuePool().createIdentifierValue(value->id);
|
| }
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> position = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> overflowAlignmentKeyword = nullptr;
|
| + RawPtr<CSSPrimitiveValue> position = nullptr;
|
| + RawPtr<CSSPrimitiveValue> overflowAlignmentKeyword = nullptr;
|
| if (isItemPositionKeyword(value->id)) {
|
| position = cssValuePool().createIdentifierValue(value->id);
|
| value = m_valueList->next();
|
| @@ -2395,13 +2395,13 @@ bool CSSPropertyParser::parseColorFromValue(const CSSParserValue* value, RGBA32&
|
| return true;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseReflect()
|
| +RawPtr<CSSValue> CSSPropertyParser::parseReflect()
|
| {
|
| // box-reflect: <direction> <offset> <mask>
|
|
|
| // Direction comes first.
|
| CSSParserValue* val = m_valueList->current();
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> direction = nullptr;
|
| + RawPtr<CSSPrimitiveValue> direction = nullptr;
|
| switch (val->id) {
|
| case CSSValueAbove:
|
| case CSSValueBelow:
|
| @@ -2415,7 +2415,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseReflect()
|
|
|
| // The offset comes next.
|
| val = m_valueList->next();
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> offset = nullptr;
|
| + RawPtr<CSSPrimitiveValue> offset = nullptr;
|
| if (!val)
|
| offset = cssValuePool().createValue(0, CSSPrimitiveValue::UnitType::Pixels);
|
| else {
|
| @@ -2425,7 +2425,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseReflect()
|
| }
|
|
|
| // Now for the mask.
|
| - RefPtrWillBeRawPtr<CSSValue> mask = nullptr;
|
| + RawPtr<CSSValue> mask = nullptr;
|
| val = m_valueList->next();
|
| if (val) {
|
| mask = parseBorderImage(CSSPropertyWebkitBoxReflect);
|
| @@ -2462,7 +2462,7 @@ public:
|
| bool allowWidth() const { return m_allowWidth; }
|
| bool requireOutset() const { return m_requireOutset; }
|
|
|
| - void commitImage(PassRefPtrWillBeRawPtr<CSSValue> image)
|
| + void commitImage(RawPtr<CSSValue> image)
|
| {
|
| m_image = image;
|
| m_canAdvance = true;
|
| @@ -2474,7 +2474,7 @@ public:
|
| m_allowImageSlice = !m_imageSlice;
|
| m_allowRepeat = !m_repeat;
|
| }
|
| - void commitImageSlice(PassRefPtrWillBeRawPtr<CSSBorderImageSliceValue> slice)
|
| + void commitImageSlice(RawPtr<CSSBorderImageSliceValue> slice)
|
| {
|
| m_imageSlice = slice;
|
| m_canAdvance = true;
|
| @@ -2503,7 +2503,7 @@ public:
|
| m_allowWidth = false;
|
| }
|
| }
|
| - void commitBorderWidth(PassRefPtrWillBeRawPtr<CSSQuadValue> width)
|
| + void commitBorderWidth(RawPtr<CSSQuadValue> width)
|
| {
|
| m_borderWidth = width;
|
| m_canAdvance = true;
|
| @@ -2515,7 +2515,7 @@ public:
|
| m_allowImage = !m_image;
|
| m_allowRepeat = !m_repeat;
|
| }
|
| - void commitBorderOutset(PassRefPtrWillBeRawPtr<CSSQuadValue> outset)
|
| + void commitBorderOutset(RawPtr<CSSQuadValue> outset)
|
| {
|
| m_outset = outset;
|
| m_canAdvance = true;
|
| @@ -2527,7 +2527,7 @@ public:
|
| m_allowImage = !m_image;
|
| m_allowRepeat = !m_repeat;
|
| }
|
| - void commitRepeat(PassRefPtrWillBeRawPtr<CSSValue> repeat)
|
| + void commitRepeat(RawPtr<CSSValue> repeat)
|
| {
|
| m_repeat = repeat;
|
| m_canAdvance = true;
|
| @@ -2540,7 +2540,7 @@ public:
|
| m_allowImage = !m_image;
|
| }
|
|
|
| - PassRefPtrWillBeRawPtr<CSSValue> commitCSSValue()
|
| + RawPtr<CSSValue> commitCSSValue()
|
| {
|
| return createBorderImageValue(m_image, m_imageSlice.get(), m_borderWidth.get(), m_outset.get(), m_repeat.get());
|
| }
|
| @@ -2556,12 +2556,12 @@ public:
|
| bool m_allowWidth;
|
| bool m_requireOutset;
|
|
|
| - RefPtrWillBeMember<CSSValue> m_image;
|
| - RefPtrWillBeMember<CSSBorderImageSliceValue> m_imageSlice;
|
| - RefPtrWillBeMember<CSSQuadValue> m_borderWidth;
|
| - RefPtrWillBeMember<CSSQuadValue> m_outset;
|
| + Member<CSSValue> m_image;
|
| + Member<CSSBorderImageSliceValue> m_imageSlice;
|
| + Member<CSSQuadValue> m_borderWidth;
|
| + Member<CSSQuadValue> m_outset;
|
|
|
| - RefPtrWillBeMember<CSSValue> m_repeat;
|
| + Member<CSSValue> m_repeat;
|
| };
|
|
|
| bool CSSPropertyParser::buildBorderImageParseContext(CSSPropertyID propId, BorderImageParseContext& context)
|
| @@ -2578,13 +2578,13 @@ bool CSSPropertyParser::buildBorderImageParseContext(CSSPropertyID propId, Borde
|
| context.commitImage(createCSSImageValueWithReferrer(val->string, m_context));
|
| } else if (val->m_unit == CSSParserValue::Function) {
|
| if (CSSPropertyParser::isGeneratedImage(val->function->id)) {
|
| - RefPtrWillBeRawPtr<CSSValue> value = nullptr;
|
| + RawPtr<CSSValue> value = nullptr;
|
| if (parseGeneratedImage(m_valueList, value))
|
| context.commitImage(value.release());
|
| else
|
| return false;
|
| } else if (val->function->id == CSSValueWebkitImageSet) {
|
| - RefPtrWillBeRawPtr<CSSValue> value = parseImageSet(m_valueList);
|
| + RawPtr<CSSValue> value = parseImageSet(m_valueList);
|
| if (value)
|
| context.commitImage(value.release());
|
| else
|
| @@ -2595,25 +2595,25 @@ bool CSSPropertyParser::buildBorderImageParseContext(CSSPropertyID propId, Borde
|
| }
|
|
|
| if (!context.canAdvance() && context.allowImageSlice()) {
|
| - RefPtrWillBeRawPtr<CSSBorderImageSliceValue> imageSlice = nullptr;
|
| + RawPtr<CSSBorderImageSliceValue> imageSlice = nullptr;
|
| if (parseBorderImageSlice(propId, imageSlice))
|
| context.commitImageSlice(imageSlice.release());
|
| }
|
|
|
| if (!context.canAdvance() && context.allowRepeat()) {
|
| - RefPtrWillBeRawPtr<CSSValue> repeat = nullptr;
|
| + RawPtr<CSSValue> repeat = nullptr;
|
| if (parseBorderImageRepeat(repeat))
|
| context.commitRepeat(repeat.release());
|
| }
|
|
|
| if (!context.canAdvance() && context.allowWidth()) {
|
| - RefPtrWillBeRawPtr<CSSQuadValue> borderWidth = nullptr;
|
| + RawPtr<CSSQuadValue> borderWidth = nullptr;
|
| if (parseBorderImageWidth(borderWidth))
|
| context.commitBorderWidth(borderWidth.release());
|
| }
|
|
|
| if (!context.canAdvance() && context.requireOutset()) {
|
| - RefPtrWillBeRawPtr<CSSQuadValue> borderOutset = nullptr;
|
| + RawPtr<CSSQuadValue> borderOutset = nullptr;
|
| if (parseBorderImageOutset(borderOutset))
|
| context.commitBorderOutset(borderOutset.release());
|
| }
|
| @@ -2627,7 +2627,7 @@ bool CSSPropertyParser::buildBorderImageParseContext(CSSPropertyID propId, Borde
|
| return context.allowCommit();
|
| }
|
|
|
| -void CSSPropertyParser::commitBorderImageProperty(CSSPropertyID propId, PassRefPtrWillBeRawPtr<CSSValue> value, bool important)
|
| +void CSSPropertyParser::commitBorderImageProperty(CSSPropertyID propId, RawPtr<CSSValue> value, bool important)
|
| {
|
| if (value)
|
| addProperty(propId, value, important);
|
| @@ -2662,7 +2662,7 @@ bool CSSPropertyParser::parseBorderImageShorthand(CSSPropertyID propId, bool imp
|
| return false;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseBorderImage(CSSPropertyID propId)
|
| +RawPtr<CSSValue> CSSPropertyParser::parseBorderImage(CSSPropertyID propId)
|
| {
|
| BorderImageParseContext context;
|
| if (buildBorderImageParseContext(propId, context)) {
|
| @@ -2676,10 +2676,10 @@ static bool isBorderImageRepeatKeyword(int id)
|
| return id == CSSValueStretch || id == CSSValueRepeat || id == CSSValueSpace || id == CSSValueRound;
|
| }
|
|
|
| -bool CSSPropertyParser::parseBorderImageRepeat(RefPtrWillBeRawPtr<CSSValue>& result)
|
| +bool CSSPropertyParser::parseBorderImageRepeat(RawPtr<CSSValue>& result)
|
| {
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> firstValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> secondValue = nullptr;
|
| + RawPtr<CSSPrimitiveValue> firstValue = nullptr;
|
| + RawPtr<CSSPrimitiveValue> secondValue = nullptr;
|
| CSSParserValue* val = m_valueList->current();
|
| if (!val)
|
| return false;
|
| @@ -2723,7 +2723,7 @@ public:
|
| bool allowFinalCommit() const { return m_allowFinalCommit; }
|
| CSSPrimitiveValue* top() const { return m_top.get(); }
|
|
|
| - void commitNumber(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val)
|
| + void commitNumber(RawPtr<CSSPrimitiveValue> val)
|
| {
|
| if (!m_top)
|
| m_top = val;
|
| @@ -2742,7 +2742,7 @@ public:
|
|
|
| void commitFill() { m_fill = true; m_allowFill = false; m_allowNumber = !m_top; }
|
|
|
| - PassRefPtrWillBeRawPtr<CSSBorderImageSliceValue> commitBorderImageSlice()
|
| + RawPtr<CSSBorderImageSliceValue> commitBorderImageSlice()
|
| {
|
| // We need to clone and repeat values for any omissions.
|
| ASSERT(m_top);
|
| @@ -2766,15 +2766,15 @@ private:
|
| bool m_allowFill;
|
| bool m_allowFinalCommit;
|
|
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_top;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_right;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_bottom;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_left;
|
| + Member<CSSPrimitiveValue> m_top;
|
| + Member<CSSPrimitiveValue> m_right;
|
| + Member<CSSPrimitiveValue> m_bottom;
|
| + Member<CSSPrimitiveValue> m_left;
|
|
|
| bool m_fill;
|
| };
|
|
|
| -bool CSSPropertyParser::parseBorderImageSlice(CSSPropertyID propId, RefPtrWillBeRawPtr<CSSBorderImageSliceValue>& result)
|
| +bool CSSPropertyParser::parseBorderImageSlice(CSSPropertyID propId, RawPtr<CSSBorderImageSliceValue>& result)
|
| {
|
| BorderImageSliceParseContext context;
|
| for (CSSParserValue* val = m_valueList->current(); val; val = m_valueList->next()) {
|
| @@ -2821,7 +2821,7 @@ public:
|
| bool allowFinalCommit() const { return m_allowFinalCommit; }
|
| CSSPrimitiveValue* top() const { return m_top.get(); }
|
|
|
| - void commitNumber(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val)
|
| + void commitNumber(RawPtr<CSSPrimitiveValue> val)
|
| {
|
| if (!m_top)
|
| m_top = val;
|
| @@ -2838,9 +2838,9 @@ public:
|
| m_allowFinalCommit = true;
|
| }
|
|
|
| - void setTop(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_top = val; }
|
| + void setTop(RawPtr<CSSPrimitiveValue> val) { m_top = val; }
|
|
|
| - PassRefPtrWillBeRawPtr<CSSQuadValue> commitBorderImageQuad()
|
| + RawPtr<CSSQuadValue> commitBorderImageQuad()
|
| {
|
| // We need to clone and repeat values for any omissions.
|
| ASSERT(m_top);
|
| @@ -2863,13 +2863,13 @@ private:
|
| bool m_allowNumber;
|
| bool m_allowFinalCommit;
|
|
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_top;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_right;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_bottom;
|
| - RefPtrWillBeMember<CSSPrimitiveValue> m_left;
|
| + Member<CSSPrimitiveValue> m_top;
|
| + Member<CSSPrimitiveValue> m_right;
|
| + Member<CSSPrimitiveValue> m_bottom;
|
| + Member<CSSPrimitiveValue> m_left;
|
| };
|
|
|
| -bool CSSPropertyParser::parseBorderImageQuad(Units validUnits, RefPtrWillBeRawPtr<CSSQuadValue>& result)
|
| +bool CSSPropertyParser::parseBorderImageQuad(Units validUnits, RawPtr<CSSQuadValue>& result)
|
| {
|
| BorderImageQuadParseContext context;
|
| for (CSSParserValue* val = m_valueList->current(); val; val = m_valueList->next()) {
|
| @@ -2896,20 +2896,20 @@ bool CSSPropertyParser::parseBorderImageQuad(Units validUnits, RefPtrWillBeRawPt
|
| return false;
|
| }
|
|
|
| -bool CSSPropertyParser::parseBorderImageWidth(RefPtrWillBeRawPtr<CSSQuadValue>& result)
|
| +bool CSSPropertyParser::parseBorderImageWidth(RawPtr<CSSQuadValue>& result)
|
| {
|
| return parseBorderImageQuad(FLength | FNumber | FNonNeg | FPercent, result);
|
| }
|
|
|
| -bool CSSPropertyParser::parseBorderImageOutset(RefPtrWillBeRawPtr<CSSQuadValue>& result)
|
| +bool CSSPropertyParser::parseBorderImageOutset(RawPtr<CSSQuadValue>& result)
|
| {
|
| return parseBorderImageQuad(FLength | FNumber | FNonNeg, result);
|
| }
|
|
|
| // This should go away once we drop support for -webkit-gradient
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CSSParserValue* a, bool horizontal)
|
| +static RawPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CSSParserValue* a, bool horizontal)
|
| {
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> result = nullptr;
|
| + RawPtr<CSSPrimitiveValue> result = nullptr;
|
| if (a->m_unit == CSSParserValue::Identifier) {
|
| if ((a->id == CSSValueLeft && horizontal)
|
| || (a->id == CSSValueTop && !horizontal))
|
| @@ -2926,7 +2926,7 @@ static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CS
|
| }
|
|
|
| // Used to parse colors for -webkit-gradient(...).
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseDeprecatedGradientStopColor(const CSSParserValue* value)
|
| +RawPtr<CSSValue> CSSPropertyParser::parseDeprecatedGradientStopColor(const CSSParserValue* value)
|
| {
|
| // Disallow currentcolor.
|
| if (value->id == CSSValueCurrentcolor)
|
| @@ -2988,7 +2988,7 @@ bool CSSPropertyParser::parseDeprecatedGradientColorStop(CSSParserValue* a, CSSG
|
| return true;
|
| }
|
|
|
| -bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& gradient)
|
| +bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, RawPtr<CSSValue>& gradient)
|
| {
|
| // Walk the arguments.
|
| CSSParserValueList* args = valueList->current()->function->args.get();
|
| @@ -3007,7 +3007,7 @@ bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, R
|
| else
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSGradientValue> result = nullptr;
|
| + RawPtr<CSSGradientValue> result = nullptr;
|
| switch (gradientType) {
|
| case CSSDeprecatedLinearGradient:
|
| result = CSSLinearGradientValue::create(NonRepeating, gradientType);
|
| @@ -3030,7 +3030,7 @@ bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, R
|
| a = args->current();
|
| if (!a)
|
| return false;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> point = parseDeprecatedGradientPoint(a, true);
|
| + RawPtr<CSSPrimitiveValue> point = parseDeprecatedGradientPoint(a, true);
|
| if (!point)
|
| return false;
|
| result->setFirstX(point.release());
|
| @@ -3121,7 +3121,7 @@ bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, R
|
| return true;
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueFromSideKeyword(CSSParserValue* a, bool& isHorizontal)
|
| +static RawPtr<CSSPrimitiveValue> valueFromSideKeyword(CSSParserValue* a, bool& isHorizontal)
|
| {
|
| if (a->m_unit != CSSParserValue::Identifier)
|
| return nullptr;
|
| @@ -3141,9 +3141,9 @@ static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueFromSideKeyword(CSSParserV
|
| return cssValuePool().createIdentifierValue(a->id);
|
| }
|
|
|
| -bool CSSPropertyParser::parseDeprecatedLinearGradient(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
|
| +bool CSSPropertyParser::parseDeprecatedLinearGradient(CSSParserValueList* valueList, RawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
|
| {
|
| - RefPtrWillBeRawPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSPrefixedLinearGradient);
|
| + RawPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSPrefixedLinearGradient);
|
|
|
| // Walk the arguments.
|
| CSSParserValueList* args = valueList->current()->function->args.get();
|
| @@ -3163,10 +3163,10 @@ bool CSSPropertyParser::parseDeprecatedLinearGradient(CSSParserValueList* valueL
|
| expectComma = true;
|
| } else {
|
| // Look one or two optional keywords that indicate a side or corner.
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> startX = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> startY = nullptr;
|
| + RawPtr<CSSPrimitiveValue> startX = nullptr;
|
| + RawPtr<CSSPrimitiveValue> startY = nullptr;
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> location = nullptr;
|
| + RawPtr<CSSPrimitiveValue> location = nullptr;
|
| bool isHorizontal = false;
|
| if ((location = valueFromSideKeyword(a, isHorizontal))) {
|
| if (isHorizontal)
|
| @@ -3211,9 +3211,9 @@ bool CSSPropertyParser::parseDeprecatedLinearGradient(CSSParserValueList* valueL
|
| return true;
|
| }
|
|
|
| -bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
|
| +bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueList, RawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
|
| {
|
| - RefPtrWillBeRawPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSPrefixedRadialGradient);
|
| + RawPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSPrefixedRadialGradient);
|
|
|
| // Walk the arguments.
|
| CSSParserValueList* args = valueList->current()->function->args.get();
|
| @@ -3227,8 +3227,8 @@ bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueL
|
| bool expectComma = false;
|
|
|
| // Optional background-position
|
| - RefPtrWillBeRawPtr<CSSValue> centerX = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> centerY = nullptr;
|
| + RawPtr<CSSValue> centerX = nullptr;
|
| + RawPtr<CSSValue> centerY = nullptr;
|
| // parse2ValuesFillPosition advances the args next pointer.
|
| parse2ValuesFillPosition(args, centerX, centerY);
|
|
|
| @@ -3245,8 +3245,8 @@ bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueL
|
| result->setFirstY(toCSSPrimitiveValue(centerY.get()));
|
| result->setSecondY(toCSSPrimitiveValue(centerY.get()));
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> shapeValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> sizeValue = nullptr;
|
| + RawPtr<CSSPrimitiveValue> shapeValue = nullptr;
|
| + RawPtr<CSSPrimitiveValue> sizeValue = nullptr;
|
|
|
| // Optional shape and/or size in any order.
|
| for (int i = 0; i < 2; ++i) {
|
| @@ -3286,8 +3286,8 @@ bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueL
|
| result->setSizingBehavior(sizeValue);
|
|
|
| // Or, two lengths or percentages
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalSize = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalSize = nullptr;
|
| + RawPtr<CSSPrimitiveValue> horizontalSize = nullptr;
|
| + RawPtr<CSSPrimitiveValue> verticalSize = nullptr;
|
|
|
| if (!shapeValue && !sizeValue) {
|
| if (validUnit(a, FLength | FPercent)) {
|
| @@ -3323,9 +3323,9 @@ bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueL
|
| return true;
|
| }
|
|
|
| -bool CSSPropertyParser::parseLinearGradient(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
|
| +bool CSSPropertyParser::parseLinearGradient(CSSParserValueList* valueList, RawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
|
| {
|
| - RefPtrWillBeRawPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSLinearGradient);
|
| + RawPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSLinearGradient);
|
|
|
| CSSParserFunction* function = valueList->current()->function;
|
| CSSParserValueList* args = function->args.get();
|
| @@ -3349,9 +3349,9 @@ bool CSSPropertyParser::parseLinearGradient(CSSParserValueList* valueList, RefPt
|
| if (!a)
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> endX = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> endY = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> location = nullptr;
|
| + RawPtr<CSSPrimitiveValue> endX = nullptr;
|
| + RawPtr<CSSPrimitiveValue> endY = nullptr;
|
| + RawPtr<CSSPrimitiveValue> location = nullptr;
|
| bool isHorizontal = false;
|
|
|
| location = valueFromSideKeyword(a, isHorizontal);
|
| @@ -3397,9 +3397,9 @@ bool CSSPropertyParser::parseLinearGradient(CSSParserValueList* valueList, RefPt
|
| return true;
|
| }
|
|
|
| -bool CSSPropertyParser::parseRadialGradient(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
|
| +bool CSSPropertyParser::parseRadialGradient(CSSParserValueList* valueList, RawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
|
| {
|
| - RefPtrWillBeRawPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSRadialGradient);
|
| + RawPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSRadialGradient);
|
|
|
| CSSParserValueList* args = valueList->current()->function->args.get();
|
| if (!args || !args->size())
|
| @@ -3411,10 +3411,10 @@ bool CSSPropertyParser::parseRadialGradient(CSSParserValueList* valueList, RefPt
|
|
|
| bool expectComma = false;
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> shapeValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> sizeValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalSize = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalSize = nullptr;
|
| + RawPtr<CSSPrimitiveValue> shapeValue = nullptr;
|
| + RawPtr<CSSPrimitiveValue> sizeValue = nullptr;
|
| + RawPtr<CSSPrimitiveValue> horizontalSize = nullptr;
|
| + RawPtr<CSSPrimitiveValue> verticalSize = nullptr;
|
|
|
| // First part of grammar, the size/shape clause:
|
| // [ circle || <length> ] |
|
| @@ -3489,8 +3489,8 @@ bool CSSPropertyParser::parseRadialGradient(CSSParserValueList* valueList, RefPt
|
|
|
| // Second part of grammar, the center-position clause:
|
| // at <position>
|
| - RefPtrWillBeRawPtr<CSSValue> centerX = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> centerY = nullptr;
|
| + RawPtr<CSSValue> centerX = nullptr;
|
| + RawPtr<CSSValue> centerY = nullptr;
|
| if (a->m_unit == CSSParserValue::Identifier && a->id == CSSValueAt) {
|
| a = args->next();
|
| if (!a)
|
| @@ -3577,7 +3577,7 @@ bool CSSPropertyParser::parseGradientColorStops(CSSParserValueList* valueList, C
|
| return gradient->stopCount() >= 2;
|
| }
|
|
|
| -bool CSSPropertyParser::parseGeneratedImage(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& value)
|
| +bool CSSPropertyParser::parseGeneratedImage(CSSParserValueList* valueList, RawPtr<CSSValue>& value)
|
| {
|
| CSSParserValue* val = valueList->current();
|
|
|
| @@ -3636,14 +3636,14 @@ bool CSSPropertyParser::parseGeneratedImage(CSSParserValueList* valueList, RefPt
|
| return false;
|
| }
|
|
|
| -bool CSSPropertyParser::parseCrossfade(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& crossfade)
|
| +bool CSSPropertyParser::parseCrossfade(CSSParserValueList* valueList, RawPtr<CSSValue>& crossfade)
|
| {
|
| // Walk the arguments.
|
| CSSParserValueList* args = valueList->current()->function->args.get();
|
| if (!args || args->size() != 5)
|
| return false;
|
| - RefPtrWillBeRawPtr<CSSValue> fromImageValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSValue> toImageValue = nullptr;
|
| + RawPtr<CSSValue> fromImageValue = nullptr;
|
| + RawPtr<CSSValue> toImageValue = nullptr;
|
|
|
| // The first argument is the "from" image. It is a fill image.
|
| if (!args->current() || !parseFillImage(args, fromImageValue))
|
| @@ -3662,7 +3662,7 @@ bool CSSPropertyParser::parseCrossfade(CSSParserValueList* valueList, RefPtrWill
|
| return false;
|
|
|
| // The third argument is the crossfade value. It is a percentage or a fractional number.
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> percentage = nullptr;
|
| + RawPtr<CSSPrimitiveValue> percentage = nullptr;
|
| CSSParserValue* value = args->current();
|
| if (!value)
|
| return false;
|
| @@ -3679,7 +3679,7 @@ bool CSSPropertyParser::parseCrossfade(CSSParserValueList* valueList, RefPtrWill
|
| return true;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseImageSet(CSSParserValueList* valueList)
|
| +RawPtr<CSSValue> CSSPropertyParser::parseImageSet(CSSParserValueList* valueList)
|
| {
|
| CSSParserValue* function = valueList->current();
|
|
|
| @@ -3690,14 +3690,14 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseImageSet(CSSParserValue
|
| if (!functionArgs || !functionArgs->size() || !functionArgs->current())
|
| return nullptr;
|
|
|
| - RefPtrWillBeRawPtr<CSSImageSetValue> imageSet = CSSImageSetValue::create();
|
| + RawPtr<CSSImageSetValue> imageSet = CSSImageSetValue::create();
|
|
|
| while (functionArgs->current()) {
|
| CSSParserValue* arg = functionArgs->current();
|
| if (arg->m_unit != CSSParserValue::URI)
|
| return nullptr;
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> image = createCSSImageValueWithReferrer(arg->string, m_context);
|
| + RawPtr<CSSValue> image = createCSSImageValueWithReferrer(arg->string, m_context);
|
| imageSet->append(image);
|
|
|
| arg = functionArgs->next();
|
|
|