| Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| index cf830e7eb6d69dad119729560bcfcb276faeda81..fb2ca144d312005d5ccfba2f44e720b079fcba15 100644
|
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| @@ -41,6 +41,7 @@
|
| #include "core/css/CSSFunctionValue.h"
|
| #include "core/css/CSSGridLineNamesValue.h"
|
| #include "core/css/CSSGridTemplateAreasValue.h"
|
| +#include "core/css/CSSIdentifierValue.h"
|
| #include "core/css/CSSInitialValue.h"
|
| #include "core/css/CSSPathValue.h"
|
| #include "core/css/CSSPrimitiveValue.h"
|
| @@ -79,24 +80,31 @@ inline static CSSPrimitiveValue* zoomAdjustedPixelValue(double value, const Comp
|
| return CSSPrimitiveValue::create(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::UnitType::Pixels);
|
| }
|
|
|
| +inline static CSSValue* zoomAdjustedPixelValueOrAuto(const Length& length, const ComputedStyle& style)
|
| +{
|
| + if (length.isAuto())
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| + return zoomAdjustedPixelValue(length.value(), style);
|
| +}
|
| +
|
| inline static CSSPrimitiveValue* zoomAdjustedNumberValue(double value, const ComputedStyle& style)
|
| {
|
| return CSSPrimitiveValue::create(value / style.effectiveZoom(), CSSPrimitiveValue::UnitType::Number);
|
| }
|
|
|
| -static CSSPrimitiveValue* zoomAdjustedPixelValueForLength(const Length& length, const ComputedStyle& style)
|
| +static CSSValue* zoomAdjustedPixelValueForLength(const Length& length, const ComputedStyle& style)
|
| {
|
| if (length.isFixed())
|
| return zoomAdjustedPixelValue(length.value(), style);
|
| - return CSSPrimitiveValue::create(length, style.effectiveZoom());
|
| + return CSSValue::create(length, style.effectiveZoom());
|
| }
|
|
|
| -static CSSPrimitiveValue* pixelValueForUnzoomedLength(const UnzoomedLength& unzoomedLength, const ComputedStyle& style)
|
| +static CSSValue* pixelValueForUnzoomedLength(const UnzoomedLength& unzoomedLength, const ComputedStyle& style)
|
| {
|
| const Length& length = unzoomedLength.length();
|
| if (length.isFixed())
|
| return CSSPrimitiveValue::create(length.value(), CSSPrimitiveValue::UnitType::Pixels);
|
| - return CSSPrimitiveValue::create(length, style.effectiveZoom());
|
| + return CSSValue::create(length, style.effectiveZoom());
|
| }
|
|
|
| static CSSValueList* createPositionListForLayer(CSSPropertyID propertyID, const FillLayer& layer, const ComputedStyle& style)
|
| @@ -104,12 +112,12 @@ static CSSValueList* createPositionListForLayer(CSSPropertyID propertyID, const
|
| CSSValueList* positionList = CSSValueList::createSpaceSeparated();
|
| if (layer.isBackgroundXOriginSet()) {
|
| ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
|
| - positionList->append(*CSSPrimitiveValue::create(layer.backgroundXOrigin()));
|
| + positionList->append(*CSSIdentifierValue::create(layer.backgroundXOrigin()));
|
| }
|
| positionList->append(*zoomAdjustedPixelValueForLength(layer.xPosition(), style));
|
| if (layer.isBackgroundYOriginSet()) {
|
| ASSERT(propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
|
| - positionList->append(*CSSPrimitiveValue::create(layer.backgroundYOrigin()));
|
| + positionList->append(*CSSIdentifierValue::create(layer.backgroundYOrigin()));
|
| }
|
| positionList->append(*zoomAdjustedPixelValueForLength(layer.yPosition(), style));
|
| return positionList;
|
| @@ -124,10 +132,10 @@ CSSValue* ComputedStyleCSSValueMapping::currentColorOrValidColor(const ComputedS
|
| static CSSValue* valueForFillSize(const FillSize& fillSize, const ComputedStyle& style)
|
| {
|
| if (fillSize.type == Contain)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueContain);
|
| + return CSSIdentifierValue::create(CSSValueContain);
|
|
|
| if (fillSize.type == Cover)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueCover);
|
| + return CSSIdentifierValue::create(CSSValueCover);
|
|
|
| if (fillSize.size.height().isAuto())
|
| return zoomAdjustedPixelValueForLength(fillSize.size.width(), style);
|
| @@ -143,15 +151,15 @@ static CSSValue* valueForFillRepeat(EFillRepeat xRepeat, EFillRepeat yRepeat)
|
| // For backwards compatibility, if both values are equal, just return one of them. And
|
| // if the two values are equivalent to repeat-x or repeat-y, just return the shorthand.
|
| if (xRepeat == yRepeat)
|
| - return CSSPrimitiveValue::create(xRepeat);
|
| + return CSSIdentifierValue::create(xRepeat);
|
| if (xRepeat == RepeatFill && yRepeat == NoRepeatFill)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueRepeatX);
|
| + return CSSIdentifierValue::create(CSSValueRepeatX);
|
| if (xRepeat == NoRepeatFill && yRepeat == RepeatFill)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueRepeatY);
|
| + return CSSIdentifierValue::create(CSSValueRepeatY);
|
|
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| - list->append(*CSSPrimitiveValue::create(xRepeat));
|
| - list->append(*CSSPrimitiveValue::create(yRepeat));
|
| + list->append(*CSSIdentifierValue::create(xRepeat));
|
| + list->append(*CSSIdentifierValue::create(yRepeat));
|
| return list;
|
| }
|
|
|
| @@ -159,9 +167,9 @@ static CSSValue* valueForFillSourceType(EMaskSourceType type)
|
| {
|
| switch (type) {
|
| case MaskAlpha:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAlpha);
|
| + return CSSIdentifierValue::create(CSSValueAlpha);
|
| case MaskLuminance:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueLuminance);
|
| + return CSSIdentifierValue::create(CSSValueLuminance);
|
| }
|
|
|
| ASSERT_NOT_REACHED();
|
| @@ -218,7 +226,7 @@ static CSSValue* valueForPositionOffset(const ComputedStyle& style, CSSPropertyI
|
| return zoomAdjustedPixelValue(-floatValueForLength(opposite, containingBlockSize), style);
|
| }
|
| // FIXME: fall back to auto for position:relative, display:inline
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| }
|
|
|
| // Length doesn't provide operator -, so multiply by -1.
|
| @@ -261,7 +269,7 @@ static CSSValue* valueForPositionOffset(const ComputedStyle& style, CSSPropertyI
|
| }
|
|
|
| if (offset.isAuto())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
|
|
| return zoomAdjustedPixelValueForLength(offset, style);
|
| }
|
| @@ -314,20 +322,20 @@ static CSSBorderImageSliceValue* valueForNinePieceImageSlice(const NinePieceImag
|
| return CSSBorderImageSliceValue::create(CSSQuadValue::create(top, right, bottom, left, CSSQuadValue::SerializeAsQuad), image.fill());
|
| }
|
|
|
| -static CSSPrimitiveValue* valueForBorderImageLength(const BorderImageLength& borderImageLength, const ComputedStyle& style)
|
| +static CSSValue* valueForBorderImageLength(const BorderImageLength& borderImageLength, const ComputedStyle& style)
|
| {
|
| if (borderImageLength.isNumber())
|
| return CSSPrimitiveValue::create(borderImageLength.number(), CSSPrimitiveValue::UnitType::Number);
|
| - return CSSPrimitiveValue::create(borderImageLength.length(), style.effectiveZoom());
|
| + return CSSValue::create(borderImageLength.length(), style.effectiveZoom());
|
| }
|
|
|
| static CSSQuadValue* valueForNinePieceImageQuad(const BorderImageLengthBox& box, const ComputedStyle& style)
|
| {
|
| // Create the slices.
|
| - CSSPrimitiveValue* top = nullptr;
|
| - CSSPrimitiveValue* right = nullptr;
|
| - CSSPrimitiveValue* bottom = nullptr;
|
| - CSSPrimitiveValue* left = nullptr;
|
| + CSSValue* top = nullptr;
|
| + CSSValue* right = nullptr;
|
| + CSSValue* bottom = nullptr;
|
| + CSSValue* left = nullptr;
|
|
|
| top = valueForBorderImageLength(box.top(), style);
|
|
|
| @@ -369,21 +377,21 @@ static CSSValueID valueForRepeatRule(int rule)
|
|
|
| static CSSValue* valueForNinePieceImageRepeat(const NinePieceImage& image)
|
| {
|
| - CSSPrimitiveValue* horizontalRepeat = nullptr;
|
| - CSSPrimitiveValue* verticalRepeat = nullptr;
|
| + CSSIdentifierValue* horizontalRepeat = nullptr;
|
| + CSSIdentifierValue* verticalRepeat = nullptr;
|
|
|
| - horizontalRepeat = CSSPrimitiveValue::createIdentifier(valueForRepeatRule(image.horizontalRule()));
|
| + horizontalRepeat = CSSIdentifierValue::create(valueForRepeatRule(image.horizontalRule()));
|
| if (image.horizontalRule() == image.verticalRule())
|
| verticalRepeat = horizontalRepeat;
|
| else
|
| - verticalRepeat = CSSPrimitiveValue::createIdentifier(valueForRepeatRule(image.verticalRule()));
|
| + verticalRepeat = CSSIdentifierValue::create(valueForRepeatRule(image.verticalRule()));
|
| return CSSValuePair::create(horizontalRepeat, verticalRepeat, CSSValuePair::DropIdenticalValues);
|
| }
|
|
|
| static CSSValue* valueForNinePieceImage(const NinePieceImage& image, const ComputedStyle& style)
|
| {
|
| if (!image.hasImage())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| // Image first.
|
| CSSValue* imageValue = nullptr;
|
| @@ -408,7 +416,7 @@ static CSSValue* valueForNinePieceImage(const NinePieceImage& image, const Compu
|
| static CSSValue* valueForReflection(const StyleReflection* reflection, const ComputedStyle& style)
|
| {
|
| if (!reflection)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| CSSPrimitiveValue* offset = nullptr;
|
| // TODO(alancutter): Make this work correctly for calc lengths.
|
| @@ -417,19 +425,19 @@ static CSSValue* valueForReflection(const StyleReflection* reflection, const Com
|
| else
|
| offset = zoomAdjustedPixelValue(reflection->offset().value(), style);
|
|
|
| - CSSPrimitiveValue* direction = nullptr;
|
| + CSSIdentifierValue* direction = nullptr;
|
| switch (reflection->direction()) {
|
| case ReflectionBelow:
|
| - direction = CSSPrimitiveValue::createIdentifier(CSSValueBelow);
|
| + direction = CSSIdentifierValue::create(CSSValueBelow);
|
| break;
|
| case ReflectionAbove:
|
| - direction = CSSPrimitiveValue::createIdentifier(CSSValueAbove);
|
| + direction = CSSIdentifierValue::create(CSSValueAbove);
|
| break;
|
| case ReflectionLeft:
|
| - direction = CSSPrimitiveValue::createIdentifier(CSSValueLeft);
|
| + direction = CSSIdentifierValue::create(CSSValueLeft);
|
| break;
|
| case ReflectionRight:
|
| - direction = CSSPrimitiveValue::createIdentifier(CSSValueRight);
|
| + direction = CSSIdentifierValue::create(CSSValueRight);
|
| break;
|
| }
|
|
|
| @@ -440,11 +448,11 @@ static CSSValueList* valueForItemPositionWithOverflowAlignment(const StyleSelfAl
|
| {
|
| CSSValueList* result = CSSValueList::createSpaceSeparated();
|
| if (data.positionType() == LegacyPosition)
|
| - result->append(*CSSPrimitiveValue::createIdentifier(CSSValueLegacy));
|
| + result->append(*CSSIdentifierValue::create(CSSValueLegacy));
|
| // To avoid needing to copy the RareNonInheritedData, we repurpose the 'auto' flag to not just mean 'auto' prior to running the StyleAdjuster but also mean 'normal' after running it.
|
| - result->append(*CSSPrimitiveValue::create(data.position() == ItemPositionAuto ? ComputedStyle::initialDefaultAlignment().position() : data.position()));
|
| + result->append(*CSSIdentifierValue::create(data.position() == ItemPositionAuto ? ComputedStyle::initialDefaultAlignment().position() : data.position()));
|
| if (data.position() >= ItemPositionCenter && data.overflow() != OverflowAlignmentDefault)
|
| - result->append(*CSSPrimitiveValue::create(data.overflow()));
|
| + result->append(*CSSIdentifierValue::create(data.overflow()));
|
| ASSERT(result->length() <= 2);
|
| return result;
|
| }
|
| @@ -474,10 +482,10 @@ static CSSValueList* valuesForShorthandProperty(const StylePropertyShorthand& sh
|
| static CSSValue* expandNoneLigaturesValue()
|
| {
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNoCommonLigatures));
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNoDiscretionaryLigatures));
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNoHistoricalLigatures));
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNoContextual));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNoCommonLigatures));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNoDiscretionaryLigatures));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNoHistoricalLigatures));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNoContextual));
|
| return list;
|
| }
|
|
|
| @@ -489,11 +497,11 @@ static CSSValue* valuesForFontVariantProperty(const ComputedStyle& style, const
|
| const CSSValue* value = ComputedStyleCSSValueMapping::get(fontVariantShorthand().properties()[i], style, layoutObject, styledNode, allowVisitedStyle);
|
|
|
| if (shorthandCase == AllNormal
|
| - && value->isPrimitiveValue()
|
| - && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone
|
| + && value->isIdentifierValue()
|
| + && toCSSIdentifierValue(value)->getValueID() == CSSValueNone
|
| && fontVariantShorthand().properties()[i] == CSSPropertyFontVariantLigatures) {
|
| shorthandCase = NoneLigatures;
|
| - } else if (!(value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNormal)) {
|
| + } else if (!(value->isIdentifierValue() && toCSSIdentifierValue(value)->getValueID() == CSSValueNormal)) {
|
| shorthandCase = ConcatenateNonNormal;
|
| break;
|
| }
|
| @@ -501,18 +509,18 @@ static CSSValue* valuesForFontVariantProperty(const ComputedStyle& style, const
|
|
|
| switch (shorthandCase) {
|
| case AllNormal:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
|
| + return CSSIdentifierValue::create(CSSValueNormal);
|
| case NoneLigatures:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case ConcatenateNonNormal:
|
| {
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| for (size_t i = 0; i < fontVariantShorthand().length(); ++i) {
|
| const CSSValue* value = ComputedStyleCSSValueMapping::get(fontVariantShorthand().properties()[i], style, layoutObject, styledNode, allowVisitedStyle);
|
| ASSERT(value);
|
| - if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNone) {
|
| + if (value->isIdentifierValue() && toCSSIdentifierValue(value)->getValueID() == CSSValueNone) {
|
| list->append(*expandNoneLigaturesValue());
|
| - } else if (!(value->isPrimitiveValue() && toCSSPrimitiveValue(value)->getValueID() == CSSValueNormal)) {
|
| + } else if (!(value->isIdentifierValue() && toCSSIdentifierValue(value)->getValueID() == CSSValueNormal)) {
|
| list->append(*value);
|
| }
|
| }
|
| @@ -536,15 +544,15 @@ static CSSValueList* valuesForBackgroundShorthand(const ComputedStyle& style, co
|
| ASSERT(value);
|
| beforeSlash->append(*value);
|
| }
|
| - beforeSlash->append(currLayer->image() ? *currLayer->image()->computedCSSValue() : *CSSPrimitiveValue::createIdentifier(CSSValueNone));
|
| + beforeSlash->append(currLayer->image() ? *currLayer->image()->computedCSSValue() : *CSSIdentifierValue::create(CSSValueNone));
|
| beforeSlash->append(*valueForFillRepeat(currLayer->repeatX(), currLayer->repeatY()));
|
| - beforeSlash->append(*CSSPrimitiveValue::create(currLayer->attachment()));
|
| + beforeSlash->append(*CSSIdentifierValue::create(currLayer->attachment()));
|
| beforeSlash->append(*createPositionListForLayer(CSSPropertyBackgroundPosition, *currLayer, style));
|
| list->append(*beforeSlash);
|
| CSSValueList* afterSlash = CSSValueList::createSpaceSeparated();
|
| afterSlash->append(*valueForFillSize(currLayer->size(), style));
|
| - afterSlash->append(*CSSPrimitiveValue::create(currLayer->origin()));
|
| - afterSlash->append(*CSSPrimitiveValue::create(currLayer->clip()));
|
| + afterSlash->append(*CSSIdentifierValue::create(currLayer->origin()));
|
| + afterSlash->append(*CSSIdentifierValue::create(currLayer->clip()));
|
| list->append(*afterSlash);
|
| ret->append(*list);
|
| }
|
| @@ -555,25 +563,25 @@ static CSSValueList* valueForContentPositionAndDistributionWithOverflowAlignment
|
| {
|
| CSSValueList* result = CSSValueList::createSpaceSeparated();
|
| if (data.distribution() != ContentDistributionDefault)
|
| - result->append(*CSSPrimitiveValue::create(data.distribution()));
|
| + result->append(*CSSIdentifierValue::create(data.distribution()));
|
| if (data.distribution() == ContentDistributionDefault || data.position() != ContentPositionNormal) {
|
| if (!RuntimeEnabledFeatures::cssGridLayoutEnabled() && data.position() == ContentPositionNormal)
|
| - result->append(*CSSPrimitiveValue::createIdentifier(normalBehaviorValueID));
|
| + result->append(*CSSIdentifierValue::create(normalBehaviorValueID));
|
| else
|
| - result->append(*CSSPrimitiveValue::create(data.position()));
|
| + result->append(*CSSIdentifierValue::create(data.position()));
|
| }
|
| if ((data.position() >= ContentPositionCenter || data.distribution() != ContentDistributionDefault) && data.overflow() != OverflowAlignmentDefault)
|
| - result->append(*CSSPrimitiveValue::create(data.overflow()));
|
| + result->append(*CSSIdentifierValue::create(data.overflow()));
|
| ASSERT(result->length() > 0);
|
| ASSERT(result->length() <= 3);
|
| return result;
|
| }
|
|
|
| -static CSSPrimitiveValue* valueForLineHeight(const ComputedStyle& style)
|
| +static CSSValue* valueForLineHeight(const ComputedStyle& style)
|
| {
|
| Length length = style.lineHeight();
|
| if (length.isNegative())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
|
| + return CSSIdentifierValue::create(CSSValueNormal);
|
|
|
| return zoomAdjustedPixelValue(floatValueForLength(length, style.getFontDescription().computedSize()), style);
|
| }
|
| @@ -582,7 +590,7 @@ static CSSValue* valueForPosition(const LengthPoint& position, const ComputedSty
|
| {
|
| DCHECK((position.x() == Auto) == (position.y() == Auto));
|
| if (position.x() == Auto) {
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| }
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| list->append(*zoomAdjustedPixelValueForLength(position.x(), style));
|
| @@ -610,7 +618,7 @@ static CSSValueID identifierForFamily(const AtomicString& family)
|
| static CSSValue* valueForFamily(const AtomicString& family)
|
| {
|
| if (CSSValueID familyIdentifier = identifierForFamily(family))
|
| - return CSSPrimitiveValue::createIdentifier(familyIdentifier);
|
| + return CSSIdentifierValue::create(familyIdentifier);
|
| return CSSFontFamilyValue::create(family.getString());
|
| }
|
|
|
| @@ -628,39 +636,39 @@ static CSSPrimitiveValue* valueForFontSize(const ComputedStyle& style)
|
| return zoomAdjustedPixelValue(style.getFontDescription().computedSize(), style);
|
| }
|
|
|
| -static CSSPrimitiveValue* valueForFontStretch(const ComputedStyle& style)
|
| +static CSSIdentifierValue* valueForFontStretch(const ComputedStyle& style)
|
| {
|
| - return CSSPrimitiveValue::create(style.getFontDescription().stretch());
|
| + return CSSIdentifierValue::create(style.getFontDescription().stretch());
|
| }
|
|
|
| -static CSSPrimitiveValue* valueForFontStyle(const ComputedStyle& style)
|
| +static CSSIdentifierValue* valueForFontStyle(const ComputedStyle& style)
|
| {
|
| - return CSSPrimitiveValue::create(style.getFontDescription().style());
|
| + return CSSIdentifierValue::create(style.getFontDescription().style());
|
| }
|
|
|
| -static CSSPrimitiveValue* valueForFontWeight(const ComputedStyle& style)
|
| +static CSSIdentifierValue* valueForFontWeight(const ComputedStyle& style)
|
| {
|
| - return CSSPrimitiveValue::create(style.getFontDescription().weight());
|
| + return CSSIdentifierValue::create(style.getFontDescription().weight());
|
| }
|
|
|
| -static CSSPrimitiveValue* valueForFontVariantCaps(const ComputedStyle& style)
|
| +static CSSIdentifierValue* valueForFontVariantCaps(const ComputedStyle& style)
|
| {
|
| FontDescription::FontVariantCaps variantCaps = style.getFontDescription().variantCaps();
|
| switch (variantCaps) {
|
| case FontDescription::CapsNormal:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
|
| + return CSSIdentifierValue::create(CSSValueNormal);
|
| case FontDescription::SmallCaps:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueSmallCaps);
|
| + return CSSIdentifierValue::create(CSSValueSmallCaps);
|
| case FontDescription::AllSmallCaps:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAllSmallCaps);
|
| + return CSSIdentifierValue::create(CSSValueAllSmallCaps);
|
| case FontDescription::PetiteCaps:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValuePetiteCaps);
|
| + return CSSIdentifierValue::create(CSSValuePetiteCaps);
|
| case FontDescription::AllPetiteCaps:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAllPetiteCaps);
|
| + return CSSIdentifierValue::create(CSSValueAllPetiteCaps);
|
| case FontDescription::Unicase:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueUnicase);
|
| + return CSSIdentifierValue::create(CSSValueUnicase);
|
| case FontDescription::TitlingCaps:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueTitlingCaps);
|
| + return CSSIdentifierValue::create(CSSValueTitlingCaps);
|
| default:
|
| NOTREACHED();
|
| return nullptr;
|
| @@ -675,21 +683,21 @@ static CSSValue* valueForFontVariantLigatures(const ComputedStyle& style)
|
| FontDescription::LigaturesState contextualLigaturesState = style.getFontDescription().contextualLigaturesState();
|
| if (commonLigaturesState == FontDescription::NormalLigaturesState && discretionaryLigaturesState == FontDescription::NormalLigaturesState
|
| && historicalLigaturesState == FontDescription::NormalLigaturesState && contextualLigaturesState == FontDescription::NormalLigaturesState)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
|
| + return CSSIdentifierValue::create(CSSValueNormal);
|
|
|
| if (commonLigaturesState == FontDescription::DisabledLigaturesState && discretionaryLigaturesState == FontDescription::DisabledLigaturesState
|
| && historicalLigaturesState == FontDescription::DisabledLigaturesState && contextualLigaturesState == FontDescription::DisabledLigaturesState)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| CSSValueList* valueList = CSSValueList::createSpaceSeparated();
|
| if (commonLigaturesState != FontDescription::NormalLigaturesState)
|
| - valueList->append(*CSSPrimitiveValue::createIdentifier(commonLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoCommonLigatures : CSSValueCommonLigatures));
|
| + valueList->append(*CSSIdentifierValue::create(commonLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoCommonLigatures : CSSValueCommonLigatures));
|
| if (discretionaryLigaturesState != FontDescription::NormalLigaturesState)
|
| - valueList->append(*CSSPrimitiveValue::createIdentifier(discretionaryLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoDiscretionaryLigatures : CSSValueDiscretionaryLigatures));
|
| + valueList->append(*CSSIdentifierValue::create(discretionaryLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoDiscretionaryLigatures : CSSValueDiscretionaryLigatures));
|
| if (historicalLigaturesState != FontDescription::NormalLigaturesState)
|
| - valueList->append(*CSSPrimitiveValue::createIdentifier(historicalLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoHistoricalLigatures : CSSValueHistoricalLigatures));
|
| + valueList->append(*CSSIdentifierValue::create(historicalLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoHistoricalLigatures : CSSValueHistoricalLigatures));
|
| if (contextualLigaturesState != FontDescription::NormalLigaturesState)
|
| - valueList->append(*CSSPrimitiveValue::createIdentifier(contextualLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoContextual : CSSValueContextual));
|
| + valueList->append(*CSSIdentifierValue::create(contextualLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoContextual : CSSValueContextual));
|
| return valueList;
|
| }
|
|
|
| @@ -697,19 +705,19 @@ static CSSValue* valueForFontVariantNumeric(const ComputedStyle& style)
|
| {
|
| FontVariantNumeric variantNumeric = style.getFontDescription().variantNumeric();
|
| if (variantNumeric.isAllNormal())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
|
| + return CSSIdentifierValue::create(CSSValueNormal);
|
|
|
| CSSValueList* valueList = CSSValueList::createSpaceSeparated();
|
| if (variantNumeric.numericFigureValue() != FontVariantNumeric::NormalFigure)
|
| - valueList->append(*CSSPrimitiveValue::createIdentifier(variantNumeric.numericFigureValue() == FontVariantNumeric::LiningNums ? CSSValueLiningNums : CSSValueOldstyleNums));
|
| + valueList->append(*CSSIdentifierValue::create(variantNumeric.numericFigureValue() == FontVariantNumeric::LiningNums ? CSSValueLiningNums : CSSValueOldstyleNums));
|
| if (variantNumeric.numericSpacingValue() != FontVariantNumeric::NormalSpacing)
|
| - valueList->append(*CSSPrimitiveValue::createIdentifier(variantNumeric.numericSpacingValue() == FontVariantNumeric::ProportionalNums ? CSSValueProportionalNums : CSSValueTabularNums));
|
| + valueList->append(*CSSIdentifierValue::create(variantNumeric.numericSpacingValue() == FontVariantNumeric::ProportionalNums ? CSSValueProportionalNums : CSSValueTabularNums));
|
| if (variantNumeric.numericFractionValue() != FontVariantNumeric::NormalFraction)
|
| - valueList->append(*CSSPrimitiveValue::createIdentifier(variantNumeric.numericFractionValue() == FontVariantNumeric::DiagonalFractions ? CSSValueDiagonalFractions : CSSValueStackedFractions));
|
| + valueList->append(*CSSIdentifierValue::create(variantNumeric.numericFractionValue() == FontVariantNumeric::DiagonalFractions ? CSSValueDiagonalFractions : CSSValueStackedFractions));
|
| if (variantNumeric.ordinalValue() == FontVariantNumeric::OrdinalOn)
|
| - valueList->append(*CSSPrimitiveValue::createIdentifier(CSSValueOrdinal));
|
| + valueList->append(*CSSIdentifierValue::create(CSSValueOrdinal));
|
| if (variantNumeric.slashedZeroValue() == FontVariantNumeric::SlashedZeroOn)
|
| - valueList->append(*CSSPrimitiveValue::createIdentifier(CSSValueSlashedZero));
|
| + valueList->append(*CSSIdentifierValue::create(CSSValueSlashedZero));
|
|
|
| return valueList;
|
| }
|
| @@ -722,7 +730,7 @@ static CSSValue* specifiedValueForGridTrackBreadth(const GridLength& trackBreadt
|
|
|
| const Length& trackBreadthLength = trackBreadth.length();
|
| if (trackBreadthLength.isAuto())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return zoomAdjustedPixelValueForLength(trackBreadthLength, style);
|
| }
|
|
|
| @@ -856,7 +864,7 @@ static CSSValue* valueForGridTrackList(GridTrackSizingDirection direction, const
|
| }
|
|
|
| if (trackListIsEmpty)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| size_t autoRepeatTotalTracks = isLayoutGrid ? toLayoutGrid(layoutObject)->autoRepeatCountForDirection(direction) : 0;
|
| OrderedNamedLinesCollector collector(style, isRowAxis, autoRepeatTotalTracks);
|
| @@ -889,14 +897,14 @@ static CSSValue* valueForGridTrackList(GridTrackSizingDirection direction, const
|
| static CSSValue* valueForGridPosition(const GridPosition& position)
|
| {
|
| if (position.isAuto())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
|
|
| if (position.isNamedGridArea())
|
| return CSSCustomIdentValue::create(position.namedGridLine());
|
|
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| if (position.isSpan()) {
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueSpan));
|
| + list->append(*CSSIdentifierValue::create(CSSValueSpan));
|
| list->append(*CSSPrimitiveValue::create(position.spanPosition(), CSSPrimitiveValue::UnitType::Number));
|
| } else {
|
| list->append(*CSSPrimitiveValue::create(position.integerPosition(), CSSPrimitiveValue::UnitType::Number));
|
| @@ -921,14 +929,14 @@ static CSSValue* renderTextDecorationFlagsToCSSValue(int textDecoration)
|
| // Blink value is ignored.
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| if (textDecoration & TextDecorationUnderline)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueUnderline));
|
| + list->append(*CSSIdentifierValue::create(CSSValueUnderline));
|
| if (textDecoration & TextDecorationOverline)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueOverline));
|
| + list->append(*CSSIdentifierValue::create(CSSValueOverline));
|
| if (textDecoration & TextDecorationLineThrough)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueLineThrough));
|
| + list->append(*CSSIdentifierValue::create(CSSValueLineThrough));
|
|
|
| if (!list->length())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| return list;
|
| }
|
|
|
| @@ -936,15 +944,15 @@ static CSSValue* valueForTextDecorationStyle(TextDecorationStyle textDecorationS
|
| {
|
| switch (textDecorationStyle) {
|
| case TextDecorationStyleSolid:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueSolid);
|
| + return CSSIdentifierValue::create(CSSValueSolid);
|
| case TextDecorationStyleDouble:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueDouble);
|
| + return CSSIdentifierValue::create(CSSValueDouble);
|
| case TextDecorationStyleDotted:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueDotted);
|
| + return CSSIdentifierValue::create(CSSValueDotted);
|
| case TextDecorationStyleDashed:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueDashed);
|
| + return CSSIdentifierValue::create(CSSValueDashed);
|
| case TextDecorationStyleWavy:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueWavy);
|
| + return CSSIdentifierValue::create(CSSValueWavy);
|
| }
|
|
|
| ASSERT_NOT_REACHED();
|
| @@ -955,27 +963,27 @@ static CSSValue* touchActionFlagsToCSSValue(TouchAction touchAction)
|
| {
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| if (touchAction == TouchActionAuto) {
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueAuto));
|
| + list->append(*CSSIdentifierValue::create(CSSValueAuto));
|
| } else if (touchAction == TouchActionNone) {
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNone));
|
| } else if (touchAction == TouchActionManipulation) {
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueManipulation));
|
| + list->append(*CSSIdentifierValue::create(CSSValueManipulation));
|
| } else {
|
| if ((touchAction & TouchActionPanX) == TouchActionPanX)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanX));
|
| + list->append(*CSSIdentifierValue::create(CSSValuePanX));
|
| else if (touchAction & TouchActionPanLeft)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanLeft));
|
| + list->append(*CSSIdentifierValue::create(CSSValuePanLeft));
|
| else if (touchAction & TouchActionPanRight)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanRight));
|
| + list->append(*CSSIdentifierValue::create(CSSValuePanRight));
|
| if ((touchAction & TouchActionPanY) == TouchActionPanY)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanY));
|
| + list->append(*CSSIdentifierValue::create(CSSValuePanY));
|
| else if (touchAction & TouchActionPanUp)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanUp));
|
| + list->append(*CSSIdentifierValue::create(CSSValuePanUp));
|
| else if (touchAction & TouchActionPanDown)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePanDown));
|
| + list->append(*CSSIdentifierValue::create(CSSValuePanDown));
|
|
|
| if ((touchAction & TouchActionPinchZoom) == TouchActionPinchZoom)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePinchZoom));
|
| + list->append(*CSSIdentifierValue::create(CSSValuePinchZoom));
|
| }
|
|
|
| ASSERT(list->length());
|
| @@ -986,13 +994,13 @@ static CSSValue* valueForWillChange(const Vector<CSSPropertyID>& willChangePrope
|
| {
|
| CSSValueList* list = CSSValueList::createCommaSeparated();
|
| if (willChangeContents)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueContents));
|
| + list->append(*CSSIdentifierValue::create(CSSValueContents));
|
| if (willChangeScrollPosition)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueScrollPosition));
|
| + list->append(*CSSIdentifierValue::create(CSSValueScrollPosition));
|
| for (size_t i = 0; i < willChangeProperties.size(); ++i)
|
| list->append(*CSSCustomIdentValue::create(willChangeProperties[i]));
|
| if (!list->length())
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueAuto));
|
| + list->append(*CSSIdentifierValue::create(CSSValueAuto));
|
| return list;
|
| }
|
|
|
| @@ -1012,13 +1020,13 @@ static CSSValue* valueForAnimationDirection(Timing::PlaybackDirection direction)
|
| {
|
| switch (direction) {
|
| case Timing::PlaybackDirection::NORMAL:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
|
| + return CSSIdentifierValue::create(CSSValueNormal);
|
| case Timing::PlaybackDirection::ALTERNATE_NORMAL:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAlternate);
|
| + return CSSIdentifierValue::create(CSSValueAlternate);
|
| case Timing::PlaybackDirection::REVERSE:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueReverse);
|
| + return CSSIdentifierValue::create(CSSValueReverse);
|
| case Timing::PlaybackDirection::ALTERNATE_REVERSE:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAlternateReverse);
|
| + return CSSIdentifierValue::create(CSSValueAlternateReverse);
|
| default:
|
| ASSERT_NOT_REACHED();
|
| return nullptr;
|
| @@ -1041,13 +1049,13 @@ static CSSValue* valueForAnimationFillMode(Timing::FillMode fillMode)
|
| {
|
| switch (fillMode) {
|
| case Timing::FillMode::NONE:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case Timing::FillMode::FORWARDS:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueForwards);
|
| + return CSSIdentifierValue::create(CSSValueForwards);
|
| case Timing::FillMode::BACKWARDS:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueBackwards);
|
| + return CSSIdentifierValue::create(CSSValueBackwards);
|
| case Timing::FillMode::BOTH:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueBoth);
|
| + return CSSIdentifierValue::create(CSSValueBoth);
|
| default:
|
| ASSERT_NOT_REACHED();
|
| return nullptr;
|
| @@ -1057,16 +1065,16 @@ static CSSValue* valueForAnimationFillMode(Timing::FillMode fillMode)
|
| static CSSValue* valueForAnimationIterationCount(double iterationCount)
|
| {
|
| if (iterationCount == std::numeric_limits<double>::infinity())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueInfinite);
|
| + return CSSIdentifierValue::create(CSSValueInfinite);
|
| return CSSPrimitiveValue::create(iterationCount, CSSPrimitiveValue::UnitType::Number);
|
| }
|
|
|
| static CSSValue* valueForAnimationPlayState(EAnimPlayState playState)
|
| {
|
| if (playState == AnimPlayStatePlaying)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueRunning);
|
| + return CSSIdentifierValue::create(CSSValueRunning);
|
| ASSERT(playState == AnimPlayStatePaused);
|
| - return CSSPrimitiveValue::createIdentifier(CSSValuePaused);
|
| + return CSSIdentifierValue::create(CSSValuePaused);
|
| }
|
|
|
| static CSSValue* createTimingFunctionValue(const TimingFunction* timingFunction)
|
| @@ -1094,7 +1102,7 @@ static CSSValue* createTimingFunctionValue(const TimingFunction* timingFunction)
|
| ASSERT_NOT_REACHED();
|
| return nullptr;
|
| }
|
| - return CSSPrimitiveValue::createIdentifier(valueId);
|
| + return CSSIdentifierValue::create(valueId);
|
| }
|
| return CSSCubicBezierTimingFunctionValue::create(bezierTimingFunction->x1(), bezierTimingFunction->y1(), bezierTimingFunction->x2(), bezierTimingFunction->y2());
|
| }
|
| @@ -1109,11 +1117,11 @@ static CSSValue* createTimingFunctionValue(const TimingFunction* timingFunction)
|
| if (steps > 1)
|
| return CSSStepsTimingFunctionValue::create(steps, position);
|
| CSSValueID valueId = position == StepsTimingFunction::StepPosition::START ? CSSValueStepStart : CSSValueStepEnd;
|
| - return CSSPrimitiveValue::createIdentifier(valueId);
|
| + return CSSIdentifierValue::create(valueId);
|
| }
|
|
|
| default:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueLinear);
|
| + return CSSIdentifierValue::create(CSSValueLinear);
|
| }
|
| }
|
|
|
| @@ -1193,7 +1201,7 @@ static CSSFunctionValue* valueForMatrixTransform(const TransformationMatrix& tra
|
| static CSSValue* computedTransform(const LayoutObject* layoutObject, const ComputedStyle& style)
|
| {
|
| if (!layoutObject || !style.hasTransform())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| IntRect box;
|
| if (layoutObject->isBox())
|
| @@ -1212,7 +1220,7 @@ static CSSValue* computedTransform(const LayoutObject* layoutObject, const Compu
|
| static CSSValue* createTransitionPropertyValue(const CSSTransitionData::TransitionProperty& property)
|
| {
|
| if (property.propertyType == CSSTransitionData::TransitionNone)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| if (property.propertyType == CSSTransitionData::TransitionUnknownProperty)
|
| return CSSCustomIdentValue::create(property.propertyString);
|
| ASSERT(property.propertyType == CSSTransitionData::TransitionKnownProperty);
|
| @@ -1226,7 +1234,7 @@ static CSSValue* valueForTransitionProperty(const CSSTransitionData* transitionD
|
| for (size_t i = 0; i < transitionData->propertyList().size(); ++i)
|
| list->append(*createTransitionPropertyValue(transitionData->propertyList()[i]));
|
| } else {
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueAll));
|
| + list->append(*CSSIdentifierValue::create(CSSValueAll));
|
| }
|
| return list;
|
| }
|
| @@ -1259,7 +1267,7 @@ static CSSValue* valueForContentData(const ComputedStyle& style)
|
| CSSValueID listStyleIdent = CSSValueNone;
|
| if (counter->listStyle() != NoneListStyle)
|
| listStyleIdent = static_cast<CSSValueID>(CSSValueDisc + counter->listStyle());
|
| - CSSPrimitiveValue* listStyle = CSSPrimitiveValue::createIdentifier(listStyleIdent);
|
| + CSSIdentifierValue* listStyle = CSSIdentifierValue::create(listStyleIdent);
|
| list->append(*CSSCounterValue::create(identifier, listStyle, separator));
|
| } else if (contentData->isImage()) {
|
| const StyleImage* image = toImageContentData(contentData)->image();
|
| @@ -1269,7 +1277,7 @@ static CSSValue* valueForContentData(const ComputedStyle& style)
|
| list->append(*CSSStringValue::create(toTextContentData(contentData)->text()));
|
| } else if (contentData->isQuote()) {
|
| const QuoteType quoteType = toQuoteContentData(contentData)->quote();
|
| - list->append(*CSSPrimitiveValue::createIdentifier(valueForQuoteType(quoteType)));
|
| + list->append(*CSSIdentifierValue::create(valueForQuoteType(quoteType)));
|
| } else {
|
| ASSERT_NOT_REACHED();
|
| }
|
| @@ -1281,7 +1289,7 @@ static CSSValue* valueForCounterDirectives(const ComputedStyle& style, CSSProper
|
| {
|
| const CounterDirectiveMap* map = style.counterDirectives();
|
| if (!map)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| for (const auto& item : *map) {
|
| @@ -1295,7 +1303,7 @@ static CSSValue* valueForCounterDirectives(const ComputedStyle& style, CSSProper
|
| }
|
|
|
| if (!list->length())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| return list;
|
| }
|
| @@ -1303,13 +1311,13 @@ static CSSValue* valueForCounterDirectives(const ComputedStyle& style, CSSProper
|
| static CSSValue* valueForShape(const ComputedStyle& style, ShapeValue* shapeValue)
|
| {
|
| if (!shapeValue)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| if (shapeValue->type() == ShapeValue::Box)
|
| - return CSSPrimitiveValue::create(shapeValue->cssBox());
|
| + return CSSIdentifierValue::create(shapeValue->cssBox());
|
| if (shapeValue->type() == ShapeValue::Image) {
|
| if (shapeValue->image())
|
| return shapeValue->image()->computedCSSValue();
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| }
|
|
|
| ASSERT(shapeValue->type() == ShapeValue::Shape);
|
| @@ -1317,7 +1325,7 @@ static CSSValue* valueForShape(const ComputedStyle& style, ShapeValue* shapeValu
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| list->append(*valueForBasicShape(style, shapeValue->shape()));
|
| if (shapeValue->cssBox() != BoxMissing)
|
| - list->append(*CSSPrimitiveValue::create(shapeValue->cssBox()));
|
| + list->append(*CSSIdentifierValue::create(shapeValue->cssBox()));
|
| return list;
|
| }
|
|
|
| @@ -1395,7 +1403,7 @@ static CSSValueList* valueForBorderRadiusShorthand(const ComputedStyle& style)
|
| static CSSValue* strokeDashArrayToCSSValueList(const SVGDashArray& dashes, const ComputedStyle& style)
|
| {
|
| if (dashes.isEmpty())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| CSSValueList* list = CSSValueList::createCommaSeparated();
|
| for (const Length& dashLength : dashes.vector())
|
| @@ -1413,7 +1421,7 @@ static CSSValue* paintOrderToCSSValueList(const SVGComputedStyle& svgStyle)
|
| case PT_FILL:
|
| case PT_STROKE:
|
| case PT_MARKERS:
|
| - list->append(*CSSPrimitiveValue::create(paintOrderType));
|
| + list->append(*CSSIdentifierValue::create(paintOrderType));
|
| break;
|
| case PT_NONE:
|
| default:
|
| @@ -1431,7 +1439,7 @@ static CSSValue* adjustSVGPaintForCurrentColor(SVGPaintType paintType, const Str
|
| CSSValueList* values = CSSValueList::createSpaceSeparated();
|
| values->append(*CSSURIValue::create(url));
|
| if (paintType == SVG_PAINTTYPE_URI_NONE)
|
| - values->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone));
|
| + values->append(*CSSIdentifierValue::create(CSSValueNone));
|
| else if (paintType == SVG_PAINTTYPE_URI_CURRENTCOLOR)
|
| values->append(*CSSColorValue::create(currentColor.rgb()));
|
| else if (paintType == SVG_PAINTTYPE_URI_RGBCOLOR)
|
| @@ -1439,7 +1447,7 @@ static CSSValue* adjustSVGPaintForCurrentColor(SVGPaintType paintType, const Str
|
| return values;
|
| }
|
| if (paintType == SVG_PAINTTYPE_NONE)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| if (paintType == SVG_PAINTTYPE_CURRENTCOLOR)
|
| return CSSColorValue::create(currentColor.rgb());
|
|
|
| @@ -1457,7 +1465,7 @@ CSSValue* ComputedStyleCSSValueMapping::valueForShadowData(const ShadowData& sha
|
| CSSPrimitiveValue* y = zoomAdjustedPixelValue(shadow.y(), style);
|
| CSSPrimitiveValue* blur = zoomAdjustedPixelValue(shadow.blur(), style);
|
| CSSPrimitiveValue* spread = useSpread ? zoomAdjustedPixelValue(shadow.spread(), style) : nullptr;
|
| - CSSPrimitiveValue* shadowStyle = shadow.style() == Normal ? nullptr : CSSPrimitiveValue::createIdentifier(CSSValueInset);
|
| + CSSIdentifierValue* shadowStyle = shadow.style() == Normal ? nullptr : CSSIdentifierValue::create(CSSValueInset);
|
| CSSValue* color = currentColorOrValidColor(style, shadow.color());
|
| return CSSShadowValue::create(x, y, blur, spread, shadowStyle, color);
|
| }
|
| @@ -1465,7 +1473,7 @@ CSSValue* ComputedStyleCSSValueMapping::valueForShadowData(const ShadowData& sha
|
| CSSValue* ComputedStyleCSSValueMapping::valueForShadowList(const ShadowList* shadowList, const ComputedStyle& style, bool useSpread)
|
| {
|
| if (!shadowList)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| CSSValueList* list = CSSValueList::createCommaSeparated();
|
| size_t shadowCount = shadowList->shadows().size();
|
| @@ -1477,7 +1485,7 @@ CSSValue* ComputedStyleCSSValueMapping::valueForShadowList(const ShadowList* sha
|
| CSSValue* ComputedStyleCSSValueMapping::valueForFilter(const ComputedStyle& style, const FilterOperations& filterOperations)
|
| {
|
| if (filterOperations.operations().isEmpty())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
|
|
| @@ -1557,13 +1565,13 @@ CSSValue* ComputedStyleCSSValueMapping::valueForFont(const ComputedStyle& style)
|
| // Check that non-initial font-variant subproperties are not conflicting with this serialization.
|
| CSSValue* ligaturesValue = valueForFontVariantLigatures(style);
|
| CSSValue* numericValue = valueForFontVariantNumeric(style);
|
| - if (!ligaturesValue->equals(*CSSPrimitiveValue::createIdentifier(CSSValueNormal))
|
| - || !numericValue->equals(*CSSPrimitiveValue::createIdentifier(CSSValueNormal)))
|
| + if (!ligaturesValue->equals(*CSSIdentifierValue::create(CSSValueNormal))
|
| + || !numericValue->equals(*CSSIdentifierValue::create(CSSValueNormal)))
|
| return nullptr;
|
|
|
| - CSSPrimitiveValue* capsValue = valueForFontVariantCaps(style);
|
| - if (!capsValue->equals(*CSSPrimitiveValue::createIdentifier(CSSValueNormal))
|
| - && !capsValue->equals(*CSSPrimitiveValue::createIdentifier(CSSValueSmallCaps)))
|
| + CSSIdentifierValue* capsValue = valueForFontVariantCaps(style);
|
| + if (capsValue->getValueID() != CSSValueNormal
|
| + && capsValue->getValueID() != CSSValueSmallCaps)
|
| return nullptr;
|
| list->append(*capsValue);
|
|
|
| @@ -1591,13 +1599,13 @@ static CSSValue* valueForScrollSnapPoints(const ScrollSnapPoints& points, const
|
| return repeat;
|
| }
|
|
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| }
|
|
|
| static CSSValue* valueForScrollSnapCoordinate(const Vector<LengthPoint>& coordinates, const ComputedStyle& style)
|
| {
|
| if (coordinates.isEmpty())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| CSSValueList* list = CSSValueList::createCommaSeparated();
|
|
|
| @@ -1704,7 +1712,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| if (currLayer->image())
|
| list->append(*currLayer->image()->computedCSSValue());
|
| else
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNone));
|
| }
|
| return list;
|
| }
|
| @@ -1734,13 +1742,13 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| CSSValueList* list = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskComposite ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next())
|
| - list->append(*CSSPrimitiveValue::create(currLayer->composite()));
|
| + list->append(*CSSIdentifierValue::create(currLayer->composite()));
|
| return list;
|
| }
|
| case CSSPropertyBackgroundAttachment: {
|
| CSSValueList* list = CSSValueList::createCommaSeparated();
|
| for (const FillLayer* currLayer = &style.backgroundLayers(); currLayer; currLayer = currLayer->next())
|
| - list->append(*CSSPrimitiveValue::create(currLayer->attachment()));
|
| + list->append(*CSSIdentifierValue::create(currLayer->attachment()));
|
| return list;
|
| }
|
| case CSSPropertyBackgroundClip:
|
| @@ -1754,7 +1762,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| const FillLayer* currLayer = (propertyID == CSSPropertyWebkitMaskClip || propertyID == CSSPropertyWebkitMaskOrigin) ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next()) {
|
| EFillBox box = isClip ? currLayer->clip() : currLayer->origin();
|
| - list->append(*CSSPrimitiveValue::create(box));
|
| + list->append(*CSSIdentifierValue::create(box));
|
| }
|
| return list;
|
| }
|
| @@ -1784,8 +1792,8 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| }
|
| case CSSPropertyBorderCollapse:
|
| if (style.borderCollapse())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueCollapse);
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueSeparate);
|
| + return CSSIdentifierValue::create(CSSValueCollapse);
|
| + return CSSIdentifierValue::create(CSSValueSeparate);
|
| case CSSPropertyBorderSpacing: {
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| list->append(*zoomAdjustedPixelValue(style.horizontalBorderSpacing(), style));
|
| @@ -1799,7 +1807,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyBorderImageSource:
|
| if (style.borderImageSource())
|
| return style.borderImageSource()->computedCSSValue();
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyBorderTopColor:
|
| return allowVisitedStyle ? CSSColorValue::create(style.visitedDependentColor(CSSPropertyBorderTopColor).rgb()) : currentColorOrValidColor(style, style.borderTopColor());
|
| case CSSPropertyBorderRightColor:
|
| @@ -1809,13 +1817,13 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyBorderLeftColor:
|
| return allowVisitedStyle ? CSSColorValue::create(style.visitedDependentColor(CSSPropertyBorderLeftColor).rgb()) : currentColorOrValidColor(style, style.borderLeftColor());
|
| case CSSPropertyBorderTopStyle:
|
| - return CSSPrimitiveValue::create(style.borderTopStyle());
|
| + return CSSIdentifierValue::create(style.borderTopStyle());
|
| case CSSPropertyBorderRightStyle:
|
| - return CSSPrimitiveValue::create(style.borderRightStyle());
|
| + return CSSIdentifierValue::create(style.borderRightStyle());
|
| case CSSPropertyBorderBottomStyle:
|
| - return CSSPrimitiveValue::create(style.borderBottomStyle());
|
| + return CSSIdentifierValue::create(style.borderBottomStyle());
|
| case CSSPropertyBorderLeftStyle:
|
| - return CSSPrimitiveValue::create(style.borderLeftStyle());
|
| + return CSSIdentifierValue::create(style.borderLeftStyle());
|
| case CSSPropertyBorderTopWidth:
|
| return zoomAdjustedPixelValue(style.borderTopWidth(), style);
|
| case CSSPropertyBorderRightWidth:
|
| @@ -1827,71 +1835,71 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyBottom:
|
| return valueForPositionOffset(style, CSSPropertyBottom, layoutObject);
|
| case CSSPropertyWebkitBoxAlign:
|
| - return CSSPrimitiveValue::create(style.boxAlign());
|
| + return CSSIdentifierValue::create(style.boxAlign());
|
| case CSSPropertyWebkitBoxDecorationBreak:
|
| if (style.boxDecorationBreak() == BoxDecorationBreakSlice)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueSlice);
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueClone);
|
| + return CSSIdentifierValue::create(CSSValueSlice);
|
| + return CSSIdentifierValue::create(CSSValueClone);
|
| case CSSPropertyWebkitBoxDirection:
|
| - return CSSPrimitiveValue::create(style.boxDirection());
|
| + return CSSIdentifierValue::create(style.boxDirection());
|
| case CSSPropertyWebkitBoxFlex:
|
| return CSSPrimitiveValue::create(style.boxFlex(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyWebkitBoxFlexGroup:
|
| return CSSPrimitiveValue::create(style.boxFlexGroup(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyWebkitBoxLines:
|
| - return CSSPrimitiveValue::create(style.boxLines());
|
| + return CSSIdentifierValue::create(style.boxLines());
|
| case CSSPropertyWebkitBoxOrdinalGroup:
|
| return CSSPrimitiveValue::create(style.boxOrdinalGroup(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyWebkitBoxOrient:
|
| - return CSSPrimitiveValue::create(style.boxOrient());
|
| + return CSSIdentifierValue::create(style.boxOrient());
|
| case CSSPropertyWebkitBoxPack:
|
| - return CSSPrimitiveValue::create(style.boxPack());
|
| + return CSSIdentifierValue::create(style.boxPack());
|
| case CSSPropertyWebkitBoxReflect:
|
| return valueForReflection(style.boxReflect(), style);
|
| case CSSPropertyBoxShadow:
|
| return valueForShadowList(style.boxShadow(), style, true);
|
| case CSSPropertyCaptionSide:
|
| - return CSSPrimitiveValue::create(style.captionSide());
|
| + return CSSIdentifierValue::create(style.captionSide());
|
| case CSSPropertyClear:
|
| - return CSSPrimitiveValue::create(style.clear());
|
| + return CSSIdentifierValue::create(style.clear());
|
| case CSSPropertyColor:
|
| return CSSColorValue::create(allowVisitedStyle ? style.visitedDependentColor(CSSPropertyColor).rgb() : style.color().rgb());
|
| case CSSPropertyWebkitPrintColorAdjust:
|
| - return CSSPrimitiveValue::create(style.getPrintColorAdjust());
|
| + return CSSIdentifierValue::create(style.getPrintColorAdjust());
|
| case CSSPropertyColumnCount:
|
| if (style.hasAutoColumnCount())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return CSSPrimitiveValue::create(style.columnCount(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyColumnFill:
|
| - return CSSPrimitiveValue::create(style.getColumnFill());
|
| + return CSSIdentifierValue::create(style.getColumnFill());
|
| case CSSPropertyColumnGap:
|
| if (style.hasNormalColumnGap())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
|
| + return CSSIdentifierValue::create(CSSValueNormal);
|
| return zoomAdjustedPixelValue(style.columnGap(), style);
|
| case CSSPropertyColumnRuleColor:
|
| return allowVisitedStyle ? CSSColorValue::create(style.visitedDependentColor(CSSPropertyOutlineColor).rgb()) : currentColorOrValidColor(style, style.columnRuleColor());
|
| case CSSPropertyColumnRuleStyle:
|
| - return CSSPrimitiveValue::create(style.columnRuleStyle());
|
| + return CSSIdentifierValue::create(style.columnRuleStyle());
|
| case CSSPropertyColumnRuleWidth:
|
| return zoomAdjustedPixelValue(style.columnRuleWidth(), style);
|
| case CSSPropertyColumnSpan:
|
| - return CSSPrimitiveValue::createIdentifier(style.getColumnSpan() ? CSSValueAll : CSSValueNone);
|
| + return CSSIdentifierValue::create(style.getColumnSpan() ? CSSValueAll : CSSValueNone);
|
| case CSSPropertyWebkitColumnBreakAfter:
|
| - return CSSPrimitiveValue::create(mapToColumnBreakValue(style.breakAfter()));
|
| + return CSSIdentifierValue::create(mapToColumnBreakValue(style.breakAfter()));
|
| case CSSPropertyWebkitColumnBreakBefore:
|
| - return CSSPrimitiveValue::create(mapToColumnBreakValue(style.breakBefore()));
|
| + return CSSIdentifierValue::create(mapToColumnBreakValue(style.breakBefore()));
|
| case CSSPropertyWebkitColumnBreakInside:
|
| - return CSSPrimitiveValue::create(mapToColumnBreakValue(style.breakInside()));
|
| + return CSSIdentifierValue::create(mapToColumnBreakValue(style.breakInside()));
|
| case CSSPropertyColumnWidth:
|
| if (style.hasAutoColumnWidth())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return zoomAdjustedPixelValue(style.columnWidth(), style);
|
| case CSSPropertyTabSize:
|
| return CSSPrimitiveValue::create(
|
| style.getTabSize().getPixelSize(1.0), style.getTabSize().isSpaces() ? CSSPrimitiveValue::UnitType::Number : CSSPrimitiveValue::UnitType::Pixels);
|
| case CSSPropertyTextSizeAdjust:
|
| if (style.getTextSizeAdjust().isAuto())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return CSSPrimitiveValue::create(style.getTextSizeAdjust().multiplier() * 100, CSSPrimitiveValue::UnitType::Percentage);
|
| case CSSPropertyCursor: {
|
| CSSValueList* list = nullptr;
|
| @@ -1903,7 +1911,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| list->append(*CSSCursorImageValue::create(image->computedCSSValue(), cursors->at(i).hotSpotSpecified(), cursors->at(i).hotSpot()));
|
| }
|
| }
|
| - CSSValue* value = CSSPrimitiveValue::create(style.cursor());
|
| + CSSValue* value = CSSIdentifierValue::create(style.cursor());
|
| if (list) {
|
| list->append(*value);
|
| return list;
|
| @@ -1911,11 +1919,11 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return value;
|
| }
|
| case CSSPropertyDirection:
|
| - return CSSPrimitiveValue::create(style.direction());
|
| + return CSSIdentifierValue::create(style.direction());
|
| case CSSPropertyDisplay:
|
| - return CSSPrimitiveValue::create(style.display());
|
| + return CSSIdentifierValue::create(style.display());
|
| case CSSPropertyEmptyCells:
|
| - return CSSPrimitiveValue::create(style.emptyCells());
|
| + return CSSIdentifierValue::create(style.emptyCells());
|
| case CSSPropertyAlignContent:
|
| return valueForContentPositionAndDistributionWithOverflowAlignment(style.alignContent(), CSSValueStretch);
|
| case CSSPropertyAlignItems:
|
| @@ -1927,7 +1935,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyFlexBasis:
|
| return zoomAdjustedPixelValueForLength(style.flexBasis(), style);
|
| case CSSPropertyFlexDirection:
|
| - return CSSPrimitiveValue::create(style.flexDirection());
|
| + return CSSIdentifierValue::create(style.flexDirection());
|
| case CSSPropertyFlexFlow:
|
| return valuesForShorthandProperty(flexFlowShorthand(), style, layoutObject, styledNode, allowVisitedStyle);
|
| case CSSPropertyFlexGrow:
|
| @@ -1935,15 +1943,15 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyFlexShrink:
|
| return CSSPrimitiveValue::create(style.flexShrink(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyFlexWrap:
|
| - return CSSPrimitiveValue::create(style.flexWrap());
|
| + return CSSIdentifierValue::create(style.flexWrap());
|
| case CSSPropertyJustifyContent:
|
| return valueForContentPositionAndDistributionWithOverflowAlignment(style.justifyContent(), CSSValueFlexStart);
|
| case CSSPropertyOrder:
|
| return CSSPrimitiveValue::create(style.order(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyFloat:
|
| if (style.display() != EDisplay::None && style.hasOutOfFlowPosition())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| - return CSSPrimitiveValue::create(style.floating());
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| + return CSSIdentifierValue::create(style.floating());
|
| case CSSPropertyFont:
|
| return valueForFont(style);
|
| case CSSPropertyFontFamily:
|
| @@ -1953,7 +1961,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyFontSizeAdjust:
|
| if (style.hasFontSizeAdjust())
|
| return CSSPrimitiveValue::create(style.fontSizeAdjust(), CSSPrimitiveValue::UnitType::Number);
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyFontStretch:
|
| return valueForFontStretch(style);
|
| case CSSPropertyFontStyle:
|
| @@ -1965,7 +1973,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyFontFeatureSettings: {
|
| const FontFeatureSettings* featureSettings = style.getFontDescription().featureSettings();
|
| if (!featureSettings || !featureSettings->size())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
|
| + return CSSIdentifierValue::create(CSSValueNormal);
|
| CSSValueList* list = CSSValueList::createCommaSeparated();
|
| for (unsigned i = 0; i < featureSettings->size(); ++i) {
|
| const FontFeature& feature = featureSettings->at(i);
|
| @@ -1979,11 +1987,11 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| switch (style.getGridAutoFlow()) {
|
| case AutoFlowRow:
|
| case AutoFlowRowDense:
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueRow));
|
| + list->append(*CSSIdentifierValue::create(CSSValueRow));
|
| break;
|
| case AutoFlowColumn:
|
| case AutoFlowColumnDense:
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueColumn));
|
| + list->append(*CSSIdentifierValue::create(CSSValueColumn));
|
| break;
|
| default:
|
| ASSERT_NOT_REACHED();
|
| @@ -1992,7 +2000,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| switch (style.getGridAutoFlow()) {
|
| case AutoFlowRowDense:
|
| case AutoFlowColumnDense:
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueDense));
|
| + list->append(*CSSIdentifierValue::create(CSSValueDense));
|
| break;
|
| default:
|
| // Do nothing.
|
| @@ -2037,7 +2045,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyGridTemplateAreas:
|
| if (!style.namedGridAreaRowCount()) {
|
| ASSERT(!style.namedGridAreaColumnCount());
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| }
|
|
|
| return CSSGridTemplateAreasValue::create(style.namedGridArea(), style.namedGridAreaRowCount(), style.namedGridAreaColumnCount());
|
| @@ -2053,28 +2061,28 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| // According to http://www.w3.org/TR/CSS2/visudet.html#the-height-property,
|
| // the "height" property does not apply for non-atomic inline elements.
|
| if (!layoutObject->isAtomicInlineLevel() && layoutObject->isInline())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return zoomAdjustedPixelValue(sizingBox(layoutObject).height(), style);
|
| }
|
| return zoomAdjustedPixelValueForLength(style.height(), style);
|
| case CSSPropertyWebkitHighlight:
|
| if (style.highlight() == nullAtom)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| return CSSStringValue::create(style.highlight());
|
| case CSSPropertyHyphens:
|
| - return CSSPrimitiveValue::create(style.getHyphens());
|
| + return CSSIdentifierValue::create(style.getHyphens());
|
| case CSSPropertyWebkitHyphenateCharacter:
|
| if (style.hyphenationString().isNull())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return CSSStringValue::create(style.hyphenationString());
|
| case CSSPropertyImageRendering:
|
| - return CSSPrimitiveValue::create(style.imageRendering());
|
| + return CSSIdentifierValue::create(style.imageRendering());
|
| case CSSPropertyImageOrientation:
|
| if (style.respectImageOrientation() == RespectImageOrientation)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueFromImage);
|
| + return CSSIdentifierValue::create(CSSValueFromImage);
|
| return CSSPrimitiveValue::create(0, CSSPrimitiveValue::UnitType::Degrees);
|
| case CSSPropertyIsolation:
|
| - return CSSPrimitiveValue::create(style.isolation());
|
| + return CSSIdentifierValue::create(style.isolation());
|
| case CSSPropertyJustifyItems:
|
| return valueForItemPositionWithOverflowAlignment(style.justifyItems());
|
| case CSSPropertyJustifySelf:
|
| @@ -2083,25 +2091,25 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return valueForPositionOffset(style, CSSPropertyLeft, layoutObject);
|
| case CSSPropertyLetterSpacing:
|
| if (!style.letterSpacing())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNormal);
|
| + return CSSIdentifierValue::create(CSSValueNormal);
|
| return zoomAdjustedPixelValue(style.letterSpacing(), style);
|
| case CSSPropertyWebkitLineClamp:
|
| if (style.lineClamp().isNone())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| return CSSPrimitiveValue::create(style.lineClamp().value(), style.lineClamp().isPercentage() ? CSSPrimitiveValue::UnitType::Percentage : CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyLineHeight:
|
| return valueForLineHeight(style);
|
| case CSSPropertyListStyleImage:
|
| if (style.listStyleImage())
|
| return style.listStyleImage()->computedCSSValue();
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyListStylePosition:
|
| - return CSSPrimitiveValue::create(style.listStylePosition());
|
| + return CSSIdentifierValue::create(style.listStylePosition());
|
| case CSSPropertyListStyleType:
|
| - return CSSPrimitiveValue::create(style.listStyleType());
|
| + return CSSIdentifierValue::create(style.listStyleType());
|
| case CSSPropertyWebkitLocale:
|
| if (style.locale().isNull())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return CSSStringValue::create(style.locale());
|
| case CSSPropertyMarginTop: {
|
| Length marginTop = style.marginTop();
|
| @@ -2137,24 +2145,24 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return zoomAdjustedPixelValue(toLayoutBox(layoutObject)->marginLeft(), style);
|
| }
|
| case CSSPropertyWebkitUserModify:
|
| - return CSSPrimitiveValue::create(style.userModify());
|
| + return CSSIdentifierValue::create(style.userModify());
|
| case CSSPropertyMaxHeight: {
|
| const Length& maxHeight = style.maxHeight();
|
| if (maxHeight.isMaxSizeNone())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| return zoomAdjustedPixelValueForLength(maxHeight, style);
|
| }
|
| case CSSPropertyMaxWidth: {
|
| const Length& maxWidth = style.maxWidth();
|
| if (maxWidth.isMaxSizeNone())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| return zoomAdjustedPixelValueForLength(maxWidth, style);
|
| }
|
| case CSSPropertyMinHeight:
|
| if (style.minHeight().isAuto()) {
|
| Node* parent = styledNode->parentNode();
|
| if (isFlexOrGrid(parent ? parent->ensureComputedStyle() : nullptr))
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return zoomAdjustedPixelValue(0, style);
|
| }
|
| return zoomAdjustedPixelValueForLength(style.minHeight(), style);
|
| @@ -2162,12 +2170,12 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| if (style.minWidth().isAuto()) {
|
| Node* parent = styledNode->parentNode();
|
| if (isFlexOrGrid(parent ? parent->ensureComputedStyle() : nullptr))
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return zoomAdjustedPixelValue(0, style);
|
| }
|
| return zoomAdjustedPixelValueForLength(style.minWidth(), style);
|
| case CSSPropertyObjectFit:
|
| - return CSSPrimitiveValue::create(style.getObjectFit());
|
| + return CSSIdentifierValue::create(style.getObjectFit());
|
| case CSSPropertyObjectPosition:
|
| return CSSValuePair::create(
|
| zoomAdjustedPixelValueForLength(style.objectPosition().x(), style),
|
| @@ -2183,20 +2191,20 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return zoomAdjustedPixelValue(style.outlineOffset(), style);
|
| case CSSPropertyOutlineStyle:
|
| if (style.outlineStyleIsAuto())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| - return CSSPrimitiveValue::create(style.outlineStyle());
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| + return CSSIdentifierValue::create(style.outlineStyle());
|
| case CSSPropertyOutlineWidth:
|
| return zoomAdjustedPixelValue(style.outlineWidth(), style);
|
| case CSSPropertyOverflow:
|
| - return CSSPrimitiveValue::create(max(style.overflowX(), style.overflowY()));
|
| + return CSSIdentifierValue::create(max(style.overflowX(), style.overflowY()));
|
| case CSSPropertyOverflowAnchor:
|
| - return CSSPrimitiveValue::create(style.overflowAnchor());
|
| + return CSSIdentifierValue::create(style.overflowAnchor());
|
| case CSSPropertyOverflowWrap:
|
| - return CSSPrimitiveValue::create(style.overflowWrap());
|
| + return CSSIdentifierValue::create(style.overflowWrap());
|
| case CSSPropertyOverflowX:
|
| - return CSSPrimitiveValue::create(style.overflowX());
|
| + return CSSIdentifierValue::create(style.overflowX());
|
| case CSSPropertyOverflowY:
|
| - return CSSPrimitiveValue::create(style.overflowY());
|
| + return CSSIdentifierValue::create(style.overflowY());
|
| case CSSPropertyPaddingTop: {
|
| Length paddingTop = style.paddingTop();
|
| if (paddingTop.isFixed() || !layoutObject || !layoutObject->isBox())
|
| @@ -2222,19 +2230,19 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return zoomAdjustedPixelValue(toLayoutBox(layoutObject)->computedCSSPaddingLeft(), style);
|
| }
|
| case CSSPropertyBreakAfter:
|
| - return CSSPrimitiveValue::create(style.breakAfter());
|
| + return CSSIdentifierValue::create(style.breakAfter());
|
| case CSSPropertyBreakBefore:
|
| - return CSSPrimitiveValue::create(style.breakBefore());
|
| + return CSSIdentifierValue::create(style.breakBefore());
|
| case CSSPropertyBreakInside:
|
| - return CSSPrimitiveValue::create(style.breakInside());
|
| + return CSSIdentifierValue::create(style.breakInside());
|
| case CSSPropertyPageBreakAfter:
|
| - return CSSPrimitiveValue::create(mapToPageBreakValue(style.breakAfter()));
|
| + return CSSIdentifierValue::create(mapToPageBreakValue(style.breakAfter()));
|
| case CSSPropertyPageBreakBefore:
|
| - return CSSPrimitiveValue::create(mapToPageBreakValue(style.breakBefore()));
|
| + return CSSIdentifierValue::create(mapToPageBreakValue(style.breakBefore()));
|
| case CSSPropertyPageBreakInside:
|
| - return CSSPrimitiveValue::create(mapToPageBreakValue(style.breakInside()));
|
| + return CSSIdentifierValue::create(mapToPageBreakValue(style.breakInside()));
|
| case CSSPropertyPosition:
|
| - return CSSPrimitiveValue::create(style.position());
|
| + return CSSIdentifierValue::create(style.position());
|
| case CSSPropertyQuotes:
|
| if (!style.quotes()) {
|
| // TODO(ramya.v): We should return the quote values that we're actually using.
|
| @@ -2248,19 +2256,19 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| }
|
| return list;
|
| }
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyRight:
|
| return valueForPositionOffset(style, CSSPropertyRight, layoutObject);
|
| case CSSPropertyWebkitRubyPosition:
|
| - return CSSPrimitiveValue::create(style.getRubyPosition());
|
| + return CSSIdentifierValue::create(style.getRubyPosition());
|
| case CSSPropertyScrollBehavior:
|
| - return CSSPrimitiveValue::create(style.getScrollBehavior());
|
| + return CSSIdentifierValue::create(style.getScrollBehavior());
|
| case CSSPropertyTableLayout:
|
| - return CSSPrimitiveValue::create(style.tableLayout());
|
| + return CSSIdentifierValue::create(style.tableLayout());
|
| case CSSPropertyTextAlign:
|
| - return CSSPrimitiveValue::create(style.textAlign());
|
| + return CSSIdentifierValue::create(style.textAlign());
|
| case CSSPropertyTextAlignLast:
|
| - return CSSPrimitiveValue::create(style.getTextAlignLast());
|
| + return CSSIdentifierValue::create(style.getTextAlignLast());
|
| case CSSPropertyTextDecoration:
|
| if (RuntimeEnabledFeatures::css3TextDecorationsEnabled())
|
| return valuesForShorthandProperty(textDecorationShorthand(), style, layoutObject, styledNode, allowVisitedStyle);
|
| @@ -2272,9 +2280,9 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyTextDecorationColor:
|
| return currentColorOrValidColor(style, style.textDecorationColor());
|
| case CSSPropertyTextJustify:
|
| - return CSSPrimitiveValue::create(style.getTextJustify());
|
| + return CSSIdentifierValue::create(style.getTextJustify());
|
| case CSSPropertyTextUnderlinePosition:
|
| - return CSSPrimitiveValue::create(style.getTextUnderlinePosition());
|
| + return CSSIdentifierValue::create(style.getTextUnderlinePosition());
|
| case CSSPropertyWebkitTextDecorationsInEffect:
|
| return renderTextDecorationFlagsToCSSValue(style.textDecorationsInEffect());
|
| case CSSPropertyWebkitTextFillColor:
|
| @@ -2282,11 +2290,11 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyWebkitTextEmphasisColor:
|
| return currentColorOrValidColor(style, style.textEmphasisColor());
|
| case CSSPropertyWebkitTextEmphasisPosition:
|
| - return CSSPrimitiveValue::create(style.getTextEmphasisPosition());
|
| + return CSSIdentifierValue::create(style.getTextEmphasisPosition());
|
| case CSSPropertyWebkitTextEmphasisStyle:
|
| switch (style.getTextEmphasisMark()) {
|
| case TextEmphasisMarkNone:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case TextEmphasisMarkCustom:
|
| return CSSStringValue::create(style.textEmphasisCustomMark());
|
| case TextEmphasisMarkAuto:
|
| @@ -2298,8 +2306,8 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case TextEmphasisMarkTriangle:
|
| case TextEmphasisMarkSesame: {
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| - list->append(*CSSPrimitiveValue::create(style.getTextEmphasisFill()));
|
| - list->append(*CSSPrimitiveValue::create(style.getTextEmphasisMark()));
|
| + list->append(*CSSIdentifierValue::create(style.getTextEmphasisFill()));
|
| + list->append(*CSSIdentifierValue::create(style.getTextEmphasisMark()));
|
| return list;
|
| }
|
| }
|
| @@ -2308,63 +2316,63 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| list->append(*zoomAdjustedPixelValueForLength(style.textIndent(), style));
|
| if (RuntimeEnabledFeatures::css3TextEnabled() && (style.getTextIndentLine() == TextIndentEachLine || style.getTextIndentType() == TextIndentHanging)) {
|
| if (style.getTextIndentLine() == TextIndentEachLine)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueEachLine));
|
| + list->append(*CSSIdentifierValue::create(CSSValueEachLine));
|
| if (style.getTextIndentType() == TextIndentHanging)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueHanging));
|
| + list->append(*CSSIdentifierValue::create(CSSValueHanging));
|
| }
|
| return list;
|
| }
|
| case CSSPropertyTextShadow:
|
| return valueForShadowList(style.textShadow(), style, false);
|
| case CSSPropertyTextRendering:
|
| - return CSSPrimitiveValue::create(style.getFontDescription().textRendering());
|
| + return CSSIdentifierValue::create(style.getFontDescription().textRendering());
|
| case CSSPropertyTextOverflow:
|
| if (style.getTextOverflow())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueEllipsis);
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueClip);
|
| + return CSSIdentifierValue::create(CSSValueEllipsis);
|
| + return CSSIdentifierValue::create(CSSValueClip);
|
| case CSSPropertyWebkitTextSecurity:
|
| - return CSSPrimitiveValue::create(style.textSecurity());
|
| + return CSSIdentifierValue::create(style.textSecurity());
|
| case CSSPropertyWebkitTextStrokeColor:
|
| return currentColorOrValidColor(style, style.textStrokeColor());
|
| case CSSPropertyWebkitTextStrokeWidth:
|
| return zoomAdjustedPixelValue(style.textStrokeWidth(), style);
|
| case CSSPropertyTextTransform:
|
| - return CSSPrimitiveValue::create(style.textTransform());
|
| + return CSSIdentifierValue::create(style.textTransform());
|
| case CSSPropertyTop:
|
| return valueForPositionOffset(style, CSSPropertyTop, layoutObject);
|
| case CSSPropertyTouchAction:
|
| return touchActionFlagsToCSSValue(style.getTouchAction());
|
| case CSSPropertyUnicodeBidi:
|
| - return CSSPrimitiveValue::create(style.unicodeBidi());
|
| + return CSSIdentifierValue::create(style.unicodeBidi());
|
| case CSSPropertyVerticalAlign:
|
| switch (style.verticalAlign()) {
|
| case VerticalAlignBaseline:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueBaseline);
|
| + return CSSIdentifierValue::create(CSSValueBaseline);
|
| case VerticalAlignMiddle:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueMiddle);
|
| + return CSSIdentifierValue::create(CSSValueMiddle);
|
| case VerticalAlignSub:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueSub);
|
| + return CSSIdentifierValue::create(CSSValueSub);
|
| case VerticalAlignSuper:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueSuper);
|
| + return CSSIdentifierValue::create(CSSValueSuper);
|
| case VerticalAlignTextTop:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueTextTop);
|
| + return CSSIdentifierValue::create(CSSValueTextTop);
|
| case VerticalAlignTextBottom:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueTextBottom);
|
| + return CSSIdentifierValue::create(CSSValueTextBottom);
|
| case VerticalAlignTop:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueTop);
|
| + return CSSIdentifierValue::create(CSSValueTop);
|
| case VerticalAlignBottom:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueBottom);
|
| + return CSSIdentifierValue::create(CSSValueBottom);
|
| case VerticalAlignBaselineMiddle:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueWebkitBaselineMiddle);
|
| + return CSSIdentifierValue::create(CSSValueWebkitBaselineMiddle);
|
| case VerticalAlignLength:
|
| return zoomAdjustedPixelValueForLength(style.getVerticalAlignLength(), style);
|
| }
|
| ASSERT_NOT_REACHED();
|
| return nullptr;
|
| case CSSPropertyVisibility:
|
| - return CSSPrimitiveValue::create(style.visibility());
|
| + return CSSIdentifierValue::create(style.visibility());
|
| case CSSPropertyWhiteSpace:
|
| - return CSSPrimitiveValue::create(style.whiteSpace());
|
| + return CSSIdentifierValue::create(style.whiteSpace());
|
| case CSSPropertyWidows:
|
| return CSSPrimitiveValue::create(style.widows(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyWidth:
|
| @@ -2372,26 +2380,26 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| // According to http://www.w3.org/TR/CSS2/visudet.html#the-width-property,
|
| // the "width" property does not apply for non-atomic inline elements.
|
| if (!layoutObject->isAtomicInlineLevel() && layoutObject->isInline())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return zoomAdjustedPixelValue(sizingBox(layoutObject).width(), style);
|
| }
|
| return zoomAdjustedPixelValueForLength(style.width(), style);
|
| case CSSPropertyWillChange:
|
| return valueForWillChange(style.willChangeProperties(), style.willChangeContents(), style.willChangeScrollPosition());
|
| case CSSPropertyWordBreak:
|
| - return CSSPrimitiveValue::create(style.wordBreak());
|
| + return CSSIdentifierValue::create(style.wordBreak());
|
| case CSSPropertyWordSpacing:
|
| return zoomAdjustedPixelValue(style.wordSpacing(), style);
|
| case CSSPropertyWordWrap:
|
| - return CSSPrimitiveValue::create(style.overflowWrap());
|
| + return CSSIdentifierValue::create(style.overflowWrap());
|
| case CSSPropertyWebkitLineBreak:
|
| - return CSSPrimitiveValue::create(style.getLineBreak());
|
| + return CSSIdentifierValue::create(style.getLineBreak());
|
| case CSSPropertyResize:
|
| - return CSSPrimitiveValue::create(style.resize());
|
| + return CSSIdentifierValue::create(style.resize());
|
| case CSSPropertyFontKerning:
|
| - return CSSPrimitiveValue::create(style.getFontDescription().getKerning());
|
| + return CSSIdentifierValue::create(style.getFontDescription().getKerning());
|
| case CSSPropertyWebkitFontSmoothing:
|
| - return CSSPrimitiveValue::create(style.getFontDescription().fontSmoothing());
|
| + return CSSIdentifierValue::create(style.getFontDescription().fontSmoothing());
|
| case CSSPropertyFontVariantLigatures:
|
| return valueForFontVariantLigatures(style);
|
| case CSSPropertyFontVariantCaps:
|
| @@ -2400,16 +2408,16 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return valueForFontVariantNumeric(style);
|
| case CSSPropertyZIndex:
|
| if (style.hasAutoZIndex())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| return CSSPrimitiveValue::create(style.zIndex(), CSSPrimitiveValue::UnitType::Integer);
|
| case CSSPropertyZoom:
|
| return CSSPrimitiveValue::create(style.zoom(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyBoxSizing:
|
| if (style.boxSizing() == BoxSizingContentBox)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueContentBox);
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueBorderBox);
|
| + return CSSIdentifierValue::create(CSSValueContentBox);
|
| + return CSSIdentifierValue::create(CSSValueBorderBox);
|
| case CSSPropertyWebkitAppRegion:
|
| - return CSSPrimitiveValue::createIdentifier(style.getDraggableRegionMode() == DraggableRegionDrag ? CSSValueDrag : CSSValueNoDrag);
|
| + return CSSIdentifierValue::create(style.getDraggableRegionMode() == DraggableRegionDrag ? CSSValueDrag : CSSValueNoDrag);
|
| case CSSPropertyAnimationDelay:
|
| return valueForAnimationDelay(style.animations());
|
| case CSSPropertyAnimationDirection: {
|
| @@ -2419,7 +2427,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| for (size_t i = 0; i < animationData->directionList().size(); ++i)
|
| list->append(*valueForAnimationDirection(animationData->directionList()[i]));
|
| } else {
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNormal));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNormal));
|
| }
|
| return list;
|
| }
|
| @@ -2432,7 +2440,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| for (size_t i = 0; i < animationData->fillModeList().size(); ++i)
|
| list->append(*valueForAnimationFillMode(animationData->fillModeList()[i]));
|
| } else {
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNone));
|
| }
|
| return list;
|
| }
|
| @@ -2454,7 +2462,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| for (size_t i = 0; i < animationData->nameList().size(); ++i)
|
| list->append(*CSSCustomIdentValue::create(animationData->nameList()[i]));
|
| } else {
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNone));
|
| }
|
| return list;
|
| }
|
| @@ -2465,7 +2473,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| for (size_t i = 0; i < animationData->playStateList().size(); ++i)
|
| list->append(*valueForAnimationPlayState(animationData->playStateList()[i]));
|
| } else {
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueRunning));
|
| + list->append(*CSSIdentifierValue::create(CSSValueRunning));
|
| }
|
| return list;
|
| }
|
| @@ -2492,7 +2500,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
|
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| // animation-name default value.
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueNone));
|
| + list->append(*CSSIdentifierValue::create(CSSValueNone));
|
| list->append(*CSSPrimitiveValue::create(CSSAnimationData::initialDuration(), CSSPrimitiveValue::UnitType::Seconds));
|
| list->append(*createTimingFunctionValue(CSSAnimationData::initialTimingFunction().get()));
|
| list->append(*CSSPrimitiveValue::create(CSSAnimationData::initialDelay(), CSSPrimitiveValue::UnitType::Seconds));
|
| @@ -2500,13 +2508,13 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| list->append(*valueForAnimationDirection(CSSAnimationData::initialDirection()));
|
| list->append(*valueForAnimationFillMode(CSSAnimationData::initialFillMode()));
|
| // Initial animation-play-state.
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueRunning));
|
| + list->append(*CSSIdentifierValue::create(CSSValueRunning));
|
| return list;
|
| }
|
| case CSSPropertyWebkitAppearance:
|
| - return CSSPrimitiveValue::create(style.appearance());
|
| + return CSSIdentifierValue::create(style.appearance());
|
| case CSSPropertyBackfaceVisibility:
|
| - return CSSPrimitiveValue::createIdentifier((style.backfaceVisibility() == BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible);
|
| + return CSSIdentifierValue::create((style.backfaceVisibility() == BackfaceVisibilityHidden) ? CSSValueHidden : CSSValueVisible);
|
| case CSSPropertyWebkitBorderImage:
|
| return valueForNinePieceImage(style.borderImage(), style);
|
| case CSSPropertyBorderImageOutset:
|
| @@ -2530,19 +2538,19 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyWebkitMaskBoxImageSource:
|
| if (style.maskBoxImageSource())
|
| return style.maskBoxImageSource()->computedCSSValue();
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyWebkitFontSizeDelta:
|
| // Not a real style property -- used by the editing engine -- so has no computed value.
|
| return nullptr;
|
| case CSSPropertyWebkitMarginBottomCollapse:
|
| case CSSPropertyWebkitMarginAfterCollapse:
|
| - return CSSPrimitiveValue::create(style.marginAfterCollapse());
|
| + return CSSIdentifierValue::create(style.marginAfterCollapse());
|
| case CSSPropertyWebkitMarginTopCollapse:
|
| case CSSPropertyWebkitMarginBeforeCollapse:
|
| - return CSSPrimitiveValue::create(style.marginBeforeCollapse());
|
| + return CSSIdentifierValue::create(style.marginBeforeCollapse());
|
| case CSSPropertyPerspective:
|
| if (!style.hasPerspective())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| return zoomAdjustedPixelValue(style.perspective(), style);
|
| case CSSPropertyPerspectiveOrigin: {
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| @@ -2560,13 +2568,13 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return list;
|
| }
|
| case CSSPropertyWebkitRtlOrdering:
|
| - return CSSPrimitiveValue::createIdentifier(style.rtlOrdering() ? CSSValueVisual : CSSValueLogical);
|
| + return CSSIdentifierValue::create(style.rtlOrdering() ? CSSValueVisual : CSSValueLogical);
|
| case CSSPropertyWebkitTapHighlightColor:
|
| return currentColorOrValidColor(style, style.tapHighlightColor());
|
| case CSSPropertyWebkitUserDrag:
|
| - return CSSPrimitiveValue::create(style.userDrag());
|
| + return CSSIdentifierValue::create(style.userDrag());
|
| case CSSPropertyUserSelect:
|
| - return CSSPrimitiveValue::create(style.userSelect());
|
| + return CSSIdentifierValue::create(style.userSelect());
|
| case CSSPropertyBorderBottomLeftRadius:
|
| return &valueForBorderRadiusCorner(style.borderBottomLeftRadius(), style);
|
| case CSSPropertyBorderBottomRightRadius:
|
| @@ -2577,23 +2585,15 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return &valueForBorderRadiusCorner(style.borderTopRightRadius(), style);
|
| case CSSPropertyClip: {
|
| if (style.hasAutoClip())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
|
| - CSSPrimitiveValue* top = style.clip().top().isAuto()
|
| - ? CSSPrimitiveValue::createIdentifier(CSSValueAuto)
|
| - : zoomAdjustedPixelValue(style.clip().top().value(), style);
|
| - CSSPrimitiveValue* right = style.clip().right().isAuto()
|
| - ? CSSPrimitiveValue::createIdentifier(CSSValueAuto)
|
| - : zoomAdjustedPixelValue(style.clip().right().value(), style);
|
| - CSSPrimitiveValue* bottom = style.clip().bottom().isAuto()
|
| - ? CSSPrimitiveValue::createIdentifier(CSSValueAuto)
|
| - : zoomAdjustedPixelValue(style.clip().bottom().value(), style);
|
| - CSSPrimitiveValue* left = style.clip().left().isAuto()
|
| - ? CSSPrimitiveValue::createIdentifier(CSSValueAuto)
|
| - : zoomAdjustedPixelValue(style.clip().left().value(), style);
|
| + return CSSIdentifierValue::create(CSSValueAuto);
|
| + CSSValue* top = zoomAdjustedPixelValueOrAuto(style.clip().top(), style);
|
| + CSSValue* right = zoomAdjustedPixelValueOrAuto(style.clip().right(), style);
|
| + CSSValue* bottom = zoomAdjustedPixelValueOrAuto(style.clip().bottom(), style);
|
| + CSSValue* left = zoomAdjustedPixelValueOrAuto(style.clip().left(), style);
|
| return CSSQuadValue::create(top, right, bottom, left, CSSQuadValue::SerializeAsRect);
|
| }
|
| case CSSPropertySpeak:
|
| - return CSSPrimitiveValue::create(style.speak());
|
| + return CSSIdentifierValue::create(style.speak());
|
| case CSSPropertyTransform:
|
| return computedTransform(layoutObject, style);
|
| case CSSPropertyTransformOrigin: {
|
| @@ -2616,7 +2616,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return list;
|
| }
|
| case CSSPropertyTransformStyle:
|
| - return CSSPrimitiveValue::createIdentifier((style.transformStyle3D() == TransformStyle3DPreserve3D) ? CSSValuePreserve3d : CSSValueFlat);
|
| + return CSSIdentifierValue::create((style.transformStyle3D() == TransformStyle3DPreserve3D) ? CSSValuePreserve3d : CSSValueFlat);
|
| case CSSPropertyTransitionDelay:
|
| return valueForAnimationDelay(style.transitions());
|
| case CSSPropertyTransitionDuration:
|
| @@ -2642,27 +2642,27 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
|
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| // transition-property default value.
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueAll));
|
| + list->append(*CSSIdentifierValue::create(CSSValueAll));
|
| list->append(*CSSPrimitiveValue::create(CSSTransitionData::initialDuration(), CSSPrimitiveValue::UnitType::Seconds));
|
| list->append(*createTimingFunctionValue(CSSTransitionData::initialTimingFunction().get()));
|
| list->append(*CSSPrimitiveValue::create(CSSTransitionData::initialDelay(), CSSPrimitiveValue::UnitType::Seconds));
|
| return list;
|
| }
|
| case CSSPropertyPointerEvents:
|
| - return CSSPrimitiveValue::create(style.pointerEvents());
|
| + return CSSIdentifierValue::create(style.pointerEvents());
|
| case CSSPropertyWritingMode:
|
| case CSSPropertyWebkitWritingMode:
|
| - return CSSPrimitiveValue::create(style.getWritingMode());
|
| + return CSSIdentifierValue::create(style.getWritingMode());
|
| case CSSPropertyWebkitTextCombine:
|
| if (style.getTextCombine() == TextCombineAll)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueHorizontal);
|
| + return CSSIdentifierValue::create(CSSValueHorizontal);
|
| case CSSPropertyTextCombineUpright:
|
| - return CSSPrimitiveValue::create(style.getTextCombine());
|
| + return CSSIdentifierValue::create(style.getTextCombine());
|
| case CSSPropertyWebkitTextOrientation:
|
| if (style.getTextOrientation() == TextOrientationMixed)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueVerticalRight);
|
| + return CSSIdentifierValue::create(CSSValueVerticalRight);
|
| case CSSPropertyTextOrientation:
|
| - return CSSPrimitiveValue::create(style.getTextOrientation());
|
| + return CSSIdentifierValue::create(style.getTextOrientation());
|
| case CSSPropertyContent:
|
| return valueForContentData(style);
|
| case CSSPropertyCounterIncrement:
|
| @@ -2676,9 +2676,9 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| if (operation->type() == ClipPathOperation::REFERENCE)
|
| return CSSURIValue::create(toReferenceClipPathOperation(operation)->url());
|
| }
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyShapeMargin:
|
| - return CSSPrimitiveValue::create(style.shapeMargin(), style.effectiveZoom());
|
| + return CSSValue::create(style.shapeMargin(), style.effectiveZoom());
|
| case CSSPropertyShapeImageThreshold:
|
| return CSSPrimitiveValue::create(style.shapeImageThreshold(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyShapeOutside:
|
| @@ -2688,12 +2688,12 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyBackdropFilter:
|
| return valueForFilter(style, style.backdropFilter());
|
| case CSSPropertyMixBlendMode:
|
| - return CSSPrimitiveValue::create(style.blendMode());
|
| + return CSSIdentifierValue::create(style.blendMode());
|
|
|
| case CSSPropertyBackgroundBlendMode: {
|
| CSSValueList* list = CSSValueList::createCommaSeparated();
|
| for (const FillLayer* currLayer = &style.backgroundLayers(); currLayer; currLayer = currLayer->next())
|
| - list->append(*CSSPrimitiveValue::create(currLayer->blendMode()));
|
| + list->append(*CSSIdentifierValue::create(currLayer->blendMode()));
|
| return list;
|
| }
|
| case CSSPropertyBackground:
|
| @@ -2761,7 +2761,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyOffsetPath:
|
| if (const StylePath* styleMotionPath = style.offsetPath())
|
| return styleMotionPath->computedCSSValue();
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
|
|
| case CSSPropertyOffsetDistance:
|
| return zoomAdjustedPixelValueForLength(style.offsetDistance(), style);
|
| @@ -2769,7 +2769,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyOffsetRotation: {
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| if (style.offsetRotation().type == OffsetRotationAuto)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueAuto));
|
| + list->append(*CSSIdentifierValue::create(CSSValueAuto));
|
| list->append(*CSSPrimitiveValue::create(style.offsetRotation().angle, CSSPrimitiveValue::UnitType::Degrees));
|
| return list;
|
| }
|
| @@ -2844,41 +2844,41 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
|
|
| // SVG properties.
|
| case CSSPropertyClipRule:
|
| - return CSSPrimitiveValue::create(svgStyle.clipRule());
|
| + return CSSIdentifierValue::create(svgStyle.clipRule());
|
| case CSSPropertyFloodOpacity:
|
| return CSSPrimitiveValue::create(svgStyle.floodOpacity(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyStopOpacity:
|
| return CSSPrimitiveValue::create(svgStyle.stopOpacity(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyColorInterpolation:
|
| - return CSSPrimitiveValue::create(svgStyle.colorInterpolation());
|
| + return CSSIdentifierValue::create(svgStyle.colorInterpolation());
|
| case CSSPropertyColorInterpolationFilters:
|
| - return CSSPrimitiveValue::create(svgStyle.colorInterpolationFilters());
|
| + return CSSIdentifierValue::create(svgStyle.colorInterpolationFilters());
|
| case CSSPropertyFillOpacity:
|
| return CSSPrimitiveValue::create(svgStyle.fillOpacity(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyFillRule:
|
| - return CSSPrimitiveValue::create(svgStyle.fillRule());
|
| + return CSSIdentifierValue::create(svgStyle.fillRule());
|
| case CSSPropertyColorRendering:
|
| - return CSSPrimitiveValue::create(svgStyle.colorRendering());
|
| + return CSSIdentifierValue::create(svgStyle.colorRendering());
|
| case CSSPropertyShapeRendering:
|
| - return CSSPrimitiveValue::create(svgStyle.shapeRendering());
|
| + return CSSIdentifierValue::create(svgStyle.shapeRendering());
|
| case CSSPropertyStrokeLinecap:
|
| - return CSSPrimitiveValue::create(svgStyle.capStyle());
|
| + return CSSIdentifierValue::create(svgStyle.capStyle());
|
| case CSSPropertyStrokeLinejoin:
|
| - return CSSPrimitiveValue::create(svgStyle.joinStyle());
|
| + return CSSIdentifierValue::create(svgStyle.joinStyle());
|
| case CSSPropertyStrokeMiterlimit:
|
| return CSSPrimitiveValue::create(svgStyle.strokeMiterLimit(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyStrokeOpacity:
|
| return CSSPrimitiveValue::create(svgStyle.strokeOpacity(), CSSPrimitiveValue::UnitType::Number);
|
| case CSSPropertyAlignmentBaseline:
|
| - return CSSPrimitiveValue::create(svgStyle.alignmentBaseline());
|
| + return CSSIdentifierValue::create(svgStyle.alignmentBaseline());
|
| case CSSPropertyDominantBaseline:
|
| - return CSSPrimitiveValue::create(svgStyle.dominantBaseline());
|
| + return CSSIdentifierValue::create(svgStyle.dominantBaseline());
|
| case CSSPropertyTextAnchor:
|
| - return CSSPrimitiveValue::create(svgStyle.textAnchor());
|
| + return CSSIdentifierValue::create(svgStyle.textAnchor());
|
| case CSSPropertyMask:
|
| if (!svgStyle.maskerResource().isEmpty())
|
| return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.maskerResource()));
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyFloodColor:
|
| return currentColorOrValidColor(style, svgStyle.floodColor());
|
| case CSSPropertyLightingColor:
|
| @@ -2890,15 +2890,15 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyMarkerEnd:
|
| if (!svgStyle.markerEndResource().isEmpty())
|
| return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.markerEndResource()));
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyMarkerMid:
|
| if (!svgStyle.markerMidResource().isEmpty())
|
| return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.markerMidResource()));
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyMarkerStart:
|
| if (!svgStyle.markerStartResource().isEmpty())
|
| return CSSURIValue::create(serializeAsFragmentIdentifier(svgStyle.markerStartResource()));
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyStroke:
|
| return adjustSVGPaintForCurrentColor(svgStyle.strokePaintType(), svgStyle.strokePaintUri(), svgStyle.strokePaintColor(), style.color());
|
| case CSSPropertyStrokeDasharray:
|
| @@ -2910,9 +2910,9 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyBaselineShift: {
|
| switch (svgStyle.baselineShift()) {
|
| case BS_SUPER:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueSuper);
|
| + return CSSIdentifierValue::create(CSSValueSuper);
|
| case BS_SUB:
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueSub);
|
| + return CSSIdentifierValue::create(CSSValueSub);
|
| case BS_LENGTH:
|
| return zoomAdjustedPixelValueForLength(svgStyle.baselineShiftValue(), style);
|
| }
|
| @@ -2920,20 +2920,20 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| return nullptr;
|
| }
|
| case CSSPropertyBufferedRendering:
|
| - return CSSPrimitiveValue::create(svgStyle.bufferedRendering());
|
| + return CSSIdentifierValue::create(svgStyle.bufferedRendering());
|
| case CSSPropertyPaintOrder:
|
| return paintOrderToCSSValueList(svgStyle);
|
| case CSSPropertyVectorEffect:
|
| - return CSSPrimitiveValue::create(svgStyle.vectorEffect());
|
| + return CSSIdentifierValue::create(svgStyle.vectorEffect());
|
| case CSSPropertyMaskType:
|
| - return CSSPrimitiveValue::create(svgStyle.maskType());
|
| + return CSSIdentifierValue::create(svgStyle.maskType());
|
| case CSSPropertyMarker:
|
| // the above properties are not yet implemented in the engine
|
| return nullptr;
|
| case CSSPropertyD:
|
| if (const StylePath* stylePath = svgStyle.d())
|
| return stylePath->computedCSSValue();
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| case CSSPropertyCx:
|
| return zoomAdjustedPixelValueForLength(svgStyle.cx(), style);
|
| case CSSPropertyCy:
|
| @@ -2949,7 +2949,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| case CSSPropertyRy:
|
| return zoomAdjustedPixelValueForLength(svgStyle.ry(), style);
|
| case CSSPropertyScrollSnapType:
|
| - return CSSPrimitiveValue::create(style.getScrollSnapType());
|
| + return CSSIdentifierValue::create(style.getScrollSnapType());
|
| case CSSPropertyScrollSnapPointsX:
|
| return valueForScrollSnapPoints(style.scrollSnapPointsX(), style);
|
| case CSSPropertyScrollSnapPointsY:
|
| @@ -3010,21 +3010,21 @@ const CSSValue* ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, cons
|
| }
|
| case CSSPropertyContain: {
|
| if (!style.contain())
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
| + return CSSIdentifierValue::create(CSSValueNone);
|
| if (style.contain() == ContainsStrict)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueStrict);
|
| + return CSSIdentifierValue::create(CSSValueStrict);
|
| if (style.contain() == ContainsContent)
|
| - return CSSPrimitiveValue::createIdentifier(CSSValueContent);
|
| + return CSSIdentifierValue::create(CSSValueContent);
|
|
|
| CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| if (style.containsStyle())
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueStyle));
|
| + list->append(*CSSIdentifierValue::create(CSSValueStyle));
|
| if (style.contain() & ContainsLayout)
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueLayout));
|
| + list->append(*CSSIdentifierValue::create(CSSValueLayout));
|
| if (style.containsPaint())
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValuePaint));
|
| + list->append(*CSSIdentifierValue::create(CSSValuePaint));
|
| if (style.containsSize())
|
| - list->append(*CSSPrimitiveValue::createIdentifier(CSSValueSize));
|
| + list->append(*CSSIdentifierValue::create(CSSValueSize));
|
| ASSERT(list->length());
|
| return list;
|
| }
|
|
|