| 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 0b14e05a0bc946ddeb56fc4fb6d935f0d306b64c..5b263c4beb893bdb99ca5495e3a3b5e2a6212c6d 100644
|
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
|
| @@ -65,24 +65,24 @@ inline static bool isFlexOrGrid(const ComputedStyle* style)
|
| return style && style->isDisplayFlexibleOrGridBox();
|
| }
|
|
|
| -inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(double value, const ComputedStyle& style)
|
| +inline static RawPtr<CSSPrimitiveValue> zoomAdjustedPixelValue(double value, const ComputedStyle& style)
|
| {
|
| return cssValuePool().createValue(adjustFloatForAbsoluteZoom(value, style), CSSPrimitiveValue::UnitType::Pixels);
|
| }
|
|
|
| -inline static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedNumberValue(double value, const ComputedStyle& style)
|
| +inline static RawPtr<CSSPrimitiveValue> zoomAdjustedNumberValue(double value, const ComputedStyle& style)
|
| {
|
| return cssValuePool().createValue(value / style.effectiveZoom(), CSSPrimitiveValue::UnitType::Number);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> zoomAdjustedPixelValueForLength(const Length& length, const ComputedStyle& style)
|
| +static RawPtr<CSSPrimitiveValue> zoomAdjustedPixelValueForLength(const Length& length, const ComputedStyle& style)
|
| {
|
| if (length.isFixed())
|
| return zoomAdjustedPixelValue(length.value(), style);
|
| return cssValuePool().createValue(length, style);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> pixelValueForUnzoomedLength(const UnzoomedLength& unzoomedLength, const ComputedStyle& style)
|
| +static RawPtr<CSSPrimitiveValue> pixelValueForUnzoomedLength(const UnzoomedLength& unzoomedLength, const ComputedStyle& style)
|
| {
|
| const Length& length = unzoomedLength.length();
|
| if (length.isFixed())
|
| @@ -90,9 +90,9 @@ static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> pixelValueForUnzoomedLength(con
|
| return cssValuePool().createValue(length, style);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> createPositionListForLayer(CSSPropertyID propertyID, const FillLayer& layer, const ComputedStyle& style)
|
| +static RawPtr<CSSValueList> createPositionListForLayer(CSSPropertyID propertyID, const FillLayer& layer, const ComputedStyle& style)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated();
|
| if (layer.isBackgroundXOriginSet()) {
|
| ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
|
| positionList->append(cssValuePool().createValue(layer.backgroundXOrigin()));
|
| @@ -106,13 +106,13 @@ static PassRefPtrWillBeRawPtr<CSSValueList> createPositionListForLayer(CSSProper
|
| return positionList.release();
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::currentColorOrValidColor(const ComputedStyle& style, const StyleColor& color)
|
| +RawPtr<CSSValue> ComputedStyleCSSValueMapping::currentColorOrValidColor(const ComputedStyle& style, const StyleColor& color)
|
| {
|
| // This function does NOT look at visited information, so that computed style doesn't expose that.
|
| return cssValuePool().createColorValue(color.resolve(style.color()).rgb());
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForFillSize(const FillSize& fillSize, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> valueForFillSize(const FillSize& fillSize, const ComputedStyle& style)
|
| {
|
| if (fillSize.type == Contain)
|
| return cssValuePool().createIdentifierValue(CSSValueContain);
|
| @@ -123,13 +123,13 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForFillSize(const FillSize& fillSiz
|
| if (fillSize.size.height().isAuto())
|
| return zoomAdjustedPixelValueForLength(fillSize.size.width(), style);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(zoomAdjustedPixelValueForLength(fillSize.size.width(), style));
|
| list->append(zoomAdjustedPixelValueForLength(fillSize.size.height(), style));
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForFillRepeat(EFillRepeat xRepeat, EFillRepeat yRepeat)
|
| +static RawPtr<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.
|
| @@ -140,13 +140,13 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForFillRepeat(EFillRepeat xRepeat,
|
| if (xRepeat == NoRepeatFill && yRepeat == RepeatFill)
|
| return cssValuePool().createIdentifierValue(CSSValueRepeatY);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(cssValuePool().createValue(xRepeat));
|
| list->append(cssValuePool().createValue(yRepeat));
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForFillSourceType(EMaskSourceType type)
|
| +static RawPtr<CSSValue> valueForFillSourceType(EMaskSourceType type)
|
| {
|
| switch (type) {
|
| case MaskAlpha:
|
| @@ -160,7 +160,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForFillSourceType(EMaskSourceType t
|
| return nullptr;
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForPositionOffset(const ComputedStyle& style, CSSPropertyID propertyID, const LayoutObject* layoutObject)
|
| +static RawPtr<CSSValue> valueForPositionOffset(const ComputedStyle& style, CSSPropertyID propertyID, const LayoutObject* layoutObject)
|
| {
|
| Length offset;
|
| switch (propertyID) {
|
| @@ -196,13 +196,13 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForPositionOffset(const ComputedSty
|
| return zoomAdjustedPixelValueForLength(offset, style);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const NinePieceImage& image)
|
| +static RawPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const NinePieceImage& image)
|
| {
|
| // Create the slices.
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> top = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> right = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> left = nullptr;
|
| + RawPtr<CSSPrimitiveValue> top = nullptr;
|
| + RawPtr<CSSPrimitiveValue> right = nullptr;
|
| + RawPtr<CSSPrimitiveValue> bottom = nullptr;
|
| + RawPtr<CSSPrimitiveValue> left = nullptr;
|
|
|
| // TODO(alancutter): Make this code aware of calc lengths.
|
| if (image.imageSlices().top().hasPercent())
|
| @@ -244,13 +244,13 @@ static PassRefPtrWillBeRawPtr<CSSBorderImageSliceValue> valueForNinePieceImageSl
|
| return CSSBorderImageSliceValue::create(CSSQuadValue::create(top.release(), right.release(), bottom.release(), left.release(), CSSQuadValue::SerializeAsQuad), image.fill());
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSQuadValue> valueForNinePieceImageQuad(const BorderImageLengthBox& box, const ComputedStyle& style)
|
| +static RawPtr<CSSQuadValue> valueForNinePieceImageQuad(const BorderImageLengthBox& box, const ComputedStyle& style)
|
| {
|
| // Create the slices.
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> top = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> right = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> left = nullptr;
|
| + RawPtr<CSSPrimitiveValue> top = nullptr;
|
| + RawPtr<CSSPrimitiveValue> right = nullptr;
|
| + RawPtr<CSSPrimitiveValue> bottom = nullptr;
|
| + RawPtr<CSSPrimitiveValue> left = nullptr;
|
|
|
| if (box.top().isNumber())
|
| top = cssValuePool().createValue(box.top().number(), CSSPrimitiveValue::UnitType::Number);
|
| @@ -304,10 +304,10 @@ static CSSValueID valueForRepeatRule(int rule)
|
| }
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImageRepeat(const NinePieceImage& image)
|
| +static RawPtr<CSSValue> valueForNinePieceImageRepeat(const NinePieceImage& image)
|
| {
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> horizontalRepeat = nullptr;
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> verticalRepeat = nullptr;
|
| + RawPtr<CSSPrimitiveValue> horizontalRepeat = nullptr;
|
| + RawPtr<CSSPrimitiveValue> verticalRepeat = nullptr;
|
|
|
| horizontalRepeat = cssValuePool().createIdentifierValue(valueForRepeatRule(image.horizontalRule()));
|
| if (image.horizontalRule() == image.verticalRule())
|
| @@ -317,44 +317,44 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImageRepeat(const NineP
|
| return CSSValuePair::create(horizontalRepeat.release(), verticalRepeat.release(), CSSValuePair::DropIdenticalValues);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForNinePieceImage(const NinePieceImage& image, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> valueForNinePieceImage(const NinePieceImage& image, const ComputedStyle& style)
|
| {
|
| if (!image.hasImage())
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
|
|
| // Image first.
|
| - RefPtrWillBeRawPtr<CSSValue> imageValue = nullptr;
|
| + RawPtr<CSSValue> imageValue = nullptr;
|
| if (image.image())
|
| imageValue = image.image()->computedCSSValue();
|
|
|
| // Create the image slice.
|
| - RefPtrWillBeRawPtr<CSSBorderImageSliceValue> imageSlices = valueForNinePieceImageSlice(image);
|
| + RawPtr<CSSBorderImageSliceValue> imageSlices = valueForNinePieceImageSlice(image);
|
|
|
| // Create the border area slices.
|
| - RefPtrWillBeRawPtr<CSSValue> borderSlices = valueForNinePieceImageQuad(image.borderSlices(), style);
|
| + RawPtr<CSSValue> borderSlices = valueForNinePieceImageQuad(image.borderSlices(), style);
|
|
|
| // Create the border outset.
|
| - RefPtrWillBeRawPtr<CSSValue> outset = valueForNinePieceImageQuad(image.outset(), style);
|
| + RawPtr<CSSValue> outset = valueForNinePieceImageQuad(image.outset(), style);
|
|
|
| // Create the repeat rules.
|
| - RefPtrWillBeRawPtr<CSSValue> repeat = valueForNinePieceImageRepeat(image);
|
| + RawPtr<CSSValue> repeat = valueForNinePieceImageRepeat(image);
|
|
|
| return createBorderImageValue(imageValue.release(), imageSlices.release(), borderSlices.release(), outset.release(), repeat.release());
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForReflection(const StyleReflection* reflection, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> valueForReflection(const StyleReflection* reflection, const ComputedStyle& style)
|
| {
|
| if (!reflection)
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> offset = nullptr;
|
| + RawPtr<CSSPrimitiveValue> offset = nullptr;
|
| // TODO(alancutter): Make this work correctly for calc lengths.
|
| if (reflection->offset().hasPercent())
|
| offset = cssValuePool().createValue(reflection->offset().percent(), CSSPrimitiveValue::UnitType::Percentage);
|
| else
|
| offset = zoomAdjustedPixelValue(reflection->offset().value(), style);
|
|
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> direction = nullptr;
|
| + RawPtr<CSSPrimitiveValue> direction = nullptr;
|
| switch (reflection->direction()) {
|
| case ReflectionBelow:
|
| direction = cssValuePool().createIdentifierValue(CSSValueBelow);
|
| @@ -384,9 +384,9 @@ static ItemPosition resolveAlignmentAuto(ItemPosition position, const ComputedSt
|
| return isFlexOrGrid(style) ? ItemPositionStretch : ItemPositionStart;
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> valueForItemPositionWithOverflowAlignment(ItemPosition itemPosition, OverflowAlignment overflowAlignment, ItemPositionType positionType)
|
| +static RawPtr<CSSValueList> valueForItemPositionWithOverflowAlignment(ItemPosition itemPosition, OverflowAlignment overflowAlignment, ItemPositionType positionType)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
|
| if (positionType == LegacyPosition)
|
| result->append(CSSPrimitiveValue::createIdentifier(CSSValueLegacy));
|
| result->append(CSSPrimitiveValue::create(itemPosition));
|
| @@ -396,37 +396,37 @@ static PassRefPtrWillBeRawPtr<CSSValueList> valueForItemPositionWithOverflowAlig
|
| return result.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> valuesForGridShorthand(const StylePropertyShorthand& shorthand, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| +static RawPtr<CSSValueList> valuesForGridShorthand(const StylePropertyShorthand& shorthand, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
|
| for (size_t i = 0; i < shorthand.length(); ++i) {
|
| - RefPtrWillBeRawPtr<CSSValue> value = ComputedStyleCSSValueMapping::get(shorthand.properties()[i], style, layoutObject, styledNode, allowVisitedStyle);
|
| + RawPtr<CSSValue> value = ComputedStyleCSSValueMapping::get(shorthand.properties()[i], style, layoutObject, styledNode, allowVisitedStyle);
|
| ASSERT(value);
|
| list->append(value.release());
|
| }
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> valuesForShorthandProperty(const StylePropertyShorthand& shorthand, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| +static RawPtr<CSSValueList> valuesForShorthandProperty(const StylePropertyShorthand& shorthand, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| for (size_t i = 0; i < shorthand.length(); ++i) {
|
| - RefPtrWillBeRawPtr<CSSValue> value = ComputedStyleCSSValueMapping::get(shorthand.properties()[i], style, layoutObject, styledNode, allowVisitedStyle);
|
| + RawPtr<CSSValue> value = ComputedStyleCSSValueMapping::get(shorthand.properties()[i], style, layoutObject, styledNode, allowVisitedStyle);
|
| ASSERT(value);
|
| list->append(value);
|
| }
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> valuesForBackgroundShorthand(const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| +static RawPtr<CSSValueList> valuesForBackgroundShorthand(const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> ret = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> ret = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next()) {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
|
| - RefPtrWillBeRawPtr<CSSValueList> beforeSlash = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
|
| + RawPtr<CSSValueList> beforeSlash = CSSValueList::createSpaceSeparated();
|
| if (!currLayer->next()) { // color only for final layer
|
| - RefPtrWillBeRawPtr<CSSValue> value = ComputedStyleCSSValueMapping::get(CSSPropertyBackgroundColor, style, layoutObject, styledNode, allowVisitedStyle);
|
| + RawPtr<CSSValue> value = ComputedStyleCSSValueMapping::get(CSSPropertyBackgroundColor, style, layoutObject, styledNode, allowVisitedStyle);
|
| ASSERT(value);
|
| beforeSlash->append(value);
|
| }
|
| @@ -435,7 +435,7 @@ static PassRefPtrWillBeRawPtr<CSSValueList> valuesForBackgroundShorthand(const C
|
| beforeSlash->append(cssValuePool().createValue(currLayer->attachment()));
|
| beforeSlash->append(createPositionListForLayer(CSSPropertyBackgroundPosition, *currLayer, style));
|
| list->append(beforeSlash);
|
| - RefPtrWillBeRawPtr<CSSValueList> afterSlash = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> afterSlash = CSSValueList::createSpaceSeparated();
|
| afterSlash->append(valueForFillSize(currLayer->size(), style));
|
| afterSlash->append(cssValuePool().createValue(currLayer->origin()));
|
| afterSlash->append(cssValuePool().createValue(currLayer->clip()));
|
| @@ -445,9 +445,9 @@ static PassRefPtrWillBeRawPtr<CSSValueList> valuesForBackgroundShorthand(const C
|
| return ret.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> valueForContentPositionAndDistributionWithOverflowAlignment(const StyleContentAlignmentData& data)
|
| +static RawPtr<CSSValueList> valueForContentPositionAndDistributionWithOverflowAlignment(const StyleContentAlignmentData& data)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> result = CSSValueList::createSpaceSeparated();
|
| if (data.distribution() != ContentDistributionDefault)
|
| result->append(CSSPrimitiveValue::create(data.distribution()));
|
| if (data.distribution() == ContentDistributionDefault || data.position() != ContentPositionNormal)
|
| @@ -459,7 +459,7 @@ static PassRefPtrWillBeRawPtr<CSSValueList> valueForContentPositionAndDistributi
|
| return result.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForLineHeight(const ComputedStyle& style)
|
| +static RawPtr<CSSPrimitiveValue> valueForLineHeight(const ComputedStyle& style)
|
| {
|
| Length length = style.lineHeight();
|
| if (length.isNegative())
|
| @@ -485,48 +485,48 @@ static CSSValueID identifierForFamily(const AtomicString& family)
|
| return CSSValueInvalid;
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForFamily(const AtomicString& family)
|
| +static RawPtr<CSSValue> valueForFamily(const AtomicString& family)
|
| {
|
| if (CSSValueID familyIdentifier = identifierForFamily(family))
|
| return cssValuePool().createIdentifierValue(familyIdentifier);
|
| return cssValuePool().createFontFamilyValue(family.getString());
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> valueForFontFamily(const ComputedStyle& style)
|
| +static RawPtr<CSSValueList> valueForFontFamily(const ComputedStyle& style)
|
| {
|
| const FontFamily& firstFamily = style.getFontDescription().family();
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| for (const FontFamily* family = &firstFamily; family; family = family->next())
|
| list->append(valueForFamily(family->family()));
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontSize(const ComputedStyle& style)
|
| +static RawPtr<CSSPrimitiveValue> valueForFontSize(const ComputedStyle& style)
|
| {
|
| return zoomAdjustedPixelValue(style.getFontDescription().computedSize(), style);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontStretch(const ComputedStyle& style)
|
| +static RawPtr<CSSPrimitiveValue> valueForFontStretch(const ComputedStyle& style)
|
| {
|
| return cssValuePool().createValue(style.getFontDescription().stretch());
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontStyle(const ComputedStyle& style)
|
| +static RawPtr<CSSPrimitiveValue> valueForFontStyle(const ComputedStyle& style)
|
| {
|
| return cssValuePool().createValue(style.getFontDescription().style());
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontVariant(const ComputedStyle& style)
|
| +static RawPtr<CSSPrimitiveValue> valueForFontVariant(const ComputedStyle& style)
|
| {
|
| return cssValuePool().createValue(style.getFontDescription().variant());
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> valueForFontWeight(const ComputedStyle& style)
|
| +static RawPtr<CSSPrimitiveValue> valueForFontWeight(const ComputedStyle& style)
|
| {
|
| return cssValuePool().createValue(style.getFontDescription().weight());
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> specifiedValueForGridTrackBreadth(const GridLength& trackBreadth, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> specifiedValueForGridTrackBreadth(const GridLength& trackBreadth, const ComputedStyle& style)
|
| {
|
| if (!trackBreadth.isLength())
|
| return cssValuePool().createValue(trackBreadth.flex(), CSSPrimitiveValue::UnitType::Fraction);
|
| @@ -537,13 +537,13 @@ static PassRefPtrWillBeRawPtr<CSSValue> specifiedValueForGridTrackBreadth(const
|
| return zoomAdjustedPixelValueForLength(trackBreadthLength, style);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> specifiedValueForGridTrackSize(const GridTrackSize& trackSize, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> specifiedValueForGridTrackSize(const GridTrackSize& trackSize, const ComputedStyle& style)
|
| {
|
| switch (trackSize.type()) {
|
| case LengthTrackSizing:
|
| return specifiedValueForGridTrackBreadth(trackSize.length(), style);
|
| case MinMaxTrackSizing:
|
| - RefPtrWillBeRawPtr<CSSFunctionValue> minMaxTrackBreadths = CSSFunctionValue::create(CSSValueMinmax);
|
| + RawPtr<CSSFunctionValue> minMaxTrackBreadths = CSSFunctionValue::create(CSSValueMinmax);
|
| minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.minTrackBreadth(), style));
|
| minMaxTrackBreadths->append(specifiedValueForGridTrackBreadth(trackSize.maxTrackBreadth(), style));
|
| return minMaxTrackBreadths.release();
|
| @@ -558,13 +558,13 @@ static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLines& order
|
| if (namedGridLines.isEmpty())
|
| return;
|
|
|
| - RefPtrWillBeRawPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue::create();
|
| + RawPtr<CSSGridLineNamesValue> lineNames = CSSGridLineNamesValue::create();
|
| for (size_t j = 0; j < namedGridLines.size(); ++j)
|
| lineNames->append(CSSCustomIdentValue::create(namedGridLines[j]));
|
| list.append(lineNames.release());
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForGridTrackList(GridTrackSizingDirection direction, const LayoutObject* layoutObject, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> valueForGridTrackList(GridTrackSizingDirection direction, const LayoutObject* layoutObject, const ComputedStyle& style)
|
| {
|
| bool isRowAxis = direction == ForColumns;
|
| const Vector<GridTrackSize>& trackSizes = isRowAxis ? style.gridTemplateColumns() : style.gridTemplateRows();
|
| @@ -587,7 +587,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForGridTrackList(GridTrackSizingDir
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
| }
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| size_t insertionIndex;
|
| if (isLayoutGrid) {
|
| const Vector<LayoutUnit>& trackPositions = direction == ForColumns ? toLayoutGrid(layoutObject)->columnPositions() : toLayoutGrid(layoutObject)->rowPositions();
|
| @@ -617,7 +617,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForGridTrackList(GridTrackSizingDir
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForGridPosition(const GridPosition& position)
|
| +static RawPtr<CSSValue> valueForGridPosition(const GridPosition& position)
|
| {
|
| if (position.isAuto())
|
| return cssValuePool().createIdentifierValue(CSSValueAuto);
|
| @@ -625,7 +625,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForGridPosition(const GridPosition&
|
| if (position.isNamedGridArea())
|
| return CSSCustomIdentValue::create(position.namedGridLine());
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| if (position.isSpan()) {
|
| list->append(cssValuePool().createIdentifierValue(CSSValueSpan));
|
| list->append(cssValuePool().createValue(position.spanPosition(), CSSPrimitiveValue::UnitType::Number));
|
| @@ -647,10 +647,10 @@ static LayoutRect sizingBox(const LayoutObject* layoutObject)
|
| return box->style()->boxSizing() == BoxSizingBorderBox ? box->borderBoxRect() : box->computedCSSContentBoxRect();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int textDecoration)
|
| +static RawPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int textDecoration)
|
| {
|
| // Blink value is ignored.
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| if (textDecoration & TextDecorationUnderline)
|
| list->append(cssValuePool().createIdentifierValue(CSSValueUnderline));
|
| if (textDecoration & TextDecorationOverline)
|
| @@ -663,7 +663,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> renderTextDecorationFlagsToCSSValue(int
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForTextDecorationStyle(TextDecorationStyle textDecorationStyle)
|
| +static RawPtr<CSSValue> valueForTextDecorationStyle(TextDecorationStyle textDecorationStyle)
|
| {
|
| switch (textDecorationStyle) {
|
| case TextDecorationStyleSolid:
|
| @@ -682,9 +682,9 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForTextDecorationStyle(TextDecorati
|
| return cssValuePool().createExplicitInitialValue();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction touchAction)
|
| +static RawPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction touchAction)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| if (touchAction == TouchActionAuto) {
|
| list->append(cssValuePool().createIdentifierValue(CSSValueAuto));
|
| } else if (touchAction == TouchActionNone) {
|
| @@ -710,9 +710,9 @@ static PassRefPtrWillBeRawPtr<CSSValue> touchActionFlagsToCSSValue(TouchAction t
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForWillChange(const Vector<CSSPropertyID>& willChangeProperties, bool willChangeContents, bool willChangeScrollPosition)
|
| +static RawPtr<CSSValue> valueForWillChange(const Vector<CSSPropertyID>& willChangeProperties, bool willChangeContents, bool willChangeScrollPosition)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| if (willChangeContents)
|
| list->append(cssValuePool().createIdentifierValue(CSSValueContents));
|
| if (willChangeScrollPosition)
|
| @@ -724,9 +724,9 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForWillChange(const Vector<CSSPrope
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationDelay(const CSSTimingData* timingData)
|
| +static RawPtr<CSSValue> valueForAnimationDelay(const CSSTimingData* timingData)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| if (timingData) {
|
| for (size_t i = 0; i < timingData->delayList().size(); ++i)
|
| list->append(cssValuePool().createValue(timingData->delayList()[i], CSSPrimitiveValue::UnitType::Seconds));
|
| @@ -736,7 +736,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationDelay(const CSSTimingDa
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationDirection(Timing::PlaybackDirection direction)
|
| +static RawPtr<CSSValue> valueForAnimationDirection(Timing::PlaybackDirection direction)
|
| {
|
| switch (direction) {
|
| case Timing::PlaybackDirectionNormal:
|
| @@ -753,9 +753,9 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationDirection(Timing::Playb
|
| }
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationDuration(const CSSTimingData* timingData)
|
| +static RawPtr<CSSValue> valueForAnimationDuration(const CSSTimingData* timingData)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| if (timingData) {
|
| for (size_t i = 0; i < timingData->durationList().size(); ++i)
|
| list->append(cssValuePool().createValue(timingData->durationList()[i], CSSPrimitiveValue::UnitType::Seconds));
|
| @@ -765,7 +765,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationDuration(const CSSTimin
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationFillMode(Timing::FillMode fillMode)
|
| +static RawPtr<CSSValue> valueForAnimationFillMode(Timing::FillMode fillMode)
|
| {
|
| switch (fillMode) {
|
| case Timing::FillModeNone:
|
| @@ -782,14 +782,14 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationFillMode(Timing::FillMo
|
| }
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationIterationCount(double iterationCount)
|
| +static RawPtr<CSSValue> valueForAnimationIterationCount(double iterationCount)
|
| {
|
| if (iterationCount == std::numeric_limits<double>::infinity())
|
| return cssValuePool().createIdentifierValue(CSSValueInfinite);
|
| return cssValuePool().createValue(iterationCount, CSSPrimitiveValue::UnitType::Number);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationPlayState(EAnimPlayState playState)
|
| +static RawPtr<CSSValue> valueForAnimationPlayState(EAnimPlayState playState)
|
| {
|
| if (playState == AnimPlayStatePlaying)
|
| return cssValuePool().createIdentifierValue(CSSValueRunning);
|
| @@ -797,7 +797,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationPlayState(EAnimPlayStat
|
| return cssValuePool().createIdentifierValue(CSSValuePaused);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> createTimingFunctionValue(const TimingFunction* timingFunction)
|
| +static RawPtr<CSSValue> createTimingFunctionValue(const TimingFunction* timingFunction)
|
| {
|
| switch (timingFunction->type()) {
|
| case TimingFunction::kCubicBezierFunction:
|
| @@ -845,9 +845,9 @@ static PassRefPtrWillBeRawPtr<CSSValue> createTimingFunctionValue(const TimingFu
|
| }
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationTimingFunction(const CSSTimingData* timingData)
|
| +static RawPtr<CSSValue> valueForAnimationTimingFunction(const CSSTimingData* timingData)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| if (timingData) {
|
| for (size_t i = 0; i < timingData->timingFunctionList().size(); ++i)
|
| list->append(createTimingFunctionValue(timingData->timingFunctionList()[i].get()));
|
| @@ -857,9 +857,9 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForAnimationTimingFunction(const CS
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> valuesForBorderRadiusCorner(LengthSize radius, const ComputedStyle& style)
|
| +static RawPtr<CSSValueList> valuesForBorderRadiusCorner(LengthSize radius, const ComputedStyle& style)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| if (radius.width().type() == Percent)
|
| list->append(cssValuePool().createValue(radius.width().percent(), CSSPrimitiveValue::UnitType::Percentage));
|
| else
|
| @@ -871,17 +871,17 @@ static PassRefPtrWillBeRawPtr<CSSValueList> valuesForBorderRadiusCorner(LengthSi
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForBorderRadiusCorner(LengthSize radius, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> valueForBorderRadiusCorner(LengthSize radius, const ComputedStyle& style)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = valuesForBorderRadiusCorner(radius, style);
|
| + RawPtr<CSSValueList> list = valuesForBorderRadiusCorner(radius, style);
|
| if (list->item(0)->equals(*list->item(1)))
|
| return list->item(0);
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSFunctionValue> valueForMatrixTransform(const TransformationMatrix& transform, const ComputedStyle& style)
|
| +static RawPtr<CSSFunctionValue> valueForMatrixTransform(const TransformationMatrix& transform, const ComputedStyle& style)
|
| {
|
| - RefPtrWillBeRawPtr<CSSFunctionValue> transformValue = nullptr;
|
| + RawPtr<CSSFunctionValue> transformValue = nullptr;
|
| if (transform.isAffine()) {
|
| transformValue = CSSFunctionValue::create(CSSValueMatrix);
|
|
|
| @@ -918,7 +918,7 @@ static PassRefPtrWillBeRawPtr<CSSFunctionValue> valueForMatrixTransform(const Tr
|
| return transformValue.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> computedTransform(const LayoutObject* layoutObject, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> computedTransform(const LayoutObject* layoutObject, const ComputedStyle& style)
|
| {
|
| if (!layoutObject || !style.hasTransform())
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
| @@ -931,13 +931,13 @@ static PassRefPtrWillBeRawPtr<CSSValue> computedTransform(const LayoutObject* la
|
| style.applyTransform(transform, LayoutSize(box.size()), ComputedStyle::ExcludeTransformOrigin, ComputedStyle::ExcludeMotionPath, ComputedStyle::ExcludeIndependentTransformProperties);
|
|
|
| // FIXME: Need to print out individual functions (https://bugs.webkit.org/show_bug.cgi?id=23924)
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(valueForMatrixTransform(transform, style));
|
|
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> createTransitionPropertyValue(const CSSTransitionData::TransitionProperty& property)
|
| +static RawPtr<CSSValue> createTransitionPropertyValue(const CSSTransitionData::TransitionProperty& property)
|
| {
|
| if (property.propertyType == CSSTransitionData::TransitionNone)
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
| @@ -947,9 +947,9 @@ static PassRefPtrWillBeRawPtr<CSSValue> createTransitionPropertyValue(const CSST
|
| return CSSCustomIdentValue::create(getPropertyNameString(property.unresolvedProperty));
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForTransitionProperty(const CSSTransitionData* transitionData)
|
| +static RawPtr<CSSValue> valueForTransitionProperty(const CSSTransitionData* transitionData)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| if (transitionData) {
|
| for (size_t i = 0; i < transitionData->propertyList().size(); ++i)
|
| list->append(createTransitionPropertyValue(transitionData->propertyList()[i]));
|
| @@ -975,19 +975,19 @@ CSSValueID valueForQuoteType(const QuoteType quoteType)
|
| return CSSValueInvalid;
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForContentData(const ComputedStyle& style)
|
| +static RawPtr<CSSValue> valueForContentData(const ComputedStyle& style)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| for (const ContentData* contentData = style.contentData(); contentData; contentData = contentData->next()) {
|
| if (contentData->isCounter()) {
|
| const CounterContent* counter = toCounterContentData(contentData)->counter();
|
| ASSERT(counter);
|
| - RefPtrWillBeRawPtr<CSSCustomIdentValue> identifier = CSSCustomIdentValue::create(counter->identifier());
|
| - RefPtrWillBeRawPtr<CSSCustomIdentValue> separator = CSSCustomIdentValue::create(counter->separator());
|
| + RawPtr<CSSCustomIdentValue> identifier = CSSCustomIdentValue::create(counter->identifier());
|
| + RawPtr<CSSCustomIdentValue> separator = CSSCustomIdentValue::create(counter->separator());
|
| CSSValueID listStyleIdent = CSSValueNone;
|
| if (counter->listStyle() != NoneListStyle)
|
| listStyleIdent = static_cast<CSSValueID>(CSSValueDisc + counter->listStyle());
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> listStyle = cssValuePool().createIdentifierValue(listStyleIdent);
|
| + RawPtr<CSSPrimitiveValue> listStyle = cssValuePool().createIdentifierValue(listStyleIdent);
|
| list->append(CSSCounterValue::create(identifier.release(), listStyle.release(), separator.release()));
|
| } else if (contentData->isImage()) {
|
| const StyleImage* image = toImageContentData(contentData)->image();
|
| @@ -1005,13 +1005,13 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForContentData(const ComputedStyle&
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForCounterDirectives(const ComputedStyle& style, CSSPropertyID propertyID)
|
| +static RawPtr<CSSValue> valueForCounterDirectives(const ComputedStyle& style, CSSPropertyID propertyID)
|
| {
|
| const CounterDirectiveMap* map = style.counterDirectives();
|
| if (!map)
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| for (const auto& item : *map) {
|
| bool isValidCounterValue = propertyID == CSSPropertyCounterIncrement ? item.value.isIncrement() : item.value.isReset();
|
| if (!isValidCounterValue)
|
| @@ -1028,7 +1028,7 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForCounterDirectives(const Computed
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForShape(const ComputedStyle& style, ShapeValue* shapeValue)
|
| +static RawPtr<CSSValue> valueForShape(const ComputedStyle& style, ShapeValue* shapeValue)
|
| {
|
| if (!shapeValue)
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
| @@ -1042,21 +1042,21 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForShape(const ComputedStyle& style
|
|
|
| ASSERT(shapeValue->type() == ShapeValue::Shape);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(valueForBasicShape(style, shapeValue->shape()));
|
| if (shapeValue->cssBox() != BoxMissing)
|
| list->append(cssValuePool().createValue(shapeValue->cssBox()));
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> valuesForSidesShorthand(const StylePropertyShorthand& shorthand, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| +static RawPtr<CSSValueList> valuesForSidesShorthand(const StylePropertyShorthand& shorthand, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| // Assume the properties are in the usual order top, right, bottom, left.
|
| - RefPtrWillBeRawPtr<CSSValue> topValue = ComputedStyleCSSValueMapping::get(shorthand.properties()[0], style, layoutObject, styledNode, allowVisitedStyle);
|
| - RefPtrWillBeRawPtr<CSSValue> rightValue = ComputedStyleCSSValueMapping::get(shorthand.properties()[1], style, layoutObject, styledNode, allowVisitedStyle);
|
| - RefPtrWillBeRawPtr<CSSValue> bottomValue = ComputedStyleCSSValueMapping::get(shorthand.properties()[2], style, layoutObject, styledNode, allowVisitedStyle);
|
| - RefPtrWillBeRawPtr<CSSValue> leftValue = ComputedStyleCSSValueMapping::get(shorthand.properties()[3], style, layoutObject, styledNode, allowVisitedStyle);
|
| + RawPtr<CSSValue> topValue = ComputedStyleCSSValueMapping::get(shorthand.properties()[0], style, layoutObject, styledNode, allowVisitedStyle);
|
| + RawPtr<CSSValue> rightValue = ComputedStyleCSSValueMapping::get(shorthand.properties()[1], style, layoutObject, styledNode, allowVisitedStyle);
|
| + RawPtr<CSSValue> bottomValue = ComputedStyleCSSValueMapping::get(shorthand.properties()[2], style, layoutObject, styledNode, allowVisitedStyle);
|
| + RawPtr<CSSValue> leftValue = ComputedStyleCSSValueMapping::get(shorthand.properties()[3], style, layoutObject, styledNode, allowVisitedStyle);
|
|
|
| // All 4 properties must be specified.
|
| if (!topValue || !rightValue || !bottomValue || !leftValue)
|
| @@ -1077,9 +1077,9 @@ static PassRefPtrWillBeRawPtr<CSSValueList> valuesForSidesShorthand(const StyleP
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValueList> valueForBorderRadiusShorthand(const ComputedStyle& style)
|
| +static RawPtr<CSSValueList> valueForBorderRadiusShorthand(const ComputedStyle& style)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
|
|
|
| bool showHorizontalBottomLeft = style.borderTopRightRadius().width() != style.borderBottomLeftRadius().width();
|
| bool showHorizontalBottomRight = showHorizontalBottomLeft || (style.borderBottomRightRadius().width() != style.borderTopLeftRadius().width());
|
| @@ -1089,12 +1089,12 @@ static PassRefPtrWillBeRawPtr<CSSValueList> valueForBorderRadiusShorthand(const
|
| bool showVerticalBottomRight = showVerticalBottomLeft || (style.borderBottomRightRadius().height() != style.borderTopLeftRadius().height());
|
| bool showVerticalTopRight = showVerticalBottomRight || (style.borderTopRightRadius().height() != style.borderTopLeftRadius().height());
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> topLeftRadius = valuesForBorderRadiusCorner(style.borderTopLeftRadius(), style);
|
| - RefPtrWillBeRawPtr<CSSValueList> topRightRadius = valuesForBorderRadiusCorner(style.borderTopRightRadius(), style);
|
| - RefPtrWillBeRawPtr<CSSValueList> bottomRightRadius = valuesForBorderRadiusCorner(style.borderBottomRightRadius(), style);
|
| - RefPtrWillBeRawPtr<CSSValueList> bottomLeftRadius = valuesForBorderRadiusCorner(style.borderBottomLeftRadius(), style);
|
| + RawPtr<CSSValueList> topLeftRadius = valuesForBorderRadiusCorner(style.borderTopLeftRadius(), style);
|
| + RawPtr<CSSValueList> topRightRadius = valuesForBorderRadiusCorner(style.borderTopRightRadius(), style);
|
| + RawPtr<CSSValueList> bottomRightRadius = valuesForBorderRadiusCorner(style.borderBottomRightRadius(), style);
|
| + RawPtr<CSSValueList> bottomLeftRadius = valuesForBorderRadiusCorner(style.borderBottomLeftRadius(), style);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> horizontalRadii = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> horizontalRadii = CSSValueList::createSpaceSeparated();
|
| horizontalRadii->append(topLeftRadius->item(0));
|
| if (showHorizontalTopRight)
|
| horizontalRadii->append(topRightRadius->item(0));
|
| @@ -1105,7 +1105,7 @@ static PassRefPtrWillBeRawPtr<CSSValueList> valueForBorderRadiusShorthand(const
|
|
|
| list->append(horizontalRadii.release());
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> verticalRadii = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> verticalRadii = CSSValueList::createSpaceSeparated();
|
| verticalRadii->append(topLeftRadius->item(1));
|
| if (showVerticalTopRight)
|
| verticalRadii->append(topRightRadius->item(1));
|
| @@ -1120,21 +1120,21 @@ static PassRefPtrWillBeRawPtr<CSSValueList> valueForBorderRadiusShorthand(const
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> strokeDashArrayToCSSValueList(const SVGDashArray& dashes, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> strokeDashArrayToCSSValueList(const SVGDashArray& dashes, const ComputedStyle& style)
|
| {
|
| if (dashes.isEmpty())
|
| return CSSPrimitiveValue::createIdentifier(CSSValueNone);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| for (const Length& dashLength : dashes.vector())
|
| list->append(zoomAdjustedPixelValueForLength(dashLength, style));
|
|
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> paintOrderToCSSValueList(const SVGComputedStyle& svgStyle)
|
| +static RawPtr<CSSValue> paintOrderToCSSValueList(const SVGComputedStyle& svgStyle)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| for (int i = 0; i < 3; i++) {
|
| EPaintOrderType paintOrderType = svgStyle.paintOrderType(i);
|
| switch (paintOrderType) {
|
| @@ -1153,10 +1153,10 @@ static PassRefPtrWillBeRawPtr<CSSValue> paintOrderToCSSValueList(const SVGComput
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> adjustSVGPaintForCurrentColor(SVGPaintType paintType, const String& url, const Color& color, const Color& currentColor)
|
| +static RawPtr<CSSValue> adjustSVGPaintForCurrentColor(SVGPaintType paintType, const String& url, const Color& color, const Color& currentColor)
|
| {
|
| if (paintType >= SVG_PAINTTYPE_URI_NONE) {
|
| - RefPtrWillBeRawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> values = CSSValueList::createSpaceSeparated();
|
| values->append(CSSURIValue::create(url));
|
| if (paintType == SVG_PAINTTYPE_URI_NONE)
|
| values->append(CSSPrimitiveValue::createIdentifier(CSSValueNone));
|
| @@ -1179,37 +1179,37 @@ static inline String serializeAsFragmentIdentifier(const AtomicString& resource)
|
| return "#" + resource;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForShadowData(const ShadowData& shadow, const ComputedStyle& style, bool useSpread)
|
| +RawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForShadowData(const ShadowData& shadow, const ComputedStyle& style, bool useSpread)
|
| {
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> x = zoomAdjustedPixelValue(shadow.x(), style);
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> y = zoomAdjustedPixelValue(shadow.y(), style);
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(shadow.blur(), style);
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> spread = useSpread ? zoomAdjustedPixelValue(shadow.spread(), style) : PassRefPtrWillBeRawPtr<CSSPrimitiveValue>(nullptr);
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> shadowStyle = shadow.style() == Normal ? PassRefPtrWillBeRawPtr<CSSPrimitiveValue>(nullptr) : cssValuePool().createIdentifierValue(CSSValueInset);
|
| - RefPtrWillBeRawPtr<CSSValue> color = currentColorOrValidColor(style, shadow.color());
|
| + RawPtr<CSSPrimitiveValue> x = zoomAdjustedPixelValue(shadow.x(), style);
|
| + RawPtr<CSSPrimitiveValue> y = zoomAdjustedPixelValue(shadow.y(), style);
|
| + RawPtr<CSSPrimitiveValue> blur = zoomAdjustedPixelValue(shadow.blur(), style);
|
| + RawPtr<CSSPrimitiveValue> spread = useSpread ? zoomAdjustedPixelValue(shadow.spread(), style) : RawPtr<CSSPrimitiveValue>(nullptr);
|
| + RawPtr<CSSPrimitiveValue> shadowStyle = shadow.style() == Normal ? RawPtr<CSSPrimitiveValue>(nullptr) : cssValuePool().createIdentifierValue(CSSValueInset);
|
| + RawPtr<CSSValue> color = currentColorOrValidColor(style, shadow.color());
|
| return CSSShadowValue::create(x.release(), y.release(), blur.release(), spread.release(), shadowStyle.release(), color.release());
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForShadowList(const ShadowList* shadowList, const ComputedStyle& style, bool useSpread)
|
| +RawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForShadowList(const ShadowList* shadowList, const ComputedStyle& style, bool useSpread)
|
| {
|
| if (!shadowList)
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| size_t shadowCount = shadowList->shadows().size();
|
| for (size_t i = 0; i < shadowCount; ++i)
|
| list->append(valueForShadowData(shadowList->shadows()[i], style, useSpread));
|
| return list.release();
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForFilter(const ComputedStyle& style, const FilterOperations& filterOperations)
|
| +RawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForFilter(const ComputedStyle& style, const FilterOperations& filterOperations)
|
| {
|
| if (filterOperations.operations().isEmpty())
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
|
|
| - RefPtrWillBeRawPtr<CSSFunctionValue> filterValue = nullptr;
|
| + RawPtr<CSSFunctionValue> filterValue = nullptr;
|
|
|
| for (const auto& operation : filterOperations.operations()) {
|
| FilterOperation* filterOperation = operation.get();
|
| @@ -1272,14 +1272,14 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForFilter(co
|
| return list.release();
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForFont(const ComputedStyle& style)
|
| +RawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForFont(const ComputedStyle& style)
|
| {
|
| // Add a slash between size and line-height.
|
| - RefPtrWillBeRawPtr<CSSValueList> sizeAndLineHeight = CSSValueList::createSlashSeparated();
|
| + RawPtr<CSSValueList> sizeAndLineHeight = CSSValueList::createSlashSeparated();
|
| sizeAndLineHeight->append(valueForFontSize(style));
|
| sizeAndLineHeight->append(valueForLineHeight(style));
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(valueForFontStyle(style));
|
| list->append(valueForFontVariant(style));
|
| list->append(valueForFontWeight(style));
|
| @@ -1290,18 +1290,18 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::valueForFont(cons
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForScrollSnapDestination(const LengthPoint& destination, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> valueForScrollSnapDestination(const LengthPoint& destination, const ComputedStyle& style)
|
| {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(zoomAdjustedPixelValueForLength(destination.x(), style));
|
| list->append(zoomAdjustedPixelValueForLength(destination.y(), style));
|
| return list.release();
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForScrollSnapPoints(const ScrollSnapPoints& points, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> valueForScrollSnapPoints(const ScrollSnapPoints& points, const ComputedStyle& style)
|
| {
|
| if (points.hasRepeat) {
|
| - RefPtrWillBeRawPtr<CSSFunctionValue> repeat = CSSFunctionValue::create(CSSValueRepeat);
|
| + RawPtr<CSSFunctionValue> repeat = CSSFunctionValue::create(CSSValueRepeat);
|
| repeat->append(zoomAdjustedPixelValueForLength(points.repeatOffset, style));
|
| return repeat.release();
|
| }
|
| @@ -1309,12 +1309,12 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForScrollSnapPoints(const ScrollSna
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
| }
|
|
|
| -static PassRefPtrWillBeRawPtr<CSSValue> valueForScrollSnapCoordinate(const Vector<LengthPoint>& coordinates, const ComputedStyle& style)
|
| +static RawPtr<CSSValue> valueForScrollSnapCoordinate(const Vector<LengthPoint>& coordinates, const ComputedStyle& style)
|
| {
|
| if (coordinates.isEmpty())
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
|
|
| for (auto& coordinate : coordinates) {
|
| auto pair = CSSValueList::createSpaceSeparated();
|
| @@ -1362,7 +1362,7 @@ static EBreak mapToColumnBreakValue(EBreak genericBreakValue)
|
| }
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(const AtomicString customPropertyName, const ComputedStyle& style)
|
| +RawPtr<CSSValue> ComputedStyleCSSValueMapping::get(const AtomicString customPropertyName, const ComputedStyle& style)
|
| {
|
| StyleVariableData* variables = style.variables();
|
| if (!variables)
|
| @@ -1383,7 +1383,7 @@ const HashMap<AtomicString, RefPtr<CSSVariableData>>* ComputedStyleCSSValueMappi
|
| return nullptr;
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| +RawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle)
|
| {
|
| const SVGComputedStyle& svgStyle = style.svgStyle();
|
| propertyID = CSSProperty::resolveDirectionAwareProperty(propertyID, style.direction(), style.getWritingMode());
|
| @@ -1395,7 +1395,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return allowVisitedStyle ? cssValuePool().createColorValue(style.visitedDependentColor(CSSPropertyBackgroundColor).rgb()) : currentColorOrValidColor(style, style.backgroundColor());
|
| case CSSPropertyBackgroundImage:
|
| case CSSPropertyWebkitMaskImage: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskImage ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next()) {
|
| if (currLayer->image())
|
| @@ -1407,7 +1407,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| }
|
| case CSSPropertyBackgroundSize:
|
| case CSSPropertyWebkitMaskSize: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskSize ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next())
|
| list->append(valueForFillSize(currLayer->size(), style));
|
| @@ -1415,27 +1415,27 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| }
|
| case CSSPropertyBackgroundRepeat:
|
| case CSSPropertyWebkitMaskRepeat: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskRepeat ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next())
|
| list->append(valueForFillRepeat(currLayer->repeatX(), currLayer->repeatY()));
|
| return list.release();
|
| }
|
| case CSSPropertyMaskSourceType: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| for (const FillLayer* currLayer = &style.maskLayers(); currLayer; currLayer = currLayer->next())
|
| list->append(valueForFillSourceType(currLayer->maskSourceType()));
|
| return list.release();
|
| }
|
| case CSSPropertyWebkitMaskComposite: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskComposite ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next())
|
| list->append(cssValuePool().createValue(currLayer->composite()));
|
| return list.release();
|
| }
|
| case CSSPropertyBackgroundAttachment: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| for (const FillLayer* currLayer = &style.backgroundLayers(); currLayer; currLayer = currLayer->next())
|
| list->append(cssValuePool().createValue(currLayer->attachment()));
|
| return list.release();
|
| @@ -1447,7 +1447,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertyWebkitMaskClip:
|
| case CSSPropertyWebkitMaskOrigin: {
|
| bool isClip = propertyID == CSSPropertyBackgroundClip || propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyWebkitMaskClip;
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = (propertyID == CSSPropertyWebkitMaskClip || propertyID == CSSPropertyWebkitMaskOrigin) ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next()) {
|
| EFillBox box = isClip ? currLayer->clip() : currLayer->origin();
|
| @@ -1457,7 +1457,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| }
|
| case CSSPropertyBackgroundPosition:
|
| case CSSPropertyWebkitMaskPosition: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskPosition ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next())
|
| list->append(createPositionListForLayer(propertyID, *currLayer, style));
|
| @@ -1465,7 +1465,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| }
|
| case CSSPropertyBackgroundPositionX:
|
| case CSSPropertyWebkitMaskPositionX: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskPositionX ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next())
|
| list->append(zoomAdjustedPixelValueForLength(currLayer->xPosition(), style));
|
| @@ -1473,7 +1473,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| }
|
| case CSSPropertyBackgroundPositionY:
|
| case CSSPropertyWebkitMaskPositionY: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskPositionY ? &style.maskLayers() : &style.backgroundLayers();
|
| for (; currLayer; currLayer = currLayer->next())
|
| list->append(zoomAdjustedPixelValueForLength(currLayer->yPosition(), style));
|
| @@ -1484,7 +1484,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return cssValuePool().createIdentifierValue(CSSValueCollapse);
|
| return cssValuePool().createIdentifierValue(CSSValueSeparate);
|
| case CSSPropertyBorderSpacing: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(zoomAdjustedPixelValue(style.horizontalBorderSpacing(), style));
|
| list->append(zoomAdjustedPixelValue(style.verticalBorderSpacing(), style));
|
| return list.release();
|
| @@ -1588,7 +1588,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return cssValuePool().createValue(
|
| style.getTabSize().getPixelSize(1.0), style.getTabSize().isSpaces() ? CSSPrimitiveValue::UnitType::Number : CSSPrimitiveValue::UnitType::Pixels);
|
| case CSSPropertyCursor: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = nullptr;
|
| + RawPtr<CSSValueList> list = nullptr;
|
| CursorList* cursors = style.cursors();
|
| if (cursors && cursors->size() > 0) {
|
| list = CSSValueList::createCommaSeparated();
|
| @@ -1597,7 +1597,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| list->append(image->computedCSSValue());
|
| }
|
| }
|
| - RefPtrWillBeRawPtr<CSSValue> value = cssValuePool().createValue(style.cursor());
|
| + RawPtr<CSSValue> value = cssValuePool().createValue(style.cursor());
|
| if (list) {
|
| list->append(value.release());
|
| return list.release();
|
| @@ -1667,16 +1667,16 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| const FontFeatureSettings* featureSettings = style.getFontDescription().featureSettings();
|
| if (!featureSettings || !featureSettings->size())
|
| return cssValuePool().createIdentifierValue(CSSValueNormal);
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| for (unsigned i = 0; i < featureSettings->size(); ++i) {
|
| const FontFeature& feature = featureSettings->at(i);
|
| - RefPtrWillBeRawPtr<CSSFontFeatureValue> featureValue = CSSFontFeatureValue::create(feature.tag(), feature.value());
|
| + RawPtr<CSSFontFeatureValue> featureValue = CSSFontFeatureValue::create(feature.tag(), feature.value());
|
| list->append(featureValue.release());
|
| }
|
| return list.release();
|
| }
|
| case CSSPropertyGridAutoFlow: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| switch (style.getGridAutoFlow()) {
|
| case AutoFlowRow:
|
| case AutoFlowRowDense:
|
| @@ -1942,7 +1942,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return nullptr;
|
| }
|
| if (style.quotes()->size()) {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| for (int i = 0; i < style.quotes()->size(); i++) {
|
| list->append(CSSStringValue::create(style.quotes()->getOpenQuote(i)));
|
| list->append(CSSStringValue::create(style.quotes()->getCloseQuote(i)));
|
| @@ -1998,14 +1998,14 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case TextEmphasisMarkDoubleCircle:
|
| case TextEmphasisMarkTriangle:
|
| case TextEmphasisMarkSesame: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(cssValuePool().createValue(style.getTextEmphasisFill()));
|
| list->append(cssValuePool().createValue(style.getTextEmphasisMark()));
|
| return list.release();
|
| }
|
| }
|
| case CSSPropertyTextIndent: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(zoomAdjustedPixelValueForLength(style.textIndent(), style));
|
| if (RuntimeEnabledFeatures::css3TextEnabled() && (style.getTextIndentLine() == TextIndentEachLine || style.getTextIndentType() == TextIndentHanging)) {
|
| if (style.getTextIndentLine() == TextIndentEachLine)
|
| @@ -2102,7 +2102,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| && historicalLigaturesState == FontDescription::NormalLigaturesState && contextualLigaturesState == FontDescription::NormalLigaturesState)
|
| return cssValuePool().createIdentifierValue(CSSValueNormal);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> valueList = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> valueList = CSSValueList::createSpaceSeparated();
|
| if (commonLigaturesState != FontDescription::NormalLigaturesState)
|
| valueList->append(cssValuePool().createIdentifierValue(commonLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoCommonLigatures : CSSValueCommonLigatures));
|
| if (discretionaryLigaturesState != FontDescription::NormalLigaturesState)
|
| @@ -2128,7 +2128,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertyAnimationDelay:
|
| return valueForAnimationDelay(style.animations());
|
| case CSSPropertyAnimationDirection: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const CSSAnimationData* animationData = style.animations();
|
| if (animationData) {
|
| for (size_t i = 0; i < animationData->directionList().size(); ++i)
|
| @@ -2141,7 +2141,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertyAnimationDuration:
|
| return valueForAnimationDuration(style.animations());
|
| case CSSPropertyAnimationFillMode: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const CSSAnimationData* animationData = style.animations();
|
| if (animationData) {
|
| for (size_t i = 0; i < animationData->fillModeList().size(); ++i)
|
| @@ -2152,7 +2152,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return list.release();
|
| }
|
| case CSSPropertyAnimationIterationCount: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const CSSAnimationData* animationData = style.animations();
|
| if (animationData) {
|
| for (size_t i = 0; i < animationData->iterationCountList().size(); ++i)
|
| @@ -2163,7 +2163,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return list.release();
|
| }
|
| case CSSPropertyAnimationName: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const CSSAnimationData* animationData = style.animations();
|
| if (animationData) {
|
| for (size_t i = 0; i < animationData->nameList().size(); ++i)
|
| @@ -2174,7 +2174,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return list.release();
|
| }
|
| case CSSPropertyAnimationPlayState: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| const CSSAnimationData* animationData = style.animations();
|
| if (animationData) {
|
| for (size_t i = 0; i < animationData->playStateList().size(); ++i)
|
| @@ -2189,9 +2189,9 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertyAnimation: {
|
| const CSSAnimationData* animationData = style.animations();
|
| if (animationData) {
|
| - RefPtrWillBeRawPtr<CSSValueList> animationsList = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> animationsList = CSSValueList::createCommaSeparated();
|
| for (size_t i = 0; i < animationData->nameList().size(); ++i) {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(CSSCustomIdentValue::create(animationData->nameList()[i]));
|
| list->append(cssValuePool().createValue(CSSTimingData::getRepeated(animationData->durationList(), i), CSSPrimitiveValue::UnitType::Seconds));
|
| list->append(createTimingFunctionValue(CSSTimingData::getRepeated(animationData->timingFunctionList(), i).get()));
|
| @@ -2205,7 +2205,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return animationsList.release();
|
| }
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| // animation-name default value.
|
| list->append(cssValuePool().createIdentifierValue(CSSValueNone));
|
| list->append(cssValuePool().createValue(CSSAnimationData::initialDuration(), CSSPrimitiveValue::UnitType::Seconds));
|
| @@ -2260,7 +2260,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return cssValuePool().createIdentifierValue(CSSValueNone);
|
| return zoomAdjustedPixelValue(style.perspective(), style);
|
| case CSSPropertyPerspectiveOrigin: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| if (layoutObject) {
|
| LayoutRect box;
|
| if (layoutObject->isBox())
|
| @@ -2293,16 +2293,16 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertyClip: {
|
| if (style.hasAutoClip())
|
| return cssValuePool().createIdentifierValue(CSSValueAuto);
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> top = style.clip().top().isAuto()
|
| + RawPtr<CSSPrimitiveValue> top = style.clip().top().isAuto()
|
| ? cssValuePool().createIdentifierValue(CSSValueAuto)
|
| : zoomAdjustedPixelValue(style.clip().top().value(), style);
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> right = style.clip().right().isAuto()
|
| + RawPtr<CSSPrimitiveValue> right = style.clip().right().isAuto()
|
| ? cssValuePool().createIdentifierValue(CSSValueAuto)
|
| : zoomAdjustedPixelValue(style.clip().right().value(), style);
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> bottom = style.clip().bottom().isAuto()
|
| + RawPtr<CSSPrimitiveValue> bottom = style.clip().bottom().isAuto()
|
| ? cssValuePool().createIdentifierValue(CSSValueAuto)
|
| : zoomAdjustedPixelValue(style.clip().bottom().value(), style);
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> left = style.clip().left().isAuto()
|
| + RawPtr<CSSPrimitiveValue> left = style.clip().left().isAuto()
|
| ? cssValuePool().createIdentifierValue(CSSValueAuto)
|
| : zoomAdjustedPixelValue(style.clip().left().value(), style);
|
| return CSSQuadValue::create(top.release(), right.release(), bottom.release(), left.release(), CSSQuadValue::SerializeAsRect);
|
| @@ -2312,7 +2312,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertyTransform:
|
| return computedTransform(layoutObject, style);
|
| case CSSPropertyTransformOrigin: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| if (layoutObject) {
|
| LayoutRect box;
|
| if (layoutObject->isBox())
|
| @@ -2343,9 +2343,9 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertyTransition: {
|
| const CSSTransitionData* transitionData = style.transitions();
|
| if (transitionData) {
|
| - RefPtrWillBeRawPtr<CSSValueList> transitionsList = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> transitionsList = CSSValueList::createCommaSeparated();
|
| for (size_t i = 0; i < transitionData->propertyList().size(); ++i) {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(createTransitionPropertyValue(transitionData->propertyList()[i]));
|
| list->append(cssValuePool().createValue(CSSTimingData::getRepeated(transitionData->durationList(), i), CSSPrimitiveValue::UnitType::Seconds));
|
| list->append(createTimingFunctionValue(CSSTimingData::getRepeated(transitionData->timingFunctionList(), i).get()));
|
| @@ -2355,7 +2355,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return transitionsList.release();
|
| }
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| // transition-property default value.
|
| list->append(cssValuePool().createIdentifierValue(CSSValueAll));
|
| list->append(cssValuePool().createValue(CSSTransitionData::initialDuration(), CSSPrimitiveValue::UnitType::Seconds));
|
| @@ -2406,7 +2406,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return cssValuePool().createValue(style.blendMode());
|
|
|
| case CSSPropertyBackgroundBlendMode: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
|
| for (const FillLayer* currLayer = &style.backgroundLayers(); currLayer; currLayer = currLayer->next())
|
| list->append(cssValuePool().createValue(currLayer->blendMode()));
|
| return list.release();
|
| @@ -2414,7 +2414,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertyBackground:
|
| return valuesForBackgroundShorthand(style, layoutObject, styledNode, allowVisitedStyle);
|
| case CSSPropertyBorder: {
|
| - RefPtrWillBeRawPtr<CSSValue> value = get(CSSPropertyBorderTop, style, layoutObject, styledNode, allowVisitedStyle);
|
| + RawPtr<CSSValue> value = get(CSSPropertyBorderTop, style, layoutObject, styledNode, allowVisitedStyle);
|
| const CSSPropertyID properties[] = {
|
| CSSPropertyBorderRight,
|
| CSSPropertyBorderBottom,
|
| @@ -2473,7 +2473,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| return zoomAdjustedPixelValueForLength(style.motionOffset(), style);
|
|
|
| case CSSPropertyMotionRotation: {
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| if (style.motionRotation().type == MotionRotationAuto)
|
| list->append(cssValuePool().createIdentifierValue(CSSValueAuto));
|
| list->append(cssValuePool().createValue(style.motionRotation().angle, CSSPrimitiveValue::UnitType::Degrees));
|
| @@ -2676,7 +2676,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| if (!style.translate())
|
| return cssValuePool().createValue(0, CSSPrimitiveValue::UnitType::Pixels);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| if (layoutObject && layoutObject->isBox()) {
|
| LayoutRect box = toLayoutBox(layoutObject)->borderBoxRect();
|
| list->append(zoomAdjustedPixelValue(floatValueForLength(style.translate()->x(), box.width().toFloat()), style));
|
| @@ -2701,7 +2701,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| if (!style.rotate())
|
| return cssValuePool().createValue(0, CSSPrimitiveValue::UnitType::Degrees);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(cssValuePool().createValue(style.rotate()->angle(), CSSPrimitiveValue::UnitType::Degrees));
|
| if (style.rotate()->x() != 0 || style.rotate()->y() != 0 || style.rotate()->z() != 1) {
|
| list->append(cssValuePool().createValue(style.rotate()->x(), CSSPrimitiveValue::UnitType::Number));
|
| @@ -2713,7 +2713,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertyScale: {
|
| if (!style.scale())
|
| return cssValuePool().createValue(1, CSSPrimitiveValue::UnitType::Number);
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(cssValuePool().createValue(style.scale()->x(), CSSPrimitiveValue::UnitType::Number));
|
| if (style.scale()->y() == 1 && style.scale()->z() == 1)
|
| return list.release();
|
| @@ -2728,7 +2728,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| if (style.contain() == ContainsStrict)
|
| return cssValuePool().createIdentifierValue(CSSValueStrict);
|
|
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| if (style.containsStyle())
|
| list->append(cssValuePool().createIdentifierValue(CSSValueStyle));
|
| if (style.contain() & ContainsLayout)
|
| @@ -2741,7 +2741,7 @@ PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID
|
| case CSSPropertySnapHeight: {
|
| if (!style.snapHeightUnit())
|
| return cssValuePool().createValue(0, CSSPrimitiveValue::UnitType::Pixels);
|
| - RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| + RawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
|
| list->append(cssValuePool().createValue(style.snapHeightUnit(), CSSPrimitiveValue::UnitType::Pixels));
|
| if (style.snapHeightPosition())
|
| list->append(cssValuePool().createValue(style.snapHeightPosition(), CSSPrimitiveValue::UnitType::Integer));
|
|
|