| Index: Source/core/css/parser/CSSPropertyParser.cpp
|
| diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
|
| index 994aed2540123d395c224dbf6ef0f8910cd3e58e..b2180377140ff052df633dcbd92fb1890cec4215 100644
|
| --- a/Source/core/css/parser/CSSPropertyParser.cpp
|
| +++ b/Source/core/css/parser/CSSPropertyParser.cpp
|
| @@ -50,6 +50,7 @@
|
| #include "core/css/CSSReflectValue.h"
|
| #include "core/css/CSSSVGDocumentValue.h"
|
| #include "core/css/CSSShadowValue.h"
|
| +#include "core/css/CSSStringValue.h"
|
| #include "core/css/CSSTimingFunctionValue.h"
|
| #include "core/css/CSSUnicodeRangeValue.h"
|
| #include "core/css/CSSValuePair.h"
|
| @@ -307,16 +308,16 @@ PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveNume
|
| return cssValuePool().createValue(value->fValue, value->unit());
|
| }
|
|
|
| -inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveStringValue(CSSParserValue* value)
|
| +inline PassRefPtrWillBeRawPtr<CSSStringValue> CSSPropertyParser::createPrimitiveStringValue(CSSParserValue* value)
|
| {
|
| - ASSERT(value->unit() == CSSPrimitiveValue::UnitType::String || value->m_unit == CSSParserValue::Identifier);
|
| - return cssValuePool().createValue(value->string, CSSPrimitiveValue::UnitType::String);
|
| + ASSERT(value->m_unit == CSSParserValue::String || value->m_unit == CSSParserValue::Identifier);
|
| + return CSSStringValue::create(value->string, CSSStringValue::SerializeAsString);
|
| }
|
|
|
| -inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimitiveCustomIdentValue(CSSParserValue* value)
|
| +inline PassRefPtrWillBeRawPtr<CSSStringValue> CSSPropertyParser::createPrimitiveCustomIdentValue(CSSParserValue* value)
|
| {
|
| - ASSERT(value->unit() == CSSPrimitiveValue::UnitType::String || value->m_unit == CSSParserValue::Identifier);
|
| - return cssValuePool().createValue(value->string, CSSPrimitiveValue::UnitType::CustomIdentifier);
|
| + ASSERT(value->m_unit == CSSParserValue::String || value->m_unit == CSSParserValue::Identifier);
|
| + return CSSStringValue::create(value->string, CSSStringValue::SerializeAsCustomIdentifier);
|
| }
|
|
|
| inline PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::createCSSImageValueWithReferrer(const String& rawValue, const KURL& url)
|
| @@ -595,7 +596,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
|
| RefPtrWillBeRawPtr<CSSValueList> list = nullptr;
|
| while (value) {
|
| RefPtrWillBeRawPtr<CSSValue> image = nullptr;
|
| - if (value->unit() == CSSPrimitiveValue::UnitType::URI) {
|
| + if (value->m_unit == CSSParserValue::URI) {
|
| String uri = value->string;
|
| if (!uri.isNull())
|
| image = createCSSImageValueWithReferrer(uri, completeURL(uri));
|
| @@ -724,7 +725,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
|
| if (id == CSSValueNone) {
|
| parsedValue = cssValuePool().createIdentifierValue(CSSValueNone);
|
| m_valueList->next();
|
| - } else if (value->unit() == CSSPrimitiveValue::UnitType::URI) {
|
| + } else if (value->m_unit == CSSParserValue::URI) {
|
| parsedValue = createCSSImageValueWithReferrer(value->string, completeURL(value->string));
|
| m_valueList->next();
|
| } else if (isGeneratedImageValue(value)) {
|
| @@ -1341,7 +1342,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
|
| case CSSPropertyWebkitHighlight:
|
| if (id == CSSValueNone) {
|
| validPrimitive = true;
|
| - } else if (value->unit() == CSSPrimitiveValue::UnitType::String) {
|
| + } else if (value->m_unit == CSSParserValue::String) {
|
| parsedValue = createPrimitiveStringValue(value);
|
| m_valueList->next();
|
| }
|
| @@ -1351,7 +1352,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
|
| case CSSPropertyWebkitLocale:
|
| if (id == CSSValueAuto) {
|
| validPrimitive = true;
|
| - } else if (value->unit() == CSSPrimitiveValue::UnitType::String) {
|
| + } else if (value->m_unit == CSSParserValue::String) {
|
| parsedValue = createPrimitiveStringValue(value);
|
| m_valueList->next();
|
| }
|
| @@ -1496,8 +1497,8 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
|
| validPrimitive = true;
|
| } else if (value->m_unit == CSSParserValue::Function) {
|
| parsedValue = parseBasicShape();
|
| - } else if (value->unit() == CSSPrimitiveValue::UnitType::URI) {
|
| - parsedValue = CSSPrimitiveValue::create(value->string, CSSPrimitiveValue::UnitType::URI);
|
| + } else if (value->m_unit == CSSParserValue::URI) {
|
| + parsedValue = CSSStringValue::create(value->string, CSSStringValue::SerializeAsURI);
|
| addProperty(propId, parsedValue.release(), important);
|
| return true;
|
| }
|
| @@ -2102,7 +2103,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseScrollSnapCoordinate()
|
| return parsePositionList(m_valueList);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::parsePage()
|
| +PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parsePage()
|
| {
|
| CSSParserValue* value = m_valueList->current();
|
| m_valueList->next();
|
| @@ -2187,7 +2188,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseQuotes()
|
| RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
|
| while (CSSParserValue* val = m_valueList->current()) {
|
| RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
|
| - if (val->unit() != CSSPrimitiveValue::UnitType::String)
|
| + if (val->m_unit != CSSParserValue::String)
|
| return nullptr;
|
| parsedValue = createPrimitiveStringValue(val);
|
| values->append(parsedValue.release());
|
| @@ -2207,7 +2208,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseContent()
|
|
|
| while (CSSParserValue* val = m_valueList->current()) {
|
| RefPtrWillBeRawPtr<CSSValue> parsedValue = nullptr;
|
| - if (val->unit() == CSSPrimitiveValue::UnitType::URI) {
|
| + if (val->m_unit == CSSParserValue::URI) {
|
| // url
|
| parsedValue = createCSSImageValueWithReferrer(val->string, completeURL(val->string));
|
| } else if (val->m_unit == CSSParserValue::Function) {
|
| @@ -2239,7 +2240,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseContent()
|
| default:
|
| break;
|
| }
|
| - } else if (val->unit() == CSSPrimitiveValue::UnitType::String) {
|
| + } else if (val->m_unit == CSSParserValue::String) {
|
| parsedValue = createPrimitiveStringValue(val);
|
| }
|
| if (!parsedValue)
|
| @@ -2272,7 +2273,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAttr(CSSParserValueList
|
| attrName = attrName.lower();
|
|
|
| RefPtrWillBeRawPtr<CSSFunctionValue> attrValue = CSSFunctionValue::create(CSSValueAttr);
|
| - attrValue->append(CSSPrimitiveValue::create(attrName, CSSPrimitiveValue::UnitType::CustomIdentifier));
|
| + attrValue->append(CSSStringValue::create(attrName, CSSStringValue::SerializeAsCustomIdentifier));
|
| return attrValue.release();
|
| }
|
|
|
| @@ -2344,7 +2345,7 @@ bool CSSPropertyParser::parseFillImage(CSSParserValueList* valueList, RefPtrWill
|
| value = cssValuePool().createIdentifierValue(CSSValueNone);
|
| return true;
|
| }
|
| - if (valueList->current()->unit() == CSSPrimitiveValue::UnitType::URI) {
|
| + if (valueList->current()->m_unit == CSSParserValue::URI) {
|
| value = createCSSImageValueWithReferrer(valueList->current()->string, completeURL(valueList->current()->string));
|
| return true;
|
| }
|
| @@ -3033,7 +3034,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseAnimationName(bool allo
|
| if (value->m_unit == CSSParserValue::Identifier)
|
| return createPrimitiveCustomIdentValue(value);
|
|
|
| - if (allowQuotedName && value->unit() == CSSPrimitiveValue::UnitType::String) {
|
| + if (allowQuotedName && value->m_unit == CSSParserValue::String) {
|
| // Legacy support for strings in prefixed animations
|
| if (m_context.useCounter())
|
| m_context.useCounter()->count(UseCounter::QuotedAnimationName);
|
| @@ -3239,7 +3240,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(RefPtrWillBeRawPtr<CSSPrimitiveValue>& numericValue, RefPtrWillBeRawPtr<CSSStringValue>& gridLineName)
|
| {
|
| CSSParserValue* value = m_valueList->current();
|
| if (validUnit(value, FInteger) && value->fValue) {
|
| @@ -3276,7 +3277,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
|
| }
|
|
|
| RefPtrWillBeRawPtr<CSSPrimitiveValue> numericValue = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> gridLineName = nullptr;
|
| + RefPtrWillBeRawPtr<CSSStringValue> gridLineName = nullptr;
|
| bool hasSeenSpanKeyword = false;
|
|
|
| if (parseIntegerOrCustomIdentFromGridPosition(numericValue, gridLineName)) {
|
| @@ -3308,7 +3309,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
|
|
|
| // For the <custom-ident> case.
|
| if (gridLineName && !numericValue && !hasSeenSpanKeyword)
|
| - return cssValuePool().createValue(gridLineName->getStringValue(), CSSPrimitiveValue::UnitType::CustomIdentifier);
|
| + return CSSStringValue::create(gridLineName->getStringValue(), CSSStringValue::SerializeAsCustomIdentifier);
|
|
|
| RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
|
| if (hasSeenSpanKeyword)
|
| @@ -3323,7 +3324,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseGridPosition()
|
|
|
| static PassRefPtrWillBeRawPtr<CSSValue> gridMissingGridPositionValue(CSSValue* value)
|
| {
|
| - if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->isCustomIdent())
|
| + if (value->isStringValue() && toCSSStringValue(value)->serializationType() == CSSStringValue::SerializeAsCustomIdentifier)
|
| return value;
|
|
|
| return cssValuePool().createIdentifierValue(CSSValueAuto);
|
| @@ -3382,7 +3383,7 @@ bool CSSPropertyParser::parseGridTemplateRowsAndAreas(PassRefPtrWillBeRawPtr<CSS
|
| ++rowCount;
|
|
|
| // Handle template-rows's track-size.
|
| - if (m_valueList->current() && m_valueList->current()->unit() != CSSPrimitiveValue::UnitType::String) {
|
| + if (m_valueList->current() && m_valueList->current()->m_unit != CSSParserValue::String) {
|
| RefPtrWillBeRawPtr<CSSValue> value = parseGridTrackSize(*m_valueList);
|
| if (!value)
|
| return false;
|
| @@ -3605,7 +3606,7 @@ bool CSSPropertyParser::parseGridLineNames(CSSParserValueList& inputList, CSSVal
|
| if (!isValidCustomIdentForGridPositions(*identValue))
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> lineName = createPrimitiveCustomIdentValue(identValue);
|
| + RefPtrWillBeRawPtr<CSSStringValue> lineName = createPrimitiveCustomIdentValue(identValue);
|
| lineNames->append(lineName.release());
|
| inputList.next();
|
| }
|
| @@ -3809,7 +3810,7 @@ static Vector<String> parseGridTemplateAreasColumnNames(const String& gridRowNam
|
| bool CSSPropertyParser::parseGridTemplateAreasRow(NamedGridAreaMap& gridAreaMap, const size_t rowCount, size_t& columnCount)
|
| {
|
| CSSParserValue* currentValue = m_valueList->current();
|
| - if (!currentValue || currentValue->unit() != CSSPrimitiveValue::UnitType::String)
|
| + if (!currentValue || currentValue->m_unit != CSSParserValue::String)
|
| return false;
|
|
|
| String gridRowNames = currentValue->string;
|
| @@ -3941,18 +3942,18 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounterContent(CSSParse
|
| CSSParserValue* i = args->current();
|
| if (i->m_unit != CSSParserValue::Identifier)
|
| return nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> identifier = createPrimitiveCustomIdentValue(i);
|
| + RefPtrWillBeRawPtr<CSSStringValue> identifier = createPrimitiveCustomIdentValue(i);
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> separator = nullptr;
|
| + RefPtrWillBeRawPtr<CSSStringValue> separator = nullptr;
|
| if (!counters)
|
| - separator = cssValuePool().createValue(String(), CSSPrimitiveValue::UnitType::CustomIdentifier);
|
| + separator = CSSStringValue::create(String(), CSSStringValue::SerializeAsCustomIdentifier);
|
| else {
|
| args->next();
|
| if (!consumeComma(args))
|
| return nullptr;
|
|
|
| i = args->current();
|
| - if (i->unit() != CSSPrimitiveValue::UnitType::String)
|
| + if (i->m_unit != CSSParserValue::String)
|
| return nullptr;
|
|
|
| separator = createPrimitiveCustomIdentValue(i);
|
| @@ -4712,7 +4713,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFamily()
|
| bool nextValBreaksFont = !nextValue || isComma(nextValue);
|
| bool nextValIsFontName = nextValue &&
|
| ((nextValue->id >= CSSValueSerif && nextValue->id <= CSSValueWebkitBody) ||
|
| - (nextValue->unit() == CSSPrimitiveValue::UnitType::String || nextValue->m_unit == CSSParserValue::Identifier));
|
| + (nextValue->m_unit == CSSParserValue::String || nextValue->m_unit == CSSParserValue::Identifier));
|
|
|
| if (isCSSWideKeyword(*value) && !inFamily) {
|
| if (nextValBreaksFont)
|
| @@ -4732,7 +4733,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFamily()
|
| familyBuilder.add(value->string);
|
| inFamily = true;
|
| }
|
| - } else if (value->unit() == CSSPrimitiveValue::UnitType::String) {
|
| + } else if (value->m_unit == CSSParserValue::String) {
|
| // Strings never share in a family name.
|
| inFamily = false;
|
| familyBuilder.commit();
|
| @@ -4888,7 +4889,7 @@ bool CSSPropertyParser::parseFontFaceSrcURI(CSSValueList* valueList)
|
| // FIXME: http://www.w3.org/TR/2011/WD-css3-fonts-20111004/ says that format() contains a comma-separated list of strings,
|
| // but CSSFontFaceSrcValue stores only one format. Allowing one format for now.
|
| CSSParserValueList* args = value->function->args.get();
|
| - if (!args || args->size() != 1 || (args->current()->unit() != CSSPrimitiveValue::UnitType::String && args->current()->m_unit != CSSParserValue::Identifier))
|
| + if (!args || args->size() != 1 || (args->current()->m_unit != CSSParserValue::String && args->current()->m_unit != CSSParserValue::Identifier))
|
| return false;
|
| uriValue->setFormat(args->current()->string);
|
| valueList->append(uriValue.release());
|
| @@ -4904,7 +4905,7 @@ bool CSSPropertyParser::parseFontFaceSrcLocal(CSSValueList* valueList)
|
| m_valueList->next();
|
|
|
| ContentSecurityPolicyDisposition shouldCheckContentSecurityPolicy = m_context.shouldCheckContentSecurityPolicy();
|
| - if (args->size() == 1 && args->current()->unit() == CSSPrimitiveValue::UnitType::String) {
|
| + if (args->size() == 1 && args->current()->m_unit == CSSParserValue::String) {
|
| valueList->append(CSSFontFaceSrcValue::createLocal(args->current()->string, shouldCheckContentSecurityPolicy));
|
| } else if (args->current()->m_unit == CSSParserValue::Identifier) {
|
| StringBuilder builder;
|
| @@ -4930,7 +4931,7 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFontFaceSrc()
|
| CSSParserValue* value = m_valueList->current();
|
| if (!value)
|
| return nullptr;
|
| - if (value->unit() == CSSPrimitiveValue::UnitType::URI) {
|
| + if (value->m_unit == CSSParserValue::URI) {
|
| if (!parseFontFaceSrcURI(values.get()))
|
| return nullptr;
|
| } else if (value->m_unit == CSSParserValue::Function && value->function->id == CSSValueLocal) {
|
| @@ -5574,7 +5575,7 @@ bool CSSPropertyParser::buildBorderImageParseContext(CSSPropertyID propId, Borde
|
| context.commitForwardSlashOperator();
|
|
|
| if (!context.canAdvance() && context.allowImage()) {
|
| - if (val->unit() == CSSPrimitiveValue::UnitType::URI) {
|
| + if (val->m_unit == CSSParserValue::URI) {
|
| context.commitImage(createCSSImageValueWithReferrer(val->string, m_context.completeURL(val->string)));
|
| } else if (isGeneratedImageValue(val)) {
|
| RefPtrWillBeRawPtr<CSSValue> value = nullptr;
|
| @@ -5975,7 +5976,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseCounter(int defaultValu
|
| CSSParserValue* val = m_valueList->current();
|
| if (val->m_unit != CSSParserValue::Identifier)
|
| return nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> counterName = createPrimitiveCustomIdentValue(val);
|
| + RefPtrWillBeRawPtr<CSSStringValue> counterName = createPrimitiveCustomIdentValue(val);
|
| m_valueList->next();
|
|
|
| val = m_valueList->current();
|
| @@ -6804,7 +6805,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseImageSet(CSSParserValue
|
|
|
| while (functionArgs->current()) {
|
| CSSParserValue* arg = functionArgs->current();
|
| - if (arg->unit() != CSSPrimitiveValue::UnitType::URI)
|
| + if (arg->m_unit != CSSParserValue::URI)
|
| return nullptr;
|
|
|
| RefPtrWillBeRawPtr<CSSValue> image = createCSSImageValueWithReferrer(arg->string, completeURL(arg->string));
|
| @@ -6980,11 +6981,11 @@ PassRefPtrWillBeRawPtr<CSSValueList> CSSPropertyParser::parseFilter()
|
| // The filter is a list of functional primitives that specify individual operations.
|
| RefPtrWillBeRawPtr<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))
|
| + if (value->m_unit != CSSParserValue::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) {
|
| + if (value->m_unit == CSSParserValue::URI) {
|
| RefPtrWillBeRawPtr<CSSFunctionValue> referenceFilterValue = CSSFunctionValue::create(CSSValueUrl);
|
| referenceFilterValue->append(CSSSVGDocumentValue::create(value->string));
|
| list->append(referenceFilterValue.release());
|
| @@ -7164,7 +7165,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseTextEmphasisStyle()
|
| RefPtrWillBeRawPtr<CSSPrimitiveValue> shape = nullptr;
|
|
|
| for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) {
|
| - if (value->unit() == CSSPrimitiveValue::UnitType::String) {
|
| + if (value->m_unit == CSSParserValue::String) {
|
| if (fill || shape)
|
| return nullptr;
|
| m_valueList->next();
|
| @@ -7281,7 +7282,7 @@ bool CSSPropertyParser::parseFontFeatureTag(CSSValueList* settings)
|
|
|
| CSSParserValue* value = m_valueList->current();
|
| // Feature tag name comes first
|
| - if (value->unit() != CSSPrimitiveValue::UnitType::String)
|
| + if (value->m_unit != CSSParserValue::String)
|
| return false;
|
| if (value->string.length() != tagNameLength)
|
| return false;
|
| @@ -7631,8 +7632,8 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
|
| case CSSPropertyMask:
|
| if (id == CSSValueNone) {
|
| validPrimitive = true;
|
| - } else if (value->unit() == CSSPrimitiveValue::UnitType::URI) {
|
| - parsedValue = CSSPrimitiveValue::create(value->string, CSSPrimitiveValue::UnitType::URI);
|
| + } else if (value->m_unit == CSSParserValue::URI) {
|
| + parsedValue = CSSStringValue::create(value->string, CSSStringValue::SerializeAsURI);
|
| if (parsedValue)
|
| m_valueList->next();
|
| }
|
| @@ -7673,10 +7674,10 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
|
| {
|
| if (id == CSSValueNone) {
|
| parsedValue = cssValuePool().createIdentifierValue(id);
|
| - } else if (value->unit() == CSSPrimitiveValue::UnitType::URI) {
|
| + } else if (value->m_unit == CSSParserValue::URI) {
|
| if (m_valueList->next()) {
|
| RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
|
| - values->append(CSSPrimitiveValue::create(value->string, CSSPrimitiveValue::UnitType::URI));
|
| + values->append(CSSStringValue::create(value->string, CSSStringValue::SerializeAsURI));
|
| if (m_valueList->current()->id == CSSValueNone)
|
| parsedValue = cssValuePool().createIdentifierValue(m_valueList->current()->id);
|
| else
|
| @@ -7687,7 +7688,7 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
|
| }
|
| }
|
| if (!parsedValue)
|
| - parsedValue = CSSPrimitiveValue::create(value->string, CSSPrimitiveValue::UnitType::URI);
|
| + parsedValue = CSSStringValue::create(value->string, CSSStringValue::SerializeAsURI);
|
| } else {
|
| parsedValue = parseColor(m_valueList->current());
|
| }
|
| @@ -7756,8 +7757,8 @@ bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
|
| if (validPrimitive) {
|
| if (id)
|
| parsedValue = CSSPrimitiveValue::createIdentifier(id);
|
| - else if (value->unit() == CSSPrimitiveValue::UnitType::String)
|
| - parsedValue = CSSPrimitiveValue::create(value->string, value->unit());
|
| + else if (value->m_unit == CSSParserValue::String)
|
| + parsedValue = CSSStringValue::create(value->string, CSSStringValue::SerializeAsString);
|
| else if (value->unit() >= CSSPrimitiveValue::UnitType::Number && value->unit() <= CSSPrimitiveValue::UnitType::Kilohertz)
|
| parsedValue = CSSPrimitiveValue::create(value->fValue, value->unit());
|
| else if (value->unit() == CSSPrimitiveValue::UnitType::Rems || value->unit() == CSSPrimitiveValue::UnitType::Chs)
|
| @@ -8064,7 +8065,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parseMotionPath()
|
| return nullptr;
|
|
|
| CSSParserValue* arg = functionArgs->current();
|
| - if (arg->unit() != CSSPrimitiveValue::UnitType::String)
|
| + if (arg->m_unit != CSSParserValue::String)
|
| return nullptr;
|
|
|
| String pathString = arg->string;
|
|
|