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

Unified Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 1303173007: Oilpan: Unship Oilpan from CSSValues Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.h ('k') | Source/core/css/parser/CSSPropertyParserTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 297c950f6a625605f17ba5efa562749525af51b1..425cea4243d6e319a58db215a6e4d67a8d603b9f 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -75,13 +75,13 @@ static bool equalIgnoringCase(const CSSParserString& a, const char (&b)[N])
return a.is8Bit() ? WTF::equalIgnoringCase(b, a.characters8(), length) : WTF::equalIgnoringCase(b, a.characters16(), length);
}
-static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createPrimitiveValuePair(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> first, PassRefPtrWillBeRawPtr<CSSPrimitiveValue> second, Pair::IdenticalValuesPolicy identicalValuesPolicy = Pair::DropIdenticalValues)
+static PassRefPtr<CSSPrimitiveValue> createPrimitiveValuePair(PassRefPtr<CSSPrimitiveValue> first, PassRefPtr<CSSPrimitiveValue> second, Pair::IdenticalValuesPolicy identicalValuesPolicy = Pair::DropIdenticalValues)
{
return cssValuePool().createValue(Pair::create(first, second, identicalValuesPolicy));
}
CSSPropertyParser::CSSPropertyParser(CSSParserValueList* valueList,
- const CSSParserContext& context, WillBeHeapVector<CSSProperty, 256>& parsedProperties,
+ const CSSParserContext& context, Vector<CSSProperty, 256>& parsedProperties,
StyleRule::Type ruleType)
: m_valueList(valueList)
, m_context(context)
@@ -95,7 +95,7 @@ CSSPropertyParser::CSSPropertyParser(CSSParserValueList* valueList,
bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool important,
CSSParserValueList* valueList, const CSSParserContext& context,
- WillBeHeapVector<CSSProperty, 256>& parsedProperties, StyleRule::Type ruleType)
+ Vector<CSSProperty, 256>& parsedProperties, StyleRule::Type ruleType)
{
int parsedPropertiesSize = parsedProperties.size();
@@ -122,7 +122,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
return parseSuccess;
}
-void CSSPropertyParser::addProperty(CSSPropertyID propId, PassRefPtrWillBeRawPtr<CSSValue> value, bool important, bool implicit)
+void CSSPropertyParser::addProperty(CSSPropertyID propId, PassRefPtr<CSSValue> value, bool important, bool implicit)
{
ASSERT(!isPropertyAlias(propId));
@@ -293,7 +293,7 @@ bool CSSPropertyParser::validUnit(CSSParserValue* value, Units unitflags, CSSPar
}
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveNumericValue(CSSParserValue* value)
+PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveNumericValue(CSSParserValue* value)
{
if (m_parsedCalculation) {
ASSERT(isCalculation(value));
@@ -307,21 +307,21 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveNume
return cssValuePool().createValue(value->fValue, value->unit());
}
-inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveStringValue(CSSParserValue* value)
+inline PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveStringValue(CSSParserValue* value)
{
ASSERT(value->unit() == CSSPrimitiveValue::UnitType::String || value->m_unit == CSSParserValue::Identifier);
return cssValuePool().createValue(value->string, CSSPrimitiveValue::UnitType::String);
}
-inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveCustomIdentValue(CSSParserValue* value)
+inline PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveCustomIdentValue(CSSParserValue* value)
{
ASSERT(value->unit() == CSSPrimitiveValue::UnitType::String || value->m_unit == CSSParserValue::Identifier);
return cssValuePool().createValue(value->string, CSSPrimitiveValue::UnitType::CustomIdentifier);
}
-inline PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::createCSSImageValueWithReferrer(const String& rawValue, const KURL& url)
+inline PassRefPtr<CSSValue> CSSPropertyParser::createCSSImageValueWithReferrer(const String& rawValue, const KURL& url)
{
- RefPtrWillBeRawPtr<CSSValue> imageValue = CSSImageValue::create(rawValue, url);
+ RefPtr<CSSValue> imageValue = CSSImageValue::create(rawValue, url);
toCSSImageValue(imageValue.get())->setReferrer(m_context.referrer());
return imageValue;
}
@@ -401,7 +401,7 @@ bool CSSPropertyParser::validWidthOrHeight(CSSParserValue* value, Units unitless
return validUnit(value, FLength | FPercent | FNonNeg | unitless);
}
-inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPrimitive(CSSValueID identifier, CSSParserValue* value)
+inline PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPrimitive(CSSValueID identifier, CSSParserValue* value)
{
if (identifier)
return cssValuePool().createIdentifierValue(identifier);
@@ -421,7 +421,7 @@ inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseValidPr
return nullptr;
}
-void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtrWillBeRawPtr<CSSValue> prpValue, bool important)
+void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, PassRefPtr<CSSValue> prpValue, bool important)
{
const StylePropertyShorthand& shorthand = shorthandForProperty(propId);
unsigned shorthandLength = shorthand.length();
@@ -430,7 +430,7 @@ void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, PassRe
return;
}
- RefPtrWillBeRawPtr<CSSValue> value = prpValue;
+ RefPtr<CSSValue> value = prpValue;
ShorthandScope scope(this, propId);
const CSSPropertyID* longhands = shorthand.properties();
for (unsigned i = 0; i < shorthandLength; ++i)
@@ -477,7 +477,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
bool validPrimitive = false;
Units unitless = FUnknown;
- RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
+ RefPtr<CSSValue> parsedValue = nullptr;
switch (propId) {
case CSSPropertySize: // <length>{1,2} | auto | [ <page-size> || [ portrait | landscape] ]
@@ -509,7 +509,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
if (!parseValue(CSSPropertyOverflowY, important) || m_valueList->current())
return false;
- RefPtrWillBeRawPtr<CSSValue> overflowXValue = nullptr;
+ RefPtr<CSSValue> overflowXValue = nullptr;
// FIXME: -webkit-paged-x or -webkit-paged-y only apply to overflow-y. If this value has been
// set using the shorthand, then for now overflow-x will default to auto, but once we implement
@@ -592,9 +592,9 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
// ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | text | wait | help |
// vertical-text | cell | context-menu | alias | copy | no-drop | not-allowed | all-scroll |
// zoom-in | zoom-out | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out ] ] | inherit
- RefPtrWillBeRawPtr<CSSValueList> list = nullptr;
+ RefPtr<CSSValueList> list = nullptr;
while (value) {
- RefPtrWillBeRawPtr<CSSValue> image = nullptr;
+ RefPtr<CSSValue> image = nullptr;
if (value->unit() == CSSPrimitiveValue::UnitType::URI) {
String uri = value->string;
if (!uri.isNull())
@@ -692,8 +692,8 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyWebkitMaskRepeatX:
case CSSPropertyWebkitMaskRepeatY:
{
- RefPtrWillBeRawPtr<CSSValue> val1 = nullptr;
- RefPtrWillBeRawPtr<CSSValue> val2 = nullptr;
+ RefPtr<CSSValue> val1 = nullptr;
+ RefPtr<CSSValue> val2 = nullptr;
CSSPropertyID propId1, propId2;
bool result = false;
if (parseFillProperty(unresolvedProperty, propId1, propId2, val1, val2)) {
@@ -924,7 +924,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyWebkitMaskBoxImage:
return parseBorderImageShorthand(propId, important);
case CSSPropertyWebkitBorderImage: {
- if (RefPtrWillBeRawPtr<CSSValue> result = parseBorderImage(propId)) {
+ if (RefPtr<CSSValue> result = parseBorderImage(propId)) {
addProperty(propId, result, important);
return true;
}
@@ -933,7 +933,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyBorderImageOutset:
case CSSPropertyWebkitMaskBoxImageOutset: {
- RefPtrWillBeRawPtr<CSSPrimitiveValue> result = nullptr;
+ RefPtr<CSSPrimitiveValue> result = nullptr;
if (parseBorderImageOutset(result)) {
addProperty(propId, result, important);
return true;
@@ -942,7 +942,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
}
case CSSPropertyBorderImageRepeat:
case CSSPropertyWebkitMaskBoxImageRepeat: {
- RefPtrWillBeRawPtr<CSSValue> result = nullptr;
+ RefPtr<CSSValue> result = nullptr;
if (parseBorderImageRepeat(result)) {
addProperty(propId, result, important);
return true;
@@ -951,7 +951,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
}
case CSSPropertyBorderImageSlice:
case CSSPropertyWebkitMaskBoxImageSlice: {
- RefPtrWillBeRawPtr<CSSBorderImageSliceValue> result = nullptr;
+ RefPtr<CSSBorderImageSliceValue> result = nullptr;
if (parseBorderImageSlice(propId, result)) {
addProperty(propId, result, important);
return true;
@@ -960,7 +960,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
}
case CSSPropertyBorderImageWidth:
case CSSPropertyWebkitMaskBoxImageWidth: {
- RefPtrWillBeRawPtr<CSSPrimitiveValue> result = nullptr;
+ RefPtr<CSSPrimitiveValue> result = nullptr;
if (parseBorderImageWidth(result)) {
addProperty(propId, result, important);
return true;
@@ -974,8 +974,8 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
validPrimitive = validUnit(value, FLength | FPercent | FNonNeg);
if (!validPrimitive)
return false;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue1 = createPrimitiveNumericValue(value);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue2 = nullptr;
+ RefPtr<CSSPrimitiveValue> parsedValue1 = createPrimitiveNumericValue(value);
+ RefPtr<CSSPrimitiveValue> parsedValue2 = nullptr;
value = m_valueList->next();
if (value) {
validPrimitive = validUnit(value, FLength | FPercent | FNonNeg);
@@ -1005,7 +1005,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
if (id == CSSValueNone)
validPrimitive = true;
else {
- RefPtrWillBeRawPtr<CSSValueList> shadowValueList = parseShadow(m_valueList, propId);
+ RefPtr<CSSValueList> shadowValueList = parseShadow(m_valueList, propId);
if (shadowValueList) {
addProperty(propId, shadowValueList.release(), important);
m_valueList->next();
@@ -1038,7 +1038,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
if (id == CSSValueNone)
validPrimitive = true;
else {
- RefPtrWillBeRawPtr<CSSValue> val = parseFilter();
+ RefPtr<CSSValue> val = parseFilter();
if (val) {
addProperty(propId, val, important);
return true;
@@ -1077,7 +1077,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
parsedValue = parseTransform(unresolvedProperty == CSSPropertyAliasWebkitTransform);
break;
case CSSPropertyTransformOrigin: {
- RefPtrWillBeRawPtr<CSSValueList> list = parseTransformOrigin();
+ RefPtr<CSSValueList> list = parseTransformOrigin();
if (!list)
return false;
// These values are added to match gecko serialization.
@@ -1093,7 +1093,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
// translate : [ <length> | <percentage> ] [[ <length> | <percentage> ] <length>? ]?
// defaults to 0 on all axis, note that the last value CANNOT be a percentage
ASSERT(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled());
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (!validUnit(value, FLength | FPercent))
return false;
@@ -1122,7 +1122,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyRotate: { // rotate : <angle> <number>{3}? defaults to a 0 0 1
ASSERT(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled());
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (!validUnit(value, FAngle))
return false;
@@ -1147,7 +1147,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
case CSSPropertyScale: { // scale: <number>{1,3}, default scale for all axis is 1
ASSERT(RuntimeEnabledFeatures::cssIndependentTransformPropertiesEnabled());
- RefPtrWillBeRawPtr<CSSValueList> scaleList = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> scaleList = CSSValueList::createSpaceSeparated();
for (unsigned i = 0; value && i < 3; i++) { // up to 3 dimensions of scale
if (!validUnit(value, FNumber))
@@ -1188,7 +1188,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
}
break;
case CSSPropertyPerspectiveOrigin: {
- RefPtrWillBeRawPtr<CSSValueList> list = parseTransformOrigin();
+ RefPtr<CSSValueList> list = parseTransformOrigin();
if (!list || list->length() == 3)
return false;
// This values are added to match gecko serialization.
@@ -1570,14 +1570,14 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
return false;
}
-void CSSPropertyParser::addFillValue(RefPtrWillBeRawPtr<CSSValue>& lval, PassRefPtrWillBeRawPtr<CSSValue> rval)
+void CSSPropertyParser::addFillValue(RefPtr<CSSValue>& lval, PassRefPtr<CSSValue> rval)
{
if (lval) {
if (lval->isBaseValueList())
toCSSValueList(lval.get())->append(rval);
else {
- PassRefPtrWillBeRawPtr<CSSValue> oldlVal(lval.release());
- PassRefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ PassRefPtr<CSSValue> oldlVal(lval.release());
+ PassRefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
list->append(oldlVal);
list->append(rval);
lval = list;
@@ -1587,7 +1587,7 @@ void CSSPropertyParser::addFillValue(RefPtrWillBeRawPtr<CSSValue>& lval, PassRef
lval = rval;
}
-static bool parseBackgroundClip(CSSParserValue* parserValue, RefPtrWillBeRawPtr<CSSValue>& cssValue)
+static bool parseBackgroundClip(CSSParserValue* parserValue, RefPtr<CSSValue>& cssValue)
{
if (parserValue->id == CSSValueBorderBox || parserValue->id == CSSValuePaddingBox
|| parserValue->id == CSSValueContentBox || parserValue->id == CSSValueWebkitText) {
@@ -1608,14 +1608,14 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
ShorthandScope scope(this, propId);
bool parsedProperty[cMaxFillProperties] = { false };
- RefPtrWillBeRawPtr<CSSValue> values[cMaxFillProperties];
+ RefPtr<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;
+ RefPtr<CSSValue> clipValue = nullptr;
+ RefPtr<CSSValue> positionYValue = nullptr;
+ RefPtr<CSSValue> repeatYValue = nullptr;
bool foundClip = false;
int i;
bool foundPositionCSSProperty = false;
@@ -1664,8 +1664,8 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
continue;
if (!parsedProperty[i]) {
- RefPtrWillBeRawPtr<CSSValue> val1 = nullptr;
- RefPtrWillBeRawPtr<CSSValue> val2 = nullptr;
+ RefPtr<CSSValue> val1 = nullptr;
+ RefPtr<CSSValue> val2 = nullptr;
CSSPropertyID propId1, propId2;
CSSParserValue* parserValue = m_valueList->current();
// parseFillProperty() may modify m_implicitShorthand, so we MUST reset it
@@ -1781,7 +1781,7 @@ bool CSSPropertyParser::parseAnimationShorthand(bool useLegacyparsing, bool impo
ShorthandScope scope(this, CSSPropertyAnimation);
bool parsedProperty[numProperties] = { false };
- RefPtrWillBeRawPtr<CSSValueList> values[numProperties];
+ RefPtr<CSSValueList> values[numProperties];
for (size_t i = 0; i < numProperties; ++i)
values[i] = CSSValueList::createCommaSeparated();
@@ -1801,7 +1801,7 @@ bool CSSPropertyParser::parseAnimationShorthand(bool useLegacyparsing, bool impo
for (size_t i = 0; i < numProperties; ++i) {
if (parsedProperty[i])
continue;
- if (RefPtrWillBeRawPtr<CSSValue> val = parseAnimationProperty(animationProperties.properties()[i], useLegacyparsing)) {
+ if (RefPtr<CSSValue> val = parseAnimationProperty(animationProperties.properties()[i], useLegacyparsing)) {
parsedProperty[i] = found = true;
values[i]->append(val.release());
break;
@@ -1834,7 +1834,7 @@ bool CSSPropertyParser::parseTransitionShorthand(bool important)
ShorthandScope scope(this, CSSPropertyTransition);
bool parsedProperty[numProperties] = { false };
- RefPtrWillBeRawPtr<CSSValueList> values[numProperties];
+ RefPtr<CSSValueList> values[numProperties];
for (size_t i = 0; i < numProperties; ++i)
values[i] = CSSValueList::createCommaSeparated();
@@ -1854,7 +1854,7 @@ bool CSSPropertyParser::parseTransitionShorthand(bool important)
for (size_t i = 0; i < numProperties; ++i) {
if (parsedProperty[i])
continue;
- if (RefPtrWillBeRawPtr<CSSValue> val = parseAnimationProperty(shorthand.properties()[i], false)) {
+ if (RefPtr<CSSValue> val = parseAnimationProperty(shorthand.properties()[i], false)) {
parsedProperty[i] = found = true;
values[i]->append(val.release());
break;
@@ -1881,24 +1881,24 @@ bool CSSPropertyParser::parseTransitionShorthand(bool important)
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseColumnWidth()
+PassRefPtr<CSSValue> CSSPropertyParser::parseColumnWidth()
{
CSSParserValue* value = m_valueList->current();
// Always parse lengths in strict mode here, since it would be ambiguous otherwise when used in
// the 'columns' shorthand property.
if (value->id == CSSValueAuto || (validUnit(value, FLength | FNonNeg, HTMLStandardMode) && (m_parsedCalculation || value->fValue != 0))) {
- RefPtrWillBeRawPtr<CSSValue> parsedValue = parseValidPrimitive(value->id, value);
+ RefPtr<CSSValue> parsedValue = parseValidPrimitive(value->id, value);
m_valueList->next();
return parsedValue;
}
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseColumnCount()
+PassRefPtr<CSSValue> CSSPropertyParser::parseColumnCount()
{
CSSParserValue* value = m_valueList->current();
if (value->id == CSSValueAuto || validUnit(value, FPositiveInteger)) {
- RefPtrWillBeRawPtr<CSSValue> parsedValue = parseValidPrimitive(value->id, value);
+ RefPtr<CSSValue> parsedValue = parseValidPrimitive(value->id, value);
m_valueList->next();
return parsedValue;
}
@@ -1907,8 +1907,8 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseColumnCount()
bool CSSPropertyParser::parseColumnsShorthand(bool important)
{
- RefPtrWillBeRawPtr<CSSValue> columnWidth = nullptr;
- RefPtrWillBeRawPtr<CSSValue> columnCount = nullptr;
+ RefPtr<CSSValue> columnWidth = nullptr;
+ RefPtr<CSSValue> columnCount = nullptr;
bool hasPendingExplicitAuto = false;
for (unsigned propertiesParsed = 0; CSSParserValue* value = m_valueList->current(); propertiesParsed++) {
@@ -2065,7 +2065,7 @@ bool CSSPropertyParser::parse4Values(CSSPropertyID propId, const CSSPropertyID *
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollSnapPoints()
+PassRefPtr<CSSValue> CSSPropertyParser::parseScrollSnapPoints()
{
CSSParserValue* value = m_valueList->current();
@@ -2082,7 +2082,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollSnapPoints()
CSSParserValue* repeatValue = arguments->valueAt(0);
if (validUnit(repeatValue, FNonNeg | FLength | FPercent) && (m_parsedCalculation || repeatValue->fValue > 0)) {
- RefPtrWillBeRawPtr<CSSFunctionValue> result = CSSFunctionValue::create(CSSValueRepeat);
+ RefPtr<CSSFunctionValue> result = CSSFunctionValue::create(CSSValueRepeat);
result->append(parseValidPrimitive(repeatValue->id, repeatValue));
m_valueList->next();
return result.release();
@@ -2092,7 +2092,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollSnapPoints()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollSnapCoordinate()
+PassRefPtr<CSSValue> CSSPropertyParser::parseScrollSnapCoordinate()
{
if (m_valueList->current()->id == CSSValueNone) {
m_valueList->next();
@@ -2102,7 +2102,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollSnapCoordinate()
return parsePositionList(m_valueList);
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parsePage()
+PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::parsePage()
{
CSSParserValue* value = m_valueList->current();
m_valueList->next();
@@ -2116,12 +2116,12 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parsePage()
}
// <length>{1,2} | auto | [ <page-size> || [ portrait | landscape] ]
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseSize()
+PassRefPtr<CSSValueList> CSSPropertyParser::parseSize()
{
CSSParserValue* value = m_valueList->current();
ASSERT(value);
- RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
// First parameter.
SizeParameterType paramType = parseSizeParameter(parsedValues.get(), value, None);
@@ -2182,11 +2182,11 @@ CSSPropertyParser::SizeParameterType CSSPropertyParser::parseSizeParameter(CSSVa
}
// [ <string> <string> ]+ | none, but none is handled in parseValue
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseQuotes()
+PassRefPtr<CSSValue> CSSPropertyParser::parseQuotes()
{
- RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
while (CSSParserValue* val = m_valueList->current()) {
- RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
+ RefPtr<CSSValue> parsedValue = nullptr;
if (val->unit() != CSSPrimitiveValue::UnitType::String)
return nullptr;
parsedValue = createPrimitiveStringValue(val);
@@ -2201,12 +2201,12 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseQuotes()
// [ <string> | <uri> | <counter> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
// in CSS 2.1 this got somewhat reduced:
// [ <string> | attr(X) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseContent()
+PassRefPtr<CSSValueList> CSSPropertyParser::parseContent()
{
- RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
while (CSSParserValue* val = m_valueList->current()) {
- RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
+ RefPtr<CSSValue> parsedValue = nullptr;
if (val->unit() == CSSPrimitiveValue::UnitType::URI) {
// url
parsedValue = createCSSImageValueWithReferrer(val->string, completeURL(val->string));
@@ -2251,7 +2251,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseContent()
return values.release();
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAttr(CSSParserValueList* args)
+PassRefPtr<CSSValue> CSSPropertyParser::parseAttr(CSSParserValueList* args)
{
if (args->size() != 1)
return nullptr;
@@ -2322,7 +2322,7 @@ bool CSSPropertyParser::isColorKeyword(CSSValueID id)
|| id == CSSValueMenu;
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseColor(const CSSParserValue* value, bool acceptQuirkyColors)
+PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::parseColor(const CSSParserValue* value, bool acceptQuirkyColors)
{
CSSValueID id = value->id;
if (isColorKeyword(id)) {
@@ -2336,7 +2336,7 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseColor(const CS
return cssValuePool().createColorValue(c);
}
-bool CSSPropertyParser::parseFillImage(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& value)
+bool CSSPropertyParser::parseFillImage(CSSParserValueList* valueList, RefPtr<CSSValue>& value)
{
if (valueList->current()->id == CSSValueNone) {
value = cssValuePool().createIdentifierValue(CSSValueNone);
@@ -2359,7 +2359,7 @@ bool CSSPropertyParser::parseFillImage(CSSParserValueList* valueList, RefPtrWill
return false;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillPositionX(CSSParserValueList* valueList)
+PassRefPtr<CSSValue> CSSPropertyParser::parseFillPositionX(CSSParserValueList* valueList)
{
int id = valueList->current()->id;
if (id == CSSValueLeft || id == CSSValueRight || id == CSSValueCenter) {
@@ -2375,7 +2375,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillPositionX(CSSParser
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillPositionY(CSSParserValueList* valueList)
+PassRefPtr<CSSValue> CSSPropertyParser::parseFillPositionY(CSSParserValueList* valueList)
{
int id = valueList->current()->id;
if (id == CSSValueTop || id == CSSValueBottom || id == CSSValueCenter) {
@@ -2391,7 +2391,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillPositionY(CSSParser
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseFillPositionComponent(CSSParserValueList* valueList, unsigned& cumulativeFlags, FillPositionFlag& individualFlag, FillPositionParsingMode parsingMode, Units unitless)
+PassRefPtr<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) {
@@ -2456,7 +2456,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, RefPtr<CSSValue>& value1, RefPtr<CSSValue>& value2, PassRefPtr<CSSPrimitiveValue> parsedValue1, PassRefPtr<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.
@@ -2465,7 +2465,7 @@ void CSSPropertyParser::parse4ValuesFillPosition(CSSParserValueList* valueList,
unsigned cumulativeFlags = 0;
FillPositionFlag value3Flag = InvalidFillPosition;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
+ RefPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
if (!value3)
return;
@@ -2488,7 +2488,7 @@ void CSSPropertyParser::parse4ValuesFillPosition(CSSParserValueList* valueList,
cumulativeFlags = 0;
FillPositionFlag value4Flag = InvalidFillPosition;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> value4 = parseFillPositionComponent(valueList, cumulativeFlags, value4Flag, ResolveValuesAsKeyword);
+ RefPtr<CSSPrimitiveValue> value4 = parseFillPositionComponent(valueList, cumulativeFlags, value4Flag, ResolveValuesAsKeyword);
if (!value4)
return;
@@ -2504,11 +2504,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, RefPtr<CSSValue>& value1, RefPtr<CSSValue>& value2, PassRefPtr<CSSPrimitiveValue> parsedValue1, PassRefPtr<CSSPrimitiveValue> parsedValue2)
{
unsigned cumulativeFlags = 0;
FillPositionFlag value3Flag = InvalidFillPosition;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
+ RefPtr<CSSPrimitiveValue> value3 = parseFillPositionComponent(valueList, cumulativeFlags, value3Flag, ResolveValuesAsKeyword);
// value3 is not an expected value, we return.
if (!value3)
@@ -2552,8 +2552,8 @@ void CSSPropertyParser::parse3ValuesFillPosition(CSSParserValueList* valueList,
value1 = createPrimitiveValuePair(parsedValue1, parsedValue2);
value2 = createPrimitiveValuePair(cssValuePool().createIdentifierValue(secondPositionKeyword), cssValuePool().createValue(50, CSSPrimitiveValue::UnitType::Percentage));
} else {
- RefPtrWillBeRawPtr<CSSPrimitiveValue> firstPositionValue = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> secondPositionValue = nullptr;
+ RefPtr<CSSPrimitiveValue> firstPositionValue = nullptr;
+ RefPtr<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> ].
@@ -2600,7 +2600,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, RefPtr<CSSValue>& value1, RefPtr<CSSValue>& value2, Units unitless)
{
unsigned numberOfValues = 0;
for (unsigned i = valueList->currentIndex(); i < valueList->size(); ++i, ++numberOfValues) {
@@ -2647,8 +2647,8 @@ void CSSPropertyParser::parseFillPosition(CSSParserValueList* valueList, RefPtrW
return;
}
- RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue1 = toCSSPrimitiveValue(value1.get());
- RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue2 = toCSSPrimitiveValue(value2.get());
+ RefPtr<CSSPrimitiveValue> parsedValue1 = toCSSPrimitiveValue(value1.get());
+ RefPtr<CSSPrimitiveValue> parsedValue2 = toCSSPrimitiveValue(value2.get());
value1.clear();
value2.clear();
@@ -2663,7 +2663,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, RefPtr<CSSValue>& value1, RefPtr<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;
@@ -2706,7 +2706,7 @@ void CSSPropertyParser::parse2ValuesFillPosition(CSSParserValueList* valueList,
value1.swap(value2);
}
-void CSSPropertyParser::parseFillRepeat(RefPtrWillBeRawPtr<CSSValue>& value1, RefPtrWillBeRawPtr<CSSValue>& value2)
+void CSSPropertyParser::parseFillRepeat(RefPtr<CSSValue>& value1, RefPtr<CSSValue>& value2)
{
CSSValueID id = m_valueList->current()->id;
if (id == CSSValueRepeatX) {
@@ -2747,7 +2747,7 @@ void CSSPropertyParser::parseFillRepeat(RefPtrWillBeRawPtr<CSSValue>& value1, Re
value2 = cssValuePool().createIdentifierValue(toCSSPrimitiveValue(value1.get())->getValueID());
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID unresolvedProperty)
+PassRefPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID unresolvedProperty)
{
CSSParserValue* value = m_valueList->current();
m_valueList->next();
@@ -2755,7 +2755,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID
if (value->id == CSSValueContain || value->id == CSSValueCover)
return cssValuePool().createIdentifierValue(value->id);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue1 = nullptr;
+ RefPtr<CSSPrimitiveValue> parsedValue1 = nullptr;
if (value->id == CSSValueAuto)
parsedValue1 = cssValuePool().createIdentifierValue(CSSValueAuto);
@@ -2765,7 +2765,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID
parsedValue1 = createPrimitiveNumericValue(value);
}
- RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue2 = nullptr;
+ RefPtr<CSSPrimitiveValue> parsedValue2 = nullptr;
value = m_valueList->current();
if (value) {
if (value->id == CSSValueAuto) {
@@ -2789,14 +2789,14 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFillSize(CSSPropertyID
}
bool CSSPropertyParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& propId1, CSSPropertyID& propId2,
- RefPtrWillBeRawPtr<CSSValue>& retValue1, RefPtrWillBeRawPtr<CSSValue>& retValue2)
+ RefPtr<CSSValue>& retValue1, RefPtr<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;
+ RefPtr<CSSValueList> values = nullptr;
+ RefPtr<CSSValueList> values2 = nullptr;
+ RefPtr<CSSValue> value = nullptr;
+ RefPtr<CSSValue> value2 = nullptr;
retValue1 = retValue2 = nullptr;
propId1 = resolveCSSPropertyID(propId);
@@ -2816,8 +2816,8 @@ bool CSSPropertyParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& p
}
while (true) {
- RefPtrWillBeRawPtr<CSSValue> currValue = nullptr;
- RefPtrWillBeRawPtr<CSSValue> currValue2 = nullptr;
+ RefPtr<CSSValue> currValue = nullptr;
+ RefPtr<CSSValue> currValue2 = nullptr;
Units unitless = FUnknown;
CSSParserValue* val = m_valueList->current();
@@ -2979,7 +2979,7 @@ bool CSSPropertyParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& p
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationDelay()
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationDelay()
{
CSSParserValue* value = m_valueList->current();
if (validUnit(value, FTime))
@@ -2987,7 +2987,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationDelay()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationDirection()
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationDirection()
{
CSSParserValue* value = m_valueList->current();
if (value->id == CSSValueNormal || value->id == CSSValueAlternate || value->id == CSSValueReverse || value->id == CSSValueAlternateReverse)
@@ -2995,7 +2995,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationDirection()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationDuration()
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationDuration()
{
CSSParserValue* value = m_valueList->current();
if (validUnit(value, FTime | FNonNeg))
@@ -3003,7 +3003,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationDuration()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationFillMode()
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationFillMode()
{
CSSParserValue* value = m_valueList->current();
if (value->id == CSSValueNone || value->id == CSSValueForwards || value->id == CSSValueBackwards || value->id == CSSValueBoth)
@@ -3011,7 +3011,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationFillMode()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationIterationCount()
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationIterationCount()
{
CSSParserValue* value = m_valueList->current();
if (value->id == CSSValueInfinite)
@@ -3021,7 +3021,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationIterationCount
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationName(bool allowQuotedName)
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationName(bool allowQuotedName)
{
CSSParserValue* value = m_valueList->current();
@@ -3043,7 +3043,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationName(bool allo
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationPlayState()
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationPlayState()
{
CSSParserValue* value = m_valueList->current();
if (value->id == CSSValueRunning || value->id == CSSValuePaused)
@@ -3051,7 +3051,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationPlayState()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty()
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationProperty()
{
CSSParserValue* value = m_valueList->current();
if (value->m_unit != CSSParserValue::Identifier)
@@ -3081,7 +3081,7 @@ bool CSSPropertyParser::parseCubicBezierTimingFunctionValue(CSSParserValueList*&
return consumeComma(args);
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationTimingFunction()
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationTimingFunction()
{
CSSParserValue* value = m_valueList->current();
if (value->id == CSSValueEase || value->id == CSSValueLinear || value->id == CSSValueEaseIn || value->id == CSSValueEaseOut
@@ -3162,9 +3162,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationTimingFunction
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty(CSSPropertyID propId, bool useLegacyParsing)
+PassRefPtr<CSSValue> CSSPropertyParser::parseAnimationProperty(CSSPropertyID propId, bool useLegacyParsing)
{
- RefPtrWillBeRawPtr<CSSValue> value = nullptr;
+ RefPtr<CSSValue> value = nullptr;
switch (propId) {
case CSSPropertyAnimationDelay:
case CSSPropertyTransitionDelay:
@@ -3206,11 +3206,11 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationProperty(CSSPr
return value.release();
}
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseAnimationPropertyList(CSSPropertyID propId, bool useLegacyParsing)
+PassRefPtr<CSSValueList> CSSPropertyParser::parseAnimationPropertyList(CSSPropertyID propId, bool useLegacyParsing)
{
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
while (true) {
- RefPtrWillBeRawPtr<CSSValue> value = parseAnimationProperty(propId, useLegacyParsing);
+ RefPtr<CSSValue> value = parseAnimationProperty(propId, useLegacyParsing);
if (!value)
return nullptr;
list->append(value.release());
@@ -3237,7 +3237,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<CSSPrimitiveValue>& gridLineName)
+bool CSSPropertyParser::parseIntegerOrCustomIdentFromGridPosition(RefPtr<CSSPrimitiveValue>& numericValue, RefPtr<CSSPrimitiveValue>& gridLineName)
{
CSSParserValue* value = m_valueList->current();
if (validUnit(value, FInteger) && value->fValue) {
@@ -3263,7 +3263,7 @@ bool CSSPropertyParser::parseIntegerOrCustomIdentFromGridPosition(RefPtrWillBeRa
return false;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
+PassRefPtr<CSSValue> CSSPropertyParser::parseGridPosition()
{
ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
@@ -3273,8 +3273,8 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
return cssValuePool().createIdentifierValue(CSSValueAuto);
}
- RefPtrWillBeRawPtr<CSSPrimitiveValue> numericValue = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> gridLineName = nullptr;
+ RefPtr<CSSPrimitiveValue> numericValue = nullptr;
+ RefPtr<CSSPrimitiveValue> gridLineName = nullptr;
bool hasSeenSpanKeyword = false;
if (parseIntegerOrCustomIdentFromGridPosition(numericValue, gridLineName)) {
@@ -3308,7 +3308,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
if (gridLineName && !numericValue && !hasSeenSpanKeyword)
return cssValuePool().createValue(gridLineName->getStringValue(), CSSPrimitiveValue::UnitType::CustomIdentifier);
- RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
if (hasSeenSpanKeyword)
values->append(cssValuePool().createIdentifierValue(CSSValueSpan));
if (numericValue)
@@ -3319,7 +3319,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
return values.release();
}
-static PassRefPtrWillBeRawPtr<CSSValue> gridMissingGridPositionValue(CSSValue* value)
+static PassRefPtr<CSSValue> gridMissingGridPositionValue(CSSValue* value)
{
if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->isCustomIdent())
return value;
@@ -3333,11 +3333,11 @@ bool CSSPropertyParser::parseGridItemPositionShorthand(CSSPropertyID shorthandId
const StylePropertyShorthand& shorthand = shorthandForProperty(shorthandId);
ASSERT(shorthand.length() == 2);
- RefPtrWillBeRawPtr<CSSValue> startValue = parseGridPosition();
+ RefPtr<CSSValue> startValue = parseGridPosition();
if (!startValue)
return false;
- RefPtrWillBeRawPtr<CSSValue> endValue = nullptr;
+ RefPtr<CSSValue> endValue = nullptr;
if (m_valueList->current()) {
if (!isForwardSlashOperator(m_valueList->current()))
return false;
@@ -3357,13 +3357,13 @@ bool CSSPropertyParser::parseGridItemPositionShorthand(CSSPropertyID shorthandId
return true;
}
-bool CSSPropertyParser::parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSSValue> templateColumns, bool important)
+bool CSSPropertyParser::parseGridTemplateRowsAndAreas(PassRefPtr<CSSValue> templateColumns, bool important)
{
NamedGridAreaMap gridAreaMap;
size_t rowCount = 0;
size_t columnCount = 0;
bool trailingIdentWasAdded = false;
- RefPtrWillBeRawPtr<CSSValueList> templateRows = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> templateRows = CSSValueList::createSpaceSeparated();
// At least template-areas strings must be defined.
if (!m_valueList->current())
@@ -3381,7 +3381,7 @@ bool CSSPropertyParser::parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSS
// Handle template-rows's track-size.
if (m_valueList->current() && m_valueList->current()->unit() != CSSPrimitiveValue::UnitType::String) {
- RefPtrWillBeRawPtr<CSSValue> value = parseGridTrackSize(*m_valueList);
+ RefPtr<CSSValue> value = parseGridTrackSize(*m_valueList);
if (!value)
return false;
templateRows->append(value);
@@ -3402,7 +3402,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);
+ RefPtr<CSSValue> templateAreas = CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount);
addProperty(CSSPropertyGridTemplateAreas, templateAreas.release(), important);
addProperty(CSSPropertyGridTemplateRows, templateRows.release(), important);
@@ -3432,7 +3432,7 @@ bool CSSPropertyParser::parseGridTemplateShorthand(bool important)
}
unsigned index = 0;
- RefPtrWillBeRawPtr<CSSValue> columnsValue = nullptr;
+ RefPtr<CSSValue> columnsValue = nullptr;
if (firstValueIsNone) {
columnsValue = cssValuePool().createIdentifierValue(CSSValueNone);
} else {
@@ -3444,7 +3444,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 (RefPtr<CSSValue> rowsValue = parseGridTrackList()) {
if (m_valueList->current())
return false;
addProperty(CSSPropertyGridTemplateColumns, columnsValue, important);
@@ -3486,8 +3486,8 @@ bool CSSPropertyParser::parseGridShorthand(bool important)
if (!parseValue(CSSPropertyGridAutoFlow, important))
return false;
- RefPtrWillBeRawPtr<CSSValue> autoColumnsValue = nullptr;
- RefPtrWillBeRawPtr<CSSValue> autoRowsValue = nullptr;
+ RefPtr<CSSValue> autoColumnsValue = nullptr;
+ RefPtr<CSSValue> autoRowsValue = nullptr;
if (m_valueList->current()) {
autoColumnsValue = parseGridTrackSize(*m_valueList);
@@ -3532,19 +3532,19 @@ bool CSSPropertyParser::parseGridAreaShorthand(bool important)
const StylePropertyShorthand& shorthand = gridAreaShorthand();
ASSERT_UNUSED(shorthand, shorthand.length() == 4);
- RefPtrWillBeRawPtr<CSSValue> rowStartValue = parseGridPosition();
+ RefPtr<CSSValue> rowStartValue = parseGridPosition();
if (!rowStartValue)
return false;
- RefPtrWillBeRawPtr<CSSValue> columnStartValue = nullptr;
+ RefPtr<CSSValue> columnStartValue = nullptr;
if (!parseSingleGridAreaLonghand(columnStartValue))
return false;
- RefPtrWillBeRawPtr<CSSValue> rowEndValue = nullptr;
+ RefPtr<CSSValue> rowEndValue = nullptr;
if (!parseSingleGridAreaLonghand(rowEndValue))
return false;
- RefPtrWillBeRawPtr<CSSValue> columnEndValue = nullptr;
+ RefPtr<CSSValue> columnEndValue = nullptr;
if (!parseSingleGridAreaLonghand(columnEndValue))
return false;
@@ -3564,7 +3564,7 @@ bool CSSPropertyParser::parseGridAreaShorthand(bool important)
return true;
}
-bool CSSPropertyParser::parseSingleGridAreaLonghand(RefPtrWillBeRawPtr<CSSValue>& property)
+bool CSSPropertyParser::parseSingleGridAreaLonghand(RefPtr<CSSValue>& property)
{
if (!m_valueList->current())
return true;
@@ -3592,7 +3592,7 @@ bool CSSPropertyParser::parseGridLineNames(CSSParserValueList& inputList, CSSVal
// Skip '['
inputList.next();
- RefPtrWillBeRawPtr<CSSGridLineNamesValue> lineNames = previousNamedAreaTrailingLineNames;
+ RefPtr<CSSGridLineNamesValue> lineNames = previousNamedAreaTrailingLineNames;
if (!lineNames)
lineNames = CSSGridLineNamesValue::create();
@@ -3603,7 +3603,7 @@ bool CSSPropertyParser::parseGridLineNames(CSSParserValueList& inputList, CSSVal
if (!isValidCustomIdentForGridPositions(*identValue))
return false;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> lineName = createPrimitiveCustomIdentValue(identValue);
+ RefPtr<CSSPrimitiveValue> lineName = createPrimitiveCustomIdentValue(identValue);
lineNames->append(lineName.release());
inputList.next();
}
@@ -3619,7 +3619,7 @@ bool CSSPropertyParser::parseGridLineNames(CSSParserValueList& inputList, CSSVal
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackList()
+PassRefPtr<CSSValue> CSSPropertyParser::parseGridTrackList()
{
ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
@@ -3629,7 +3629,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackList()
return cssValuePool().createIdentifierValue(CSSValueNone);
}
- RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
// Handle leading <custom-ident>*.
if (!parseGridLineNames(*m_valueList, *values))
return nullptr;
@@ -3643,7 +3643,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackList()
return nullptr;
seenTrackSizeOrRepeatFunction = true;
} else {
- RefPtrWillBeRawPtr<CSSValue> value = parseGridTrackSize(*m_valueList);
+ RefPtr<CSSValue> value = parseGridTrackSize(*m_valueList);
if (!value)
return nullptr;
values->append(value);
@@ -3670,7 +3670,7 @@ bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list)
ASSERT(arguments->valueAt(0)->fValue > 0);
size_t repetitions = clampTo<size_t>(arguments->valueAt(0)->fValue, 0, kGridMaxTracks);
- RefPtrWillBeRawPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceSeparated();
arguments->next(); // Skip the repetition count.
arguments->next(); // Skip the comma.
@@ -3680,7 +3680,7 @@ bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list)
size_t numberOfTracks = 0;
while (arguments->current()) {
- RefPtrWillBeRawPtr<CSSValue> trackSize = parseGridTrackSize(*arguments);
+ RefPtr<CSSValue> trackSize = parseGridTrackSize(*arguments);
if (!trackSize)
return false;
@@ -3711,7 +3711,7 @@ bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list)
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackSize(CSSParserValueList& inputList)
+PassRefPtr<CSSValue> CSSPropertyParser::parseGridTrackSize(CSSParserValueList& inputList)
{
ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
@@ -3727,15 +3727,15 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackSize(CSSParser
if (!arguments || arguments->size() != 3 || !isComma(arguments->valueAt(1)))
return nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> minTrackBreadth = parseGridBreadth(arguments->valueAt(0));
+ RefPtr<CSSPrimitiveValue> minTrackBreadth = parseGridBreadth(arguments->valueAt(0));
if (!minTrackBreadth)
return nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> maxTrackBreadth = parseGridBreadth(arguments->valueAt(2));
+ RefPtr<CSSPrimitiveValue> maxTrackBreadth = parseGridBreadth(arguments->valueAt(2));
if (!maxTrackBreadth)
return nullptr;
- RefPtrWillBeRawPtr<CSSFunctionValue> result = CSSFunctionValue::create(CSSValueMinmax);
+ RefPtr<CSSFunctionValue> result = CSSFunctionValue::create(CSSValueMinmax);
result->append(minTrackBreadth);
result->append(maxTrackBreadth);
return result.release();
@@ -3744,7 +3744,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTrackSize(CSSParser
return parseGridBreadth(currentValue);
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseGridBreadth(CSSParserValue* currentValue)
+PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::parseGridBreadth(CSSParserValue* currentValue)
{
if (currentValue->id == CSSValueMinContent || currentValue->id == CSSValueMaxContent || currentValue->id == CSSValueAuto)
return cssValuePool().createIdentifierValue(currentValue->id);
@@ -3865,7 +3865,7 @@ bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap,
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas()
+PassRefPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas()
{
if (m_valueList->current() && m_valueList->current()->id == CSSValueNone) {
m_valueList->next();
@@ -3888,7 +3888,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridTemplateAreas()
return CSSGridTemplateAreasValue::create(gridAreaMap, rowCount, columnCount);
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridAutoFlow(CSSParserValueList& list)
+PassRefPtr<CSSValue> CSSPropertyParser::parseGridAutoFlow(CSSParserValueList& list)
{
// [ row | column ] || dense
ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled());
@@ -3897,7 +3897,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridAutoFlow(CSSParserV
if (!value)
return nullptr;
- RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
// First parameter.
CSSValueID firstId = value->id;
@@ -3928,7 +3928,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridAutoFlow(CSSParserV
return parsedValues;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounterContent(CSSParserValueList* args, bool counters)
+PassRefPtr<CSSValue> CSSPropertyParser::parseCounterContent(CSSParserValueList* args, bool counters)
{
unsigned numArgs = args->size();
if (counters && numArgs != 3 && numArgs != 5)
@@ -3939,9 +3939,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounterContent(CSSParse
CSSParserValue* i = args->current();
if (i->m_unit != CSSParserValue::Identifier)
return nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> identifier = createPrimitiveCustomIdentValue(i);
+ RefPtr<CSSPrimitiveValue> identifier = createPrimitiveCustomIdentValue(i);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> separator = nullptr;
+ RefPtr<CSSPrimitiveValue> separator = nullptr;
if (!counters)
separator = cssValuePool().createValue(String(), CSSPrimitiveValue::UnitType::CustomIdentifier);
else {
@@ -3956,7 +3956,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounterContent(CSSParse
separator = createPrimitiveCustomIdentValue(i);
}
- RefPtrWillBeRawPtr<CSSPrimitiveValue> listStyle = nullptr;
+ RefPtr<CSSPrimitiveValue> listStyle = nullptr;
i = args->next();
if (!i) // Make the list style default decimal
listStyle = cssValuePool().createIdentifierValue(CSSValueDecimal);
@@ -3980,7 +3980,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounterContent(CSSParse
return CSSCounterValue::create(identifier.release(), listStyle.release(), separator.release());
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseClipShape()
+PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::parseClipShape()
{
CSSParserValue* value = m_valueList->current();
CSSParserValueList* args = value->function->args.get();
@@ -3991,13 +3991,13 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseClipShape()
// rect(t, r, b, l) || rect(t r b l)
if (args->size() != 4 && args->size() != 7)
return nullptr;
- RefPtrWillBeRawPtr<Rect> rect = Rect::create();
+ RefPtr<Rect> rect = Rect::create();
int i = 0;
CSSParserValue* a = args->current();
while (a) {
if (a->id != CSSValueAuto && !validUnit(a, FLength | FUnitlessQuirk))
return nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> length = a->id == CSSValueAuto ?
+ RefPtr<CSSPrimitiveValue> length = a->id == CSSValueAuto ?
cssValuePool().createIdentifierValue(CSSValueAuto) :
createPrimitiveNumericValue(a);
if (i == 0)
@@ -4020,7 +4020,7 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseClipShape()
return cssValuePool().createValue(rect.release());
}
-static void completeBorderRadii(RefPtrWillBeRawPtr<CSSPrimitiveValue> radii[4])
+static void completeBorderRadii(RefPtr<CSSPrimitiveValue> radii[4])
{
if (radii[3])
return;
@@ -4034,7 +4034,7 @@ static void completeBorderRadii(RefPtrWillBeRawPtr<CSSPrimitiveValue> radii[4])
// FIXME: This should be refactored with parseBorderRadius.
// parseBorderRadius contains support for some legacy radius construction.
-PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseInsetRoundedCorners(PassRefPtrWillBeRawPtr<CSSBasicShapeInset> shape, CSSParserValueList* args)
+PassRefPtr<CSSBasicShape> CSSPropertyParser::parseInsetRoundedCorners(PassRefPtr<CSSBasicShapeInset> shape, CSSParserValueList* args)
{
CSSParserValue* argument = args->next();
@@ -4052,7 +4052,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseInsetRoundedCorner
return nullptr;
// FIXME: Refactor completeBorderRadii and the array
- RefPtrWillBeRawPtr<CSSPrimitiveValue> radii[2][4];
+ RefPtr<CSSPrimitiveValue> radii[2][4];
#if ENABLE(OILPAN)
// Zero initialize the array of raw pointers.
memset(&radii, 0, sizeof(radii));
@@ -4079,7 +4079,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseInsetRoundedCorner
if (!validUnit(value, FLength | FPercent | FNonNeg))
return nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> radius = createPrimitiveNumericValue(value);
+ RefPtr<CSSPrimitiveValue> radius = createPrimitiveNumericValue(value);
if (!indexAfterSlash)
radii[0][i] = radius;
@@ -4102,14 +4102,14 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseInsetRoundedCorner
return shape;
}
-PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeInset(CSSParserValueList* args)
+PassRefPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeInset(CSSParserValueList* args)
{
ASSERT(args);
- RefPtrWillBeRawPtr<CSSBasicShapeInset> shape = CSSBasicShapeInset::create();
+ RefPtr<CSSBasicShapeInset> shape = CSSBasicShapeInset::create();
CSSParserValue* argument = args->current();
- WillBeHeapVector<RefPtrWillBeMember<CSSPrimitiveValue>> widthArguments;
+ WillBeHeapVector<RefPtr<CSSPrimitiveValue>> widthArguments;
bool hasRoundedInset = false;
while (argument) {
@@ -4206,7 +4206,7 @@ bool CSSPropertyParser::parseLegacyPosition(CSSPropertyID propId, bool important
return !m_valueList->next();
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseContentDistributionOverflowPosition()
+PassRefPtr<CSSValue> CSSPropertyParser::parseContentDistributionOverflowPosition()
{
// auto | <baseline-position> | <content-distribution> || [ <overflow-position>? && <content-position> ]
// <baseline-position> = baseline | last-baseline;
@@ -4273,8 +4273,8 @@ bool CSSPropertyParser::parseItemPositionOverflowPosition(CSSPropertyID propId,
return true;
}
- RefPtrWillBeRawPtr<CSSPrimitiveValue> position = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> overflowAlignmentKeyword = nullptr;
+ RefPtr<CSSPrimitiveValue> position = nullptr;
+ RefPtr<CSSPrimitiveValue> overflowAlignmentKeyword = nullptr;
if (isItemPositionKeyword(value->id)) {
position = cssValuePool().createIdentifierValue(value->id);
value = m_valueList->next();
@@ -4307,7 +4307,7 @@ bool CSSPropertyParser::parseItemPositionOverflowPosition(CSSPropertyID propId,
return true;
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseShapeRadius(CSSParserValue* value)
+PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::parseShapeRadius(CSSParserValue* value)
{
if (value->id == CSSValueClosestSide || value->id == CSSValueFarthestSide)
return cssValuePool().createIdentifierValue(value->id);
@@ -4318,7 +4318,7 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseShapeRadius(CS
return createPrimitiveNumericValue(value);
}
-PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeCircle(CSSParserValueList* args)
+PassRefPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeCircle(CSSParserValueList* args)
{
ASSERT(args);
@@ -4326,7 +4326,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeCircle(C
// circle(radius at <position>)
// circle(at <position>)
// where position defines centerX and centerY using a CSS <position> data type.
- RefPtrWillBeRawPtr<CSSBasicShapeCircle> shape = CSSBasicShapeCircle::create();
+ RefPtr<CSSBasicShapeCircle> shape = CSSBasicShapeCircle::create();
for (CSSParserValue* argument = args->current(); argument; argument = args->next()) {
// The call to parseFillPosition below should consume all of the
@@ -4336,7 +4336,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeCircle(C
return nullptr;
if (!args->currentIndex() && argument->id != CSSValueAt) {
- if (RefPtrWillBeRawPtr<CSSPrimitiveValue> radius = parseShapeRadius(argument)) {
+ if (RefPtr<CSSPrimitiveValue> radius = parseShapeRadius(argument)) {
shape->setRadius(radius);
continue;
}
@@ -4345,8 +4345,8 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeCircle(C
}
if (argument->id == CSSValueAt && args->next()) {
- RefPtrWillBeRawPtr<CSSValue> centerX = nullptr;
- RefPtrWillBeRawPtr<CSSValue> centerY = nullptr;
+ RefPtr<CSSValue> centerX = nullptr;
+ RefPtr<CSSValue> centerY = nullptr;
parseFillPosition(args, centerX, centerY);
if (centerX && centerY && !args->current()) {
ASSERT(centerX->isPrimitiveValue());
@@ -4364,7 +4364,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeCircle(C
return shape;
}
-PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeEllipse(CSSParserValueList* args)
+PassRefPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeEllipse(CSSParserValueList* args)
{
ASSERT(args);
@@ -4374,7 +4374,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeEllipse(
// ellipse(radiusX radiusY at <position>)
// ellipse(at <position>)
// where position defines centerX and centerY using a CSS <position> data type.
- RefPtrWillBeRawPtr<CSSBasicShapeEllipse> shape = CSSBasicShapeEllipse::create();
+ RefPtr<CSSBasicShapeEllipse> shape = CSSBasicShapeEllipse::create();
for (CSSParserValue* argument = args->current(); argument; argument = args->next()) {
// The call to parseFillPosition below should consume all of the
@@ -4384,7 +4384,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeEllipse(
return nullptr;
if (args->currentIndex() < 2 && argument->id != CSSValueAt) {
- if (RefPtrWillBeRawPtr<CSSPrimitiveValue> radius = parseShapeRadius(argument)) {
+ if (RefPtr<CSSPrimitiveValue> radius = parseShapeRadius(argument)) {
if (!shape->radiusX())
shape->setRadiusX(radius);
else
@@ -4397,8 +4397,8 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeEllipse(
if (argument->id != CSSValueAt || !args->next()) // expecting ellipse(.. at <position>)
return nullptr;
- RefPtrWillBeRawPtr<CSSValue> centerX = nullptr;
- RefPtrWillBeRawPtr<CSSValue> centerY = nullptr;
+ RefPtr<CSSValue> centerX = nullptr;
+ RefPtr<CSSValue> centerY = nullptr;
parseFillPosition(args, centerX, centerY);
if (!centerX || !centerY || args->current())
return nullptr;
@@ -4412,7 +4412,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapeEllipse(
return shape;
}
-PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapePolygon(CSSParserValueList* args)
+PassRefPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapePolygon(CSSParserValueList* args)
{
ASSERT(args);
@@ -4420,7 +4420,7 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapePolygon(
if (!size)
return nullptr;
- RefPtrWillBeRawPtr<CSSBasicShapePolygon> shape = CSSBasicShapePolygon::create();
+ RefPtr<CSSBasicShapePolygon> shape = CSSBasicShapePolygon::create();
CSSParserValue* argument = args->current();
if (argument->id == CSSValueEvenodd || argument->id == CSSValueNonzero) {
@@ -4441,12 +4441,12 @@ PassRefPtrWillBeRawPtr<CSSBasicShape> CSSPropertyParser::parseBasicShapePolygon(
CSSParserValue* argumentX = args->current();
if (!argumentX || !validUnit(argumentX, FLength | FPercent))
return nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> xLength = createPrimitiveNumericValue(argumentX);
+ RefPtr<CSSPrimitiveValue> xLength = createPrimitiveNumericValue(argumentX);
CSSParserValue* argumentY = args->next();
if (!argumentY || !validUnit(argumentY, FLength | FPercent))
return nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> yLength = createPrimitiveNumericValue(argumentY);
+ RefPtr<CSSPrimitiveValue> yLength = createPrimitiveNumericValue(argumentY);
shape->appendPoint(xLength.release(), yLength.release());
@@ -4474,9 +4474,9 @@ static bool isBoxValue(CSSValueID valueId)
return false;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseShapeProperty(CSSPropertyID propId)
+PassRefPtr<CSSValue> CSSPropertyParser::parseShapeProperty(CSSPropertyID propId)
{
- RefPtrWillBeRawPtr<CSSValue> imageValue = nullptr;
+ RefPtr<CSSValue> imageValue = nullptr;
if (parseFillImage(m_valueList, imageValue)) {
m_valueList->next();
return imageValue.release();
@@ -4485,7 +4485,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseShapeProperty(CSSProper
return parseBasicShapeAndOrBox();
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseBasicShapeAndOrBox()
+PassRefPtr<CSSValue> CSSPropertyParser::parseBasicShapeAndOrBox()
{
CSSParserValue* value = m_valueList->current();
@@ -4493,14 +4493,14 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseBasicShapeAndOrBox()
bool boxFound = false;
CSSValueID valueId;
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
for (unsigned i = 0; i < 2; ++i) {
if (!value)
break;
valueId = value->id;
if (value->m_unit == CSSParserValue::Function && !shapeFound) {
// parseBasicShape already asks for the next value list item.
- RefPtrWillBeRawPtr<CSSPrimitiveValue> shapeValue = parseBasicShape();
+ RefPtr<CSSPrimitiveValue> shapeValue = parseBasicShape();
if (!shapeValue)
return nullptr;
list->append(shapeValue.release());
@@ -4521,7 +4521,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseBasicShapeAndOrBox()
return list.release();
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseBasicShape()
+PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::parseBasicShape()
{
CSSParserValue* value = m_valueList->current();
ASSERT(value->m_unit == CSSParserValue::Function);
@@ -4530,7 +4530,7 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseBasicShape()
if (!args)
return nullptr;
- RefPtrWillBeRawPtr<CSSBasicShape> shape = nullptr;
+ RefPtr<CSSBasicShape> shape = nullptr;
if (value->function->id == CSSValueCircle)
shape = parseBasicShapeCircle(args);
else if (value->function->id == CSSValueEllipse)
@@ -4608,7 +4608,7 @@ bool CSSPropertyParser::parseFont(bool important)
value = m_valueList->next();
if (!value)
return false;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> lineHeight = parseLineHeight();
+ RefPtr<CSSPrimitiveValue> lineHeight = parseLineHeight();
if (!lineHeight)
return false;
addProperty(CSSPropertyLineHeight, lineHeight.release(), important);
@@ -4617,7 +4617,7 @@ bool CSSPropertyParser::parseFont(bool important)
}
// Font family must come now.
- RefPtrWillBeRawPtr<CSSValue> parsedFamilyValue = parseFontFamily();
+ RefPtr<CSSValue> parsedFamilyValue = parseFontFamily();
if (!parsedFamilyValue)
return false;
@@ -4649,7 +4649,7 @@ bool CSSPropertyParser::parseSystemFont(bool important)
addProperty(CSSPropertyFontStyle, cssValuePool().createIdentifierValue(fontStyle == FontStyleItalic ? CSSValueItalic : CSSValueNormal), important);
addProperty(CSSPropertyFontWeight, cssValuePool().createValue(fontWeight), important);
addProperty(CSSPropertyFontSize, cssValuePool().createValue(fontSize, CSSPrimitiveValue::UnitType::Pixels), important);
- RefPtrWillBeRawPtr<CSSValueList> fontFamilyList = CSSValueList::createCommaSeparated();
+ RefPtr<CSSValueList> fontFamilyList = CSSValueList::createCommaSeparated();
fontFamilyList->append(cssValuePool().createFontFamilyValue(fontFamily));
addProperty(CSSPropertyFontFamily, fontFamilyList.release(), important);
@@ -4690,12 +4690,12 @@ public:
private:
StringBuilder m_builder;
- RawPtrWillBeMember<CSSValueList> m_list;
+ RawPtr<CSSValueList> m_list;
};
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFamily()
+PassRefPtr<CSSValueList> CSSPropertyParser::parseFontFamily()
{
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
CSSParserValue* value = m_valueList->current();
FontFamilyValueBuilder familyBuilder(list.get());
@@ -4764,7 +4764,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFamily()
return list.release();
}
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseLineHeight()
+PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::parseLineHeight()
{
CSSParserValue* value = m_valueList->current();
CSSValueID id = value->id;
@@ -4804,12 +4804,12 @@ bool CSSPropertyParser::parseFontSize(bool important)
bool CSSPropertyParser::parseFontVariant(bool important)
{
- RefPtrWillBeRawPtr<CSSValueList> values = nullptr;
+ RefPtr<CSSValueList> values = nullptr;
if (m_valueList->size() > 1)
values = CSSValueList::createCommaSeparated();
bool expectComma = false;
for (CSSParserValue* val = m_valueList->current(); val; val = m_valueList->current()) {
- RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedValue = nullptr;
+ RefPtr<CSSPrimitiveValue> parsedValue = nullptr;
if (!expectComma) {
expectComma = true;
if (val->id == CSSValueNormal || val->id == CSSValueSmallCaps)
@@ -4870,7 +4870,7 @@ bool CSSPropertyParser::parseFontWeight(bool important)
bool CSSPropertyParser::parseFontFaceSrcURI(CSSValueList* valueList)
{
- RefPtrWillBeRawPtr<CSSFontFaceSrcValue> uriValue(CSSFontFaceSrcValue::create(completeURL(m_valueList->current()->string), m_context.shouldCheckContentSecurityPolicy()));
+ RefPtr<CSSFontFaceSrcValue> uriValue(CSSFontFaceSrcValue::create(completeURL(m_valueList->current()->string), m_context.shouldCheckContentSecurityPolicy()));
uriValue->setReferrer(m_context.referrer());
CSSParserValue* value = m_valueList->next();
@@ -4916,9 +4916,9 @@ bool CSSPropertyParser::parseFontFaceSrcLocal(CSSValueList* valueList)
return true;
}
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFaceSrc()
+PassRefPtr<CSSValueList> CSSPropertyParser::parseFontFaceSrc()
{
- RefPtrWillBeRawPtr<CSSValueList> values(CSSValueList::createCommaSeparated());
+ RefPtr<CSSValueList> values(CSSValueList::createCommaSeparated());
while (true) {
CSSParserValue* value = m_valueList->current();
@@ -4941,9 +4941,9 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFaceSrc()
}
}
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFaceUnicodeRange()
+PassRefPtr<CSSValueList> CSSPropertyParser::parseFontFaceUnicodeRange()
{
- RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
+ RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
do {
CSSParserValue* current = m_valueList->current();
@@ -5185,7 +5185,7 @@ public:
allowStyle = property == CSSPropertyBoxShadow;
}
- void commitLength(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val)
+ void commitLength(PassRefPtr<CSSPrimitiveValue> val)
{
if (allowX) {
x = val;
@@ -5211,7 +5211,7 @@ public:
}
}
- void commitColor(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val)
+ void commitColor(PassRefPtr<CSSPrimitiveValue> val)
{
color = val;
allowColor = false;
@@ -5240,13 +5240,13 @@ public:
CSSPropertyID property;
- RefPtrWillBeMember<CSSValueList> values;
- RefPtrWillBeMember<CSSPrimitiveValue> x;
- RefPtrWillBeMember<CSSPrimitiveValue> y;
- RefPtrWillBeMember<CSSPrimitiveValue> blur;
- RefPtrWillBeMember<CSSPrimitiveValue> spread;
- RefPtrWillBeMember<CSSPrimitiveValue> style;
- RefPtrWillBeMember<CSSPrimitiveValue> color;
+ RefPtr<CSSValueList> values;
+ RefPtr<CSSPrimitiveValue> x;
+ RefPtr<CSSPrimitiveValue> y;
+ RefPtr<CSSPrimitiveValue> blur;
+ RefPtr<CSSPrimitiveValue> spread;
+ RefPtr<CSSPrimitiveValue> style;
+ RefPtr<CSSPrimitiveValue> color;
bool allowX;
bool allowY;
@@ -5257,7 +5257,7 @@ public:
bool allowBreak;
};
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseShadow(CSSParserValueList* valueList, CSSPropertyID propId)
+PassRefPtr<CSSValueList> CSSPropertyParser::parseShadow(CSSParserValueList* valueList, CSSPropertyID propId)
{
ShadowParseContext context(propId);
for (CSSParserValue* val = valueList->current(); val; val = valueList->next()) {
@@ -5280,7 +5280,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseShadow(CSSParserVal
return nullptr;
// A length is allowed here. Construct the value and add it.
- RefPtrWillBeRawPtr<CSSPrimitiveValue> length = createPrimitiveNumericValue(val);
+ RefPtr<CSSPrimitiveValue> length = createPrimitiveNumericValue(val);
context.commitLength(length.release());
} else if (val->id == CSSValueInset) {
if (!context.allowStyle)
@@ -5292,7 +5292,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseShadow(CSSParserVal
return nullptr;
// The only other type of value that's ok is a color value.
- RefPtrWillBeRawPtr<CSSPrimitiveValue> parsedColor = parseColor(val);
+ RefPtr<CSSPrimitiveValue> parsedColor = parseColor(val);
if (!parsedColor)
return nullptr;
@@ -5309,13 +5309,13 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseShadow(CSSParserVal
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseReflect()
+PassRefPtr<CSSValue> CSSPropertyParser::parseReflect()
{
// box-reflect: <direction> <offset> <mask>
// Direction comes first.
CSSParserValue* val = m_valueList->current();
- RefPtrWillBeRawPtr<CSSPrimitiveValue> direction = nullptr;
+ RefPtr<CSSPrimitiveValue> direction = nullptr;
switch (val->id) {
case CSSValueAbove:
case CSSValueBelow:
@@ -5329,7 +5329,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseReflect()
// The offset comes next.
val = m_valueList->next();
- RefPtrWillBeRawPtr<CSSPrimitiveValue> offset = nullptr;
+ RefPtr<CSSPrimitiveValue> offset = nullptr;
if (!val)
offset = cssValuePool().createValue(0, CSSPrimitiveValue::UnitType::Pixels);
else {
@@ -5339,7 +5339,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseReflect()
}
// Now for the mask.
- RefPtrWillBeRawPtr<CSSValue> mask = nullptr;
+ RefPtr<CSSValue> mask = nullptr;
val = m_valueList->next();
if (val) {
mask = parseBorderImage(CSSPropertyWebkitBoxReflect);
@@ -5362,7 +5362,7 @@ bool CSSPropertyParser::parseFlex(CSSParserValueList* args, bool important)
static const double unsetValue = -1;
double flexGrow = unsetValue;
double flexShrink = unsetValue;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> flexBasis = nullptr;
+ RefPtr<CSSPrimitiveValue> flexBasis = nullptr;
while (CSSParserValue* arg = args->current()) {
if (validUnit(arg, FNumber | FNonNeg)) {
@@ -5399,10 +5399,10 @@ bool CSSPropertyParser::parseFlex(CSSParserValueList* args, bool important)
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parsePosition(CSSParserValueList* valueList)
+PassRefPtr<CSSValue> CSSPropertyParser::parsePosition(CSSParserValueList* valueList)
{
- RefPtrWillBeRawPtr<CSSValue> xValue = nullptr;
- RefPtrWillBeRawPtr<CSSValue> yValue = nullptr;
+ RefPtr<CSSValue> xValue = nullptr;
+ RefPtr<CSSValue> yValue = nullptr;
parseFillPosition(valueList, xValue, yValue);
if (!xValue || !yValue)
return nullptr;
@@ -5410,13 +5410,13 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parsePosition(CSSParserValue
}
// Parses a list of comma separated positions. i.e., <position>#
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parsePositionList(CSSParserValueList* valueList)
+PassRefPtr<CSSValueList> CSSPropertyParser::parsePositionList(CSSParserValueList* valueList)
{
- RefPtrWillBeRawPtr<CSSValueList> positions = CSSValueList::createCommaSeparated();
+ RefPtr<CSSValueList> positions = CSSValueList::createCommaSeparated();
while (true) {
// parsePosition consumes values until it reaches a separator [,/],
// an invalid token, or end of the list
- RefPtrWillBeRawPtr<CSSValue> position = parsePosition(valueList);
+ RefPtr<CSSValue> position = parsePosition(valueList);
if (!position)
return nullptr;
positions->append(position);
@@ -5456,7 +5456,7 @@ public:
bool allowWidth() const { return m_allowWidth; }
bool requireOutset() const { return m_requireOutset; }
- void commitImage(PassRefPtrWillBeRawPtr<CSSValue> image)
+ void commitImage(PassRefPtr<CSSValue> image)
{
m_image = image;
m_canAdvance = true;
@@ -5468,7 +5468,7 @@ public:
m_allowImageSlice = !m_imageSlice;
m_allowRepeat = !m_repeat;
}
- void commitImageSlice(PassRefPtrWillBeRawPtr<CSSBorderImageSliceValue> slice)
+ void commitImageSlice(PassRefPtr<CSSBorderImageSliceValue> slice)
{
m_imageSlice = slice;
m_canAdvance = true;
@@ -5497,7 +5497,7 @@ public:
m_allowWidth = false;
}
}
- void commitBorderWidth(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> width)
+ void commitBorderWidth(PassRefPtr<CSSPrimitiveValue> width)
{
m_borderWidth = width;
m_canAdvance = true;
@@ -5509,7 +5509,7 @@ public:
m_allowImage = !m_image;
m_allowRepeat = !m_repeat;
}
- void commitBorderOutset(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> outset)
+ void commitBorderOutset(PassRefPtr<CSSPrimitiveValue> outset)
{
m_outset = outset;
m_canAdvance = true;
@@ -5521,7 +5521,7 @@ public:
m_allowImage = !m_image;
m_allowRepeat = !m_repeat;
}
- void commitRepeat(PassRefPtrWillBeRawPtr<CSSValue> repeat)
+ void commitRepeat(PassRefPtr<CSSValue> repeat)
{
m_repeat = repeat;
m_canAdvance = true;
@@ -5534,7 +5534,7 @@ public:
m_allowImage = !m_image;
}
- PassRefPtrWillBeRawPtr<CSSValue> commitCSSValue()
+ PassRefPtr<CSSValue> commitCSSValue()
{
return createBorderImageValue(m_image, m_imageSlice.get(), m_borderWidth.get(), m_outset.get(), m_repeat.get());
}
@@ -5550,12 +5550,12 @@ public:
bool m_allowWidth;
bool m_requireOutset;
- RefPtrWillBeMember<CSSValue> m_image;
- RefPtrWillBeMember<CSSBorderImageSliceValue> m_imageSlice;
- RefPtrWillBeMember<CSSPrimitiveValue> m_borderWidth;
- RefPtrWillBeMember<CSSPrimitiveValue> m_outset;
+ RefPtr<CSSValue> m_image;
+ RefPtr<CSSBorderImageSliceValue> m_imageSlice;
+ RefPtr<CSSPrimitiveValue> m_borderWidth;
+ RefPtr<CSSPrimitiveValue> m_outset;
- RefPtrWillBeMember<CSSValue> m_repeat;
+ RefPtr<CSSValue> m_repeat;
};
bool CSSPropertyParser::buildBorderImageParseContext(CSSPropertyID propId, BorderImageParseContext& context)
@@ -5571,13 +5571,13 @@ bool CSSPropertyParser::buildBorderImageParseContext(CSSPropertyID propId, Borde
if (val->unit() == CSSPrimitiveValue::UnitType::URI) {
context.commitImage(createCSSImageValueWithReferrer(val->string, m_context.completeURL(val->string)));
} else if (isGeneratedImageValue(val)) {
- RefPtrWillBeRawPtr<CSSValue> value = nullptr;
+ RefPtr<CSSValue> value = nullptr;
if (parseGeneratedImage(m_valueList, value))
context.commitImage(value.release());
else
return false;
} else if (val->m_unit == CSSParserValue::Function && val->function->id == CSSValueWebkitImageSet) {
- RefPtrWillBeRawPtr<CSSValue> value = parseImageSet(m_valueList);
+ RefPtr<CSSValue> value = parseImageSet(m_valueList);
if (value)
context.commitImage(value.release());
else
@@ -5587,25 +5587,25 @@ bool CSSPropertyParser::buildBorderImageParseContext(CSSPropertyID propId, Borde
}
if (!context.canAdvance() && context.allowImageSlice()) {
- RefPtrWillBeRawPtr<CSSBorderImageSliceValue> imageSlice = nullptr;
+ RefPtr<CSSBorderImageSliceValue> imageSlice = nullptr;
if (parseBorderImageSlice(propId, imageSlice))
context.commitImageSlice(imageSlice.release());
}
if (!context.canAdvance() && context.allowRepeat()) {
- RefPtrWillBeRawPtr<CSSValue> repeat = nullptr;
+ RefPtr<CSSValue> repeat = nullptr;
if (parseBorderImageRepeat(repeat))
context.commitRepeat(repeat.release());
}
if (!context.canAdvance() && context.allowWidth()) {
- RefPtrWillBeRawPtr<CSSPrimitiveValue> borderWidth = nullptr;
+ RefPtr<CSSPrimitiveValue> borderWidth = nullptr;
if (parseBorderImageWidth(borderWidth))
context.commitBorderWidth(borderWidth.release());
}
if (!context.canAdvance() && context.requireOutset()) {
- RefPtrWillBeRawPtr<CSSPrimitiveValue> borderOutset = nullptr;
+ RefPtr<CSSPrimitiveValue> borderOutset = nullptr;
if (parseBorderImageOutset(borderOutset))
context.commitBorderOutset(borderOutset.release());
}
@@ -5619,7 +5619,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, PassRefPtr<CSSValue> value, bool important)
{
if (value)
addProperty(propId, value, important);
@@ -5654,7 +5654,7 @@ bool CSSPropertyParser::parseBorderImageShorthand(CSSPropertyID propId, bool imp
return false;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseBorderImage(CSSPropertyID propId)
+PassRefPtr<CSSValue> CSSPropertyParser::parseBorderImage(CSSPropertyID propId)
{
BorderImageParseContext context;
if (buildBorderImageParseContext(propId, context)) {
@@ -5668,10 +5668,10 @@ static bool isBorderImageRepeatKeyword(int id)
return id == CSSValueStretch || id == CSSValueRepeat || id == CSSValueSpace || id == CSSValueRound;
}
-bool CSSPropertyParser::parseBorderImageRepeat(RefPtrWillBeRawPtr<CSSValue>& result)
+bool CSSPropertyParser::parseBorderImageRepeat(RefPtr<CSSValue>& result)
{
- RefPtrWillBeRawPtr<CSSPrimitiveValue> firstValue = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> secondValue = nullptr;
+ RefPtr<CSSPrimitiveValue> firstValue = nullptr;
+ RefPtr<CSSPrimitiveValue> secondValue = nullptr;
CSSParserValue* val = m_valueList->current();
if (!val)
return false;
@@ -5715,7 +5715,7 @@ public:
bool allowFinalCommit() const { return m_allowFinalCommit; }
CSSPrimitiveValue* top() const { return m_top.get(); }
- void commitNumber(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val)
+ void commitNumber(PassRefPtr<CSSPrimitiveValue> val)
{
if (!m_top)
m_top = val;
@@ -5734,7 +5734,7 @@ public:
void commitFill() { m_fill = true; m_allowFill = false; m_allowNumber = !m_top; }
- PassRefPtrWillBeRawPtr<CSSBorderImageSliceValue> commitBorderImageSlice()
+ PassRefPtr<CSSBorderImageSliceValue> commitBorderImageSlice()
{
// We need to clone and repeat values for any omissions.
ASSERT(m_top);
@@ -5751,7 +5751,7 @@ public:
m_left = m_right;
// Now build a rect value to hold all four of our primitive values.
- RefPtrWillBeRawPtr<Quad> quad = Quad::create();
+ RefPtr<Quad> quad = Quad::create();
quad->setTop(m_top);
quad->setRight(m_right);
quad->setBottom(m_bottom);
@@ -5766,15 +5766,15 @@ private:
bool m_allowFill;
bool m_allowFinalCommit;
- RefPtrWillBeMember<CSSPrimitiveValue> m_top;
- RefPtrWillBeMember<CSSPrimitiveValue> m_right;
- RefPtrWillBeMember<CSSPrimitiveValue> m_bottom;
- RefPtrWillBeMember<CSSPrimitiveValue> m_left;
+ RefPtr<CSSPrimitiveValue> m_top;
+ RefPtr<CSSPrimitiveValue> m_right;
+ RefPtr<CSSPrimitiveValue> m_bottom;
+ RefPtr<CSSPrimitiveValue> m_left;
bool m_fill;
};
-bool CSSPropertyParser::parseBorderImageSlice(CSSPropertyID propId, RefPtrWillBeRawPtr<CSSBorderImageSliceValue>& result)
+bool CSSPropertyParser::parseBorderImageSlice(CSSPropertyID propId, RefPtr<CSSBorderImageSliceValue>& result)
{
BorderImageSliceParseContext context;
for (CSSParserValue* val = m_valueList->current(); val; val = m_valueList->next()) {
@@ -5821,7 +5821,7 @@ public:
bool allowFinalCommit() const { return m_allowFinalCommit; }
CSSPrimitiveValue* top() const { return m_top.get(); }
- void commitNumber(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val)
+ void commitNumber(PassRefPtr<CSSPrimitiveValue> val)
{
if (!m_top)
m_top = val;
@@ -5838,9 +5838,9 @@ public:
m_allowFinalCommit = true;
}
- void setTop(PassRefPtrWillBeRawPtr<CSSPrimitiveValue> val) { m_top = val; }
+ void setTop(PassRefPtr<CSSPrimitiveValue> val) { m_top = val; }
- PassRefPtrWillBeRawPtr<CSSPrimitiveValue> commitBorderImageQuad()
+ PassRefPtr<CSSPrimitiveValue> commitBorderImageQuad()
{
// We need to clone and repeat values for any omissions.
ASSERT(m_top);
@@ -5857,7 +5857,7 @@ public:
m_left = m_right;
// Now build a quad value to hold all four of our primitive values.
- RefPtrWillBeRawPtr<Quad> quad = Quad::create();
+ RefPtr<Quad> quad = Quad::create();
quad->setTop(m_top);
quad->setRight(m_right);
quad->setBottom(m_bottom);
@@ -5871,13 +5871,13 @@ private:
bool m_allowNumber;
bool m_allowFinalCommit;
- RefPtrWillBeMember<CSSPrimitiveValue> m_top;
- RefPtrWillBeMember<CSSPrimitiveValue> m_right;
- RefPtrWillBeMember<CSSPrimitiveValue> m_bottom;
- RefPtrWillBeMember<CSSPrimitiveValue> m_left;
+ RefPtr<CSSPrimitiveValue> m_top;
+ RefPtr<CSSPrimitiveValue> m_right;
+ RefPtr<CSSPrimitiveValue> m_bottom;
+ RefPtr<CSSPrimitiveValue> m_left;
};
-bool CSSPropertyParser::parseBorderImageQuad(Units validUnits, RefPtrWillBeRawPtr<CSSPrimitiveValue>& result)
+bool CSSPropertyParser::parseBorderImageQuad(Units validUnits, RefPtr<CSSPrimitiveValue>& result)
{
BorderImageQuadParseContext context;
for (CSSParserValue* val = m_valueList->current(); val; val = m_valueList->next()) {
@@ -5904,12 +5904,12 @@ bool CSSPropertyParser::parseBorderImageQuad(Units validUnits, RefPtrWillBeRawPt
return false;
}
-bool CSSPropertyParser::parseBorderImageWidth(RefPtrWillBeRawPtr<CSSPrimitiveValue>& result)
+bool CSSPropertyParser::parseBorderImageWidth(RefPtr<CSSPrimitiveValue>& result)
{
return parseBorderImageQuad(FLength | FNumber | FNonNeg | FPercent, result);
}
-bool CSSPropertyParser::parseBorderImageOutset(RefPtrWillBeRawPtr<CSSPrimitiveValue>& result)
+bool CSSPropertyParser::parseBorderImageOutset(RefPtr<CSSPrimitiveValue>& result)
{
return parseBorderImageQuad(FLength | FNumber | FNonNeg, result);
}
@@ -5921,7 +5921,7 @@ bool CSSPropertyParser::parseBorderRadius(CSSPropertyID unresolvedProperty, bool
return false;
ShorthandScope scope(this, unresolvedProperty);
- RefPtrWillBeRawPtr<CSSPrimitiveValue> radii[2][4];
+ RefPtr<CSSPrimitiveValue> radii[2][4];
#if ENABLE(OILPAN)
// Zero initialize the array of raw pointers.
memset(&radii, 0, sizeof(radii));
@@ -5948,7 +5948,7 @@ bool CSSPropertyParser::parseBorderRadius(CSSPropertyID unresolvedProperty, bool
if (!validUnit(value, FLength | FPercent | FNonNeg))
return false;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> radius = createPrimitiveNumericValue(value);
+ RefPtr<CSSPrimitiveValue> radius = createPrimitiveNumericValue(value);
if (!indexAfterSlash) {
radii[0][i] = radius;
@@ -5977,15 +5977,15 @@ bool CSSPropertyParser::parseBorderRadius(CSSPropertyID unresolvedProperty, bool
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounter(int defaultValue)
+PassRefPtr<CSSValue> CSSPropertyParser::parseCounter(int defaultValue)
{
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
while (m_valueList->current()) {
CSSParserValue* val = m_valueList->current();
if (val->m_unit != CSSParserValue::Identifier)
return nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> counterName = createPrimitiveCustomIdentValue(val);
+ RefPtr<CSSPrimitiveValue> counterName = createPrimitiveCustomIdentValue(val);
m_valueList->next();
val = m_valueList->current();
@@ -6005,9 +6005,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounter(int defaultValu
}
// This should go away once we drop support for -webkit-gradient
-static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CSSParserValue* a, bool horizontal)
+static PassRefPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CSSParserValue* a, bool horizontal)
{
- RefPtrWillBeRawPtr<CSSPrimitiveValue> result = nullptr;
+ RefPtr<CSSPrimitiveValue> result = nullptr;
if (a->m_unit == CSSParserValue::Identifier) {
if ((a->id == CSSValueLeft && horizontal)
|| (a->id == CSSValueTop && !horizontal))
@@ -6024,7 +6024,7 @@ static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> parseDeprecatedGradientPoint(CS
}
// Used to parse colors for -webkit-gradient(...).
-PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parseDeprecatedGradientStopColor(const CSSParserValue* value)
+PassRefPtr<CSSPrimitiveValue> CSSPropertyParser::parseDeprecatedGradientStopColor(const CSSParserValue* value)
{
// Disallow currentcolor.
if (value->id == CSSValueCurrentcolor)
@@ -6086,7 +6086,7 @@ bool CSSPropertyParser::parseDeprecatedGradientColorStop(CSSParserValue* a, CSSG
return true;
}
-bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& gradient)
+bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, RefPtr<CSSValue>& gradient)
{
// Walk the arguments.
CSSParserValueList* args = valueList->current()->function->args.get();
@@ -6105,7 +6105,7 @@ bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, R
else
return false;
- RefPtrWillBeRawPtr<CSSGradientValue> result = nullptr;
+ RefPtr<CSSGradientValue> result = nullptr;
switch (gradientType) {
case CSSDeprecatedLinearGradient:
result = CSSLinearGradientValue::create(NonRepeating, gradientType);
@@ -6128,7 +6128,7 @@ bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, R
a = args->current();
if (!a)
return false;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> point = parseDeprecatedGradientPoint(a, true);
+ RefPtr<CSSPrimitiveValue> point = parseDeprecatedGradientPoint(a, true);
if (!point)
return false;
result->setFirstX(point.release());
@@ -6219,7 +6219,7 @@ bool CSSPropertyParser::parseDeprecatedGradient(CSSParserValueList* valueList, R
return true;
}
-static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueFromSideKeyword(CSSParserValue* a, bool& isHorizontal)
+static PassRefPtr<CSSPrimitiveValue> valueFromSideKeyword(CSSParserValue* a, bool& isHorizontal)
{
if (a->m_unit != CSSParserValue::Identifier)
return nullptr;
@@ -6239,9 +6239,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, RefPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
{
- RefPtrWillBeRawPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSPrefixedLinearGradient);
+ RefPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSPrefixedLinearGradient);
// Walk the arguments.
CSSParserValueList* args = valueList->current()->function->args.get();
@@ -6261,10 +6261,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;
+ RefPtr<CSSPrimitiveValue> startX = nullptr;
+ RefPtr<CSSPrimitiveValue> startY = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> location = nullptr;
+ RefPtr<CSSPrimitiveValue> location = nullptr;
bool isHorizontal = false;
if ((location = valueFromSideKeyword(a, isHorizontal))) {
if (isHorizontal)
@@ -6309,9 +6309,9 @@ bool CSSPropertyParser::parseDeprecatedLinearGradient(CSSParserValueList* valueL
return true;
}
-bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
+bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueList, RefPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
{
- RefPtrWillBeRawPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSPrefixedRadialGradient);
+ RefPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSPrefixedRadialGradient);
// Walk the arguments.
CSSParserValueList* args = valueList->current()->function->args.get();
@@ -6325,8 +6325,8 @@ bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueL
bool expectComma = false;
// Optional background-position
- RefPtrWillBeRawPtr<CSSValue> centerX = nullptr;
- RefPtrWillBeRawPtr<CSSValue> centerY = nullptr;
+ RefPtr<CSSValue> centerX = nullptr;
+ RefPtr<CSSValue> centerY = nullptr;
// parse2ValuesFillPosition advances the args next pointer.
parse2ValuesFillPosition(args, centerX, centerY);
@@ -6343,8 +6343,8 @@ bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueL
result->setFirstY(toCSSPrimitiveValue(centerY.get()));
result->setSecondY(toCSSPrimitiveValue(centerY.get()));
- RefPtrWillBeRawPtr<CSSPrimitiveValue> shapeValue = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> sizeValue = nullptr;
+ RefPtr<CSSPrimitiveValue> shapeValue = nullptr;
+ RefPtr<CSSPrimitiveValue> sizeValue = nullptr;
// Optional shape and/or size in any order.
for (int i = 0; i < 2; ++i) {
@@ -6384,8 +6384,8 @@ bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueL
result->setSizingBehavior(sizeValue);
// Or, two lengths or percentages
- RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalSize = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalSize = nullptr;
+ RefPtr<CSSPrimitiveValue> horizontalSize = nullptr;
+ RefPtr<CSSPrimitiveValue> verticalSize = nullptr;
if (!shapeValue && !sizeValue) {
if (validUnit(a, FLength | FPercent)) {
@@ -6421,9 +6421,9 @@ bool CSSPropertyParser::parseDeprecatedRadialGradient(CSSParserValueList* valueL
return true;
}
-bool CSSPropertyParser::parseLinearGradient(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
+bool CSSPropertyParser::parseLinearGradient(CSSParserValueList* valueList, RefPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
{
- RefPtrWillBeRawPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSLinearGradient);
+ RefPtr<CSSLinearGradientValue> result = CSSLinearGradientValue::create(repeating, CSSLinearGradient);
CSSParserFunction* function = valueList->current()->function;
CSSParserValueList* args = function->args.get();
@@ -6447,9 +6447,9 @@ bool CSSPropertyParser::parseLinearGradient(CSSParserValueList* valueList, RefPt
if (!a)
return false;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> endX = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> endY = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> location = nullptr;
+ RefPtr<CSSPrimitiveValue> endX = nullptr;
+ RefPtr<CSSPrimitiveValue> endY = nullptr;
+ RefPtr<CSSPrimitiveValue> location = nullptr;
bool isHorizontal = false;
location = valueFromSideKeyword(a, isHorizontal);
@@ -6495,9 +6495,9 @@ bool CSSPropertyParser::parseLinearGradient(CSSParserValueList* valueList, RefPt
return true;
}
-bool CSSPropertyParser::parseRadialGradient(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
+bool CSSPropertyParser::parseRadialGradient(CSSParserValueList* valueList, RefPtr<CSSValue>& gradient, CSSGradientRepeat repeating)
{
- RefPtrWillBeRawPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSRadialGradient);
+ RefPtr<CSSRadialGradientValue> result = CSSRadialGradientValue::create(repeating, CSSRadialGradient);
CSSParserValueList* args = valueList->current()->function->args.get();
if (!args || !args->size())
@@ -6509,10 +6509,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;
+ RefPtr<CSSPrimitiveValue> shapeValue = nullptr;
+ RefPtr<CSSPrimitiveValue> sizeValue = nullptr;
+ RefPtr<CSSPrimitiveValue> horizontalSize = nullptr;
+ RefPtr<CSSPrimitiveValue> verticalSize = nullptr;
// First part of grammar, the size/shape clause:
// [ circle || <length> ] |
@@ -6587,8 +6587,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;
+ RefPtr<CSSValue> centerX = nullptr;
+ RefPtr<CSSValue> centerY = nullptr;
if (a->m_unit == CSSParserValue::Identifier && a->id == CSSValueAt) {
a = args->next();
if (!a)
@@ -6675,7 +6675,7 @@ bool CSSPropertyParser::parseGradientColorStops(CSSParserValueList* valueList, C
return gradient->stopCount() >= 2;
}
-bool CSSPropertyParser::parseGeneratedImage(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& value)
+bool CSSPropertyParser::parseGeneratedImage(CSSParserValueList* valueList, RefPtr<CSSValue>& value)
{
CSSParserValue* val = valueList->current();
@@ -6737,14 +6737,14 @@ bool CSSPropertyParser::parseGeneratedImage(CSSParserValueList* valueList, RefPt
return false;
}
-bool CSSPropertyParser::parseCrossfade(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& crossfade)
+bool CSSPropertyParser::parseCrossfade(CSSParserValueList* valueList, RefPtr<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;
+ RefPtr<CSSValue> fromImageValue = nullptr;
+ RefPtr<CSSValue> toImageValue = nullptr;
// The first argument is the "from" image. It is a fill image.
if (!args->current() || !parseFillImage(args, fromImageValue))
@@ -6763,7 +6763,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;
+ RefPtr<CSSPrimitiveValue> percentage = nullptr;
CSSParserValue* value = args->current();
if (!value)
return false;
@@ -6775,7 +6775,7 @@ bool CSSPropertyParser::parseCrossfade(CSSParserValueList* valueList, RefPtrWill
else
return false;
- RefPtrWillBeRawPtr<CSSCrossfadeValue> result = CSSCrossfadeValue::create(fromImageValue, toImageValue);
+ RefPtr<CSSCrossfadeValue> result = CSSCrossfadeValue::create(fromImageValue, toImageValue);
result->setPercentage(percentage);
crossfade = result;
@@ -6783,7 +6783,7 @@ bool CSSPropertyParser::parseCrossfade(CSSParserValueList* valueList, RefPtrWill
return true;
}
-bool CSSPropertyParser::parseCanvas(CSSParserValueList* valueList, RefPtrWillBeRawPtr<CSSValue>& canvas)
+bool CSSPropertyParser::parseCanvas(CSSParserValueList* valueList, RefPtr<CSSValue>& canvas)
{
// Walk the arguments.
CSSParserValueList* args = valueList->current()->function->args.get();
@@ -6799,7 +6799,7 @@ bool CSSPropertyParser::parseCanvas(CSSParserValueList* valueList, RefPtrWillBeR
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseImageSet(CSSParserValueList* valueList)
+PassRefPtr<CSSValue> CSSPropertyParser::parseImageSet(CSSParserValueList* valueList)
{
CSSParserValue* function = valueList->current();
@@ -6810,14 +6810,14 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseImageSet(CSSParserValue
if (!functionArgs || !functionArgs->size() || !functionArgs->current())
return nullptr;
- RefPtrWillBeRawPtr<CSSImageSetValue> imageSet = CSSImageSetValue::create();
+ RefPtr<CSSImageSetValue> imageSet = CSSImageSetValue::create();
while (functionArgs->current()) {
CSSParserValue* arg = functionArgs->current();
if (arg->unit() != CSSPrimitiveValue::UnitType::URI)
return nullptr;
- RefPtrWillBeRawPtr<CSSValue> image = createCSSImageValueWithReferrer(arg->string, completeURL(arg->string));
+ RefPtr<CSSValue> image = createCSSImageValueWithReferrer(arg->string, completeURL(arg->string));
imageSet->append(image);
arg = functionArgs->next();
@@ -6848,9 +6848,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseImageSet(CSSParserValue
return imageSet.release();
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseWillChange()
+PassRefPtr<CSSValue> CSSPropertyParser::parseWillChange()
{
- RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
+ RefPtr<CSSValueList> values = CSSValueList::createCommaSeparated();
if (m_valueList->current()->id == CSSValueAuto) {
// FIXME: This will be read back as an empty string instead of auto
return values.release();
@@ -6898,9 +6898,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseWillChange()
return values.release();
}
-PassRefPtrWillBeRawPtr<CSSFunctionValue> CSSPropertyParser::parseBuiltinFilterArguments(CSSParserValueList* args, CSSValueID filterType)
+PassRefPtr<CSSFunctionValue> CSSPropertyParser::parseBuiltinFilterArguments(CSSParserValueList* args, CSSValueID filterType)
{
- RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = CSSFunctionValue::create(filterType);
+ RefPtr<CSSFunctionValue> filterValue = CSSFunctionValue::create(filterType);
ASSERT(args);
switch (filterType) {
@@ -6969,7 +6969,7 @@ PassRefPtrWillBeRawPtr<CSSFunctionValue> CSSPropertyParser::parseBuiltinFilterAr
}
case CSSValueDropShadow: {
// drop-shadow() takes a single shadow.
- RefPtrWillBeRawPtr<CSSValueList> shadowValueList = parseShadow(args, CSSPropertyWebkitFilter);
+ RefPtr<CSSValueList> shadowValueList = parseShadow(args, CSSPropertyWebkitFilter);
if (!shadowValueList || shadowValueList->length() != 1)
return nullptr;
@@ -6982,20 +6982,20 @@ PassRefPtrWillBeRawPtr<CSSFunctionValue> CSSPropertyParser::parseBuiltinFilterAr
return filterValue.release();
}
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFilter()
+PassRefPtr<CSSValueList> CSSPropertyParser::parseFilter()
{
if (!m_valueList)
return nullptr;
// The filter is a list of functional primitives that specify individual operations.
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
if (value->unit() != CSSPrimitiveValue::UnitType::URI && (value->m_unit != CSSParserValue::Function || !value->function))
return nullptr;
// See if the specified primitive is one we understand.
if (value->unit() == CSSPrimitiveValue::UnitType::URI) {
- RefPtrWillBeRawPtr<CSSFunctionValue> referenceFilterValue = CSSFunctionValue::create(CSSValueUrl);
+ RefPtr<CSSFunctionValue> referenceFilterValue = CSSFunctionValue::create(CSSValueUrl);
referenceFilterValue->append(CSSSVGDocumentValue::create(value->string));
list->append(referenceFilterValue.release());
} else {
@@ -7006,7 +7006,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFilter()
if (!args || args->size() > maximumArgumentCount)
return nullptr;
- RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = parseBuiltinFilterArguments(args, filterType);
+ RefPtr<CSSFunctionValue> filterValue = parseBuiltinFilterArguments(args, filterType);
if (!filterValue)
return nullptr;
@@ -7017,13 +7017,13 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFilter()
return list.release();
}
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseTransformOrigin()
+PassRefPtr<CSSValueList> CSSPropertyParser::parseTransformOrigin()
{
CSSParserValue* value = m_valueList->current();
CSSValueID id = value->id;
- RefPtrWillBeRawPtr<CSSValue> xValue = nullptr;
- RefPtrWillBeRawPtr<CSSValue> yValue = nullptr;
- RefPtrWillBeRawPtr<CSSValue> zValue = nullptr;
+ RefPtr<CSSValue> xValue = nullptr;
+ RefPtr<CSSValue> yValue = nullptr;
+ RefPtr<CSSValue> zValue = nullptr;
if (id == CSSValueLeft || id == CSSValueRight) {
xValue = cssValuePool().createIdentifierValue(id);
} else if (id == CSSValueTop || id == CSSValueBottom) {
@@ -7075,7 +7075,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseTransformOrigin()
}
}
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
list->append(xValue.release());
if (yValue)
list->append(yValue.release());
@@ -7084,10 +7084,10 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseTransformOrigin()
return list.release();
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction()
+PassRefPtr<CSSValue> CSSPropertyParser::parseTouchAction()
{
CSSParserValue* value = m_valueList->current();
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
if (m_valueList->size() == 1 && value && (value->id == CSSValueAuto || value->id == CSSValueNone || value->id == CSSValueManipulation)) {
list->append(cssValuePool().createIdentifierValue(value->id));
m_valueList->next();
@@ -7107,7 +7107,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction()
if (value->id != CSSValuePanX && !RuntimeEnabledFeatures::cssTouchActionPanDirectionsEnabled())
return nullptr;
- RefPtrWillBeRawPtr<CSSValue> panValue = cssValuePool().createIdentifierValue(value->id);
+ RefPtr<CSSValue> panValue = cssValuePool().createIdentifierValue(value->id);
list->append(panValue.release());
break;
}
@@ -7119,7 +7119,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction()
ySet = true;
if (value->id != CSSValuePanY && !RuntimeEnabledFeatures::cssTouchActionPanDirectionsEnabled())
return nullptr;
- RefPtrWillBeRawPtr<CSSValue> panValue = cssValuePool().createIdentifierValue(value->id);
+ RefPtr<CSSValue> panValue = cssValuePool().createIdentifierValue(value->id);
list->append(panValue.release());
break;
}
@@ -7135,7 +7135,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTouchAction()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextDecoration()
+PassRefPtr<CSSValue> CSSPropertyParser::parseTextDecoration()
{
CSSParserValue* value = m_valueList->current();
if (value && value->id == CSSValueNone) {
@@ -7143,7 +7143,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextDecoration()
return cssValuePool().createIdentifierValue(CSSValueNone);
}
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
bool isValid = true;
while (isValid && value) {
switch (value->id) {
@@ -7168,10 +7168,10 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextDecoration()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextEmphasisStyle()
+PassRefPtr<CSSValue> CSSPropertyParser::parseTextEmphasisStyle()
{
- RefPtrWillBeRawPtr<CSSPrimitiveValue> fill = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> shape = nullptr;
+ RefPtr<CSSPrimitiveValue> fill = nullptr;
+ RefPtr<CSSPrimitiveValue> shape = nullptr;
for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
if (value->unit() == CSSPrimitiveValue::UnitType::String) {
@@ -7202,7 +7202,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextEmphasisStyle()
}
if (fill && shape) {
- RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
parsedValues->append(fill.release());
parsedValues->append(shape.release());
return parsedValues.release();
@@ -7215,9 +7215,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextEmphasisStyle()
return nullptr;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextIndent()
+PassRefPtr<CSSValue> CSSPropertyParser::parseTextIndent()
{
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
bool hasLengthOrPercentage = false;
bool hasEachLine = false;
@@ -7254,7 +7254,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextIndent()
return list.release();
}
-PassRefPtrWillBeRawPtr<CSSLineBoxContainValue> CSSPropertyParser::parseLineBoxContain()
+PassRefPtr<CSSLineBoxContainValue> CSSPropertyParser::parseLineBoxContain()
{
LineBoxContain lineBoxContain = LineBoxContainNone;
@@ -7321,9 +7321,9 @@ bool CSSPropertyParser::parseFontFeatureTag(CSSValueList* settings)
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFontFeatureSettings()
+PassRefPtr<CSSValue> CSSPropertyParser::parseFontFeatureSettings()
{
- RefPtrWillBeRawPtr<CSSValueList> settings = CSSValueList::createCommaSeparated();
+ RefPtr<CSSValueList> settings = CSSValueList::createCommaSeparated();
while (true) {
if (!m_valueList->current() || !parseFontFeatureTag(settings.get()))
return nullptr;
@@ -7337,7 +7337,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseFontFeatureSettings()
bool CSSPropertyParser::parseFontVariantLigatures(bool important)
{
- RefPtrWillBeRawPtr<CSSValueList> ligatureValues = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> ligatureValues = CSSValueList::createSpaceSeparated();
bool sawCommonLigaturesValue = false;
bool sawDiscretionaryLigaturesValue = false;
bool sawHistoricalLigaturesValue = false;
@@ -7408,7 +7408,7 @@ bool CSSPropertyParser::parseFontFaceDescriptor(CSSPropertyID propId)
CSSParserValue* value = m_valueList->current();
ASSERT(value);
CSSValueID id = value->id;
- RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
+ RefPtr<CSSValue> parsedValue = nullptr;
switch (propId) {
case CSSPropertyFontFamily:
@@ -7495,7 +7495,7 @@ bool CSSPropertyParser::parseViewportProperty(CSSPropertyID propId, bool importa
break;
}
- RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
+ RefPtr<CSSValue> parsedValue = nullptr;
if (validPrimitive) {
parsedValue = parseValidPrimitive(id, value);
m_valueList->next();
@@ -7620,7 +7620,7 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
CSSValueID id = value->id;
bool validPrimitive = false;
- RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
+ RefPtr<CSSValue> parsedValue = nullptr;
switch (propId) {
/* The comment to the right defines all valid value of these
@@ -7685,7 +7685,7 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
parsedValue = cssValuePool().createIdentifierValue(id);
} else if (value->unit() == CSSPrimitiveValue::UnitType::URI) {
if (m_valueList->next()) {
- RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
values->append(CSSPrimitiveValue::create(value->string, CSSPrimitiveValue::UnitType::URI));
if (m_valueList->current()->id == CSSValueNone)
parsedValue = cssValuePool().createIdentifierValue(m_valueList->current()->id);
@@ -7789,9 +7789,9 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
return true;
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSVGStrokeDasharray()
+PassRefPtr<CSSValue> CSSPropertyParser::parseSVGStrokeDasharray()
{
- RefPtrWillBeRawPtr<CSSValueList> ret = CSSValueList::createCommaSeparated();
+ RefPtr<CSSValueList> ret = CSSValueList::createCommaSeparated();
CSSParserValue* value = m_valueList->current();
bool validPrimitive = true;
while (value) {
@@ -7816,7 +7816,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseSVGStrokeDasharray()
}
// normal | [ fill || stroke || markers ]
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parsePaintOrder() const
+PassRefPtr<CSSValue> CSSPropertyParser::parsePaintOrder() const
{
if (m_valueList->size() > 3)
return nullptr;
@@ -7825,9 +7825,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parsePaintOrder() const
ASSERT(value);
Vector<CSSValueID, 3> paintTypeList;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> fill = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> stroke = nullptr;
- RefPtrWillBeRawPtr<CSSPrimitiveValue> markers = nullptr;
+ RefPtr<CSSPrimitiveValue> fill = nullptr;
+ RefPtr<CSSPrimitiveValue> stroke = nullptr;
+ RefPtr<CSSPrimitiveValue> markers = nullptr;
while (value) {
if (value->id == CSSValueFill && !fill)
fill = CSSPrimitiveValue::createIdentifier(value->id);
@@ -7845,7 +7845,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parsePaintOrder() const
// pop a last list items from CSSValueList without bigger cost, we create the
// list after parsing.
CSSValueID firstPaintOrderType = paintTypeList.at(0);
- RefPtrWillBeRawPtr<CSSValueList> paintOrderList = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> paintOrderList = CSSValueList::createSpaceSeparated();
switch (firstPaintOrderType) {
case CSSValueFill:
case CSSValueStroke:
@@ -7971,14 +7971,14 @@ private:
CSSPropertyParser::Units m_unit;
};
-PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseTransform(bool useLegacyParsing)
+PassRefPtr<CSSValueList> CSSPropertyParser::parseTransform(bool useLegacyParsing)
{
if (!m_valueList)
return nullptr;
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
- RefPtrWillBeRawPtr<CSSValue> parsedTransformValue = parseTransformValue(useLegacyParsing, value);
+ RefPtr<CSSValue> parsedTransformValue = parseTransformValue(useLegacyParsing, value);
if (!parsedTransformValue)
return nullptr;
@@ -7988,7 +7988,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseTransform(bool useL
return list.release();
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTransformValue(bool useLegacyParsing, CSSParserValue *value)
+PassRefPtr<CSSValue> CSSPropertyParser::parseTransformValue(bool useLegacyParsing, CSSParserValue *value)
{
if (value->m_unit != CSSParserValue::Function || !value->function)
return nullptr;
@@ -8011,7 +8011,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTransformValue(bool use
// We collect a list of CSSFunctionValues, where each value specifies a single operation.
// Create the new CSSFunctionValue for this operation and add it to our list.
- RefPtrWillBeRawPtr<CSSFunctionValue> transformValue = CSSFunctionValue::create(type);
+ RefPtr<CSSFunctionValue> transformValue = CSSFunctionValue::create(type);
// Snag our values.
CSSParserValue* a = args->current();
@@ -8060,7 +8060,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTransformValue(bool use
return transformValue.release();
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseMotionPath()
+PassRefPtr<CSSValue> CSSPropertyParser::parseMotionPath()
{
CSSParserValue* value = m_valueList->current();
@@ -8086,9 +8086,9 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseMotionPath()
return CSSPathValue::create(pathString);
}
-PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseMotionRotation()
+PassRefPtr<CSSValue> CSSPropertyParser::parseMotionRotation()
{
- RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
bool hasAutoOrReverse = false;
bool hasAngle = false;
« no previous file with comments | « Source/core/css/parser/CSSPropertyParser.h ('k') | Source/core/css/parser/CSSPropertyParserTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698