提交 81ae67c9 编写于 作者: O Ojan Vafai

Remove -webkit-mask-*.

This is for doing masking based off the alpha channel of
an image. This is a feature we want to support, but we
want a more general imperative API that the declarative thing
is built on top of.

In the meantime, the code is getting in our way and the
feature was already broken (likely from before making sky public).
We just paint the mask image on top instead of doing the actual
masking.

This patch just removes the parsing. Followup patches will
remove the implementation code.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/892903002
上级 2f39655a
......@@ -255,10 +255,6 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt
{{apply_border_image_modifier('CSSPropertyBorderImageRepeat', 'Repeat')}}
{{apply_border_image_modifier('CSSPropertyBorderImageSlice', 'Slice')}}
{{apply_border_image_modifier('CSSPropertyBorderImageWidth', 'Width')}}
{{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageOutset', 'Outset')}}
{{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageRepeat', 'Repeat')}}
{{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageSlice', 'Slice')}}
{{apply_border_image_modifier('CSSPropertyWebkitMaskBoxImageWidth', 'Width')}}
{% macro apply_value_border_image_source(property_id) %}
{{declare_value_function(property_id)}}
......@@ -268,7 +264,6 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt
}
{% endmacro %}
{{apply_value_border_image_source('CSSPropertyBorderImageSource')}}
{{apply_value_border_image_source('CSSPropertyWebkitMaskBoxImageSource')}}
{% macro apply_color(property_id, initial_color='StyleColor::currentColor') %}
{% set property = properties[property_id] %}
......@@ -424,17 +419,7 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt
{{apply_fill_layer('CSSPropertyBackgroundRepeatX', 'RepeatX')}}
{{apply_fill_layer('CSSPropertyBackgroundRepeatY', 'RepeatY')}}
{{apply_fill_layer('CSSPropertyBackgroundSize', 'Size')}}
{{apply_fill_layer('CSSPropertyMaskSourceType', 'MaskSourceType')}}
{{apply_fill_layer('CSSPropertyWebkitBackgroundComposite', 'Composite')}}
{{apply_fill_layer('CSSPropertyWebkitMaskClip', 'Clip')}}
{{apply_fill_layer('CSSPropertyWebkitMaskComposite', 'Composite')}}
{{apply_fill_layer('CSSPropertyWebkitMaskImage', 'Image')}}
{{apply_fill_layer('CSSPropertyWebkitMaskOrigin', 'Origin')}}
{{apply_fill_layer('CSSPropertyWebkitMaskPositionX', 'XPosition')}}
{{apply_fill_layer('CSSPropertyWebkitMaskPositionY', 'YPosition')}}
{{apply_fill_layer('CSSPropertyWebkitMaskRepeatX', 'RepeatX')}}
{{apply_fill_layer('CSSPropertyWebkitMaskRepeatY', 'RepeatY')}}
{{apply_fill_layer('CSSPropertyWebkitMaskSize', 'Size')}}
{% macro apply_value_number(property_id, id_for_minus_one) %}
{{declare_value_function(property_id)}}
......
......@@ -126,13 +126,6 @@ inline static PassRefPtr<AnimatableValue> createFromBorderImageLengthBox(const B
createFromBorderImageLength(borderImageLengthBox.bottom(), style));
}
inline static PassRefPtr<AnimatableValue> createFromLengthBoxAndBool(const LengthBox lengthBox, const bool flag, const RenderStyle& style)
{
return AnimatableLengthBoxAndBool::create(
createFromLengthBox(lengthBox, style),
flag);
}
inline static PassRefPtr<AnimatableValue> createFromLengthPoint(const LengthPoint& lengthPoint, const RenderStyle& style)
{
return AnimatableLengthPoint::create(
......@@ -183,19 +176,19 @@ inline static PassRefPtr<AnimatableValue> createFromFillLayers(const FillLayer&
{
Vector<RefPtr<AnimatableValue> > values;
for (const FillLayer* fillLayer = &fillLayers; fillLayer; fillLayer = fillLayer->next()) {
if (property == CSSPropertyBackgroundImage || property == CSSPropertyWebkitMaskImage) {
if (property == CSSPropertyBackgroundImage) {
if (!fillLayer->isImageSet())
break;
values.append(createFromStyleImage(fillLayer->image()));
} else if (property == CSSPropertyBackgroundPositionX || property == CSSPropertyWebkitMaskPositionX) {
} else if (property == CSSPropertyBackgroundPositionX) {
if (!fillLayer->isXPositionSet())
break;
values.append(createFromBackgroundPosition(fillLayer->xPosition(), fillLayer->isBackgroundXOriginSet(), fillLayer->backgroundXOrigin(), style));
} else if (property == CSSPropertyBackgroundPositionY || property == CSSPropertyWebkitMaskPositionY) {
} else if (property == CSSPropertyBackgroundPositionY) {
if (!fillLayer->isYPositionSet())
break;
values.append(createFromBackgroundPosition(fillLayer->yPosition(), fillLayer->isBackgroundYOriginSet(), fillLayer->backgroundYOrigin(), style));
} else if (property == CSSPropertyBackgroundSize || property == CSSPropertyWebkitMaskSize) {
} else if (property == CSSPropertyBackgroundSize) {
if (!fillLayer->isSizeSet())
break;
values.append(createFromFillSize(fillLayer->size(), style));
......@@ -395,22 +388,6 @@ PassRefPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPropertyID prop
if (ClipPathOperation* operation = style.clipPath())
return AnimatableClipPathOperation::create(operation);
return AnimatableUnknown::create(CSSValueNone);
case CSSPropertyWebkitMaskBoxImageOutset:
return createFromBorderImageLengthBox(style.maskBoxImageOutset(), style);
case CSSPropertyWebkitMaskBoxImageSlice:
return createFromLengthBoxAndBool(style.maskBoxImageSlices(), style.maskBoxImageSlicesFill(), style);
case CSSPropertyWebkitMaskBoxImageSource:
return createFromStyleImage(style.maskBoxImageSource());
case CSSPropertyWebkitMaskBoxImageWidth:
return createFromBorderImageLengthBox(style.maskBoxImageWidth(), style);
case CSSPropertyWebkitMaskImage:
return createFromFillLayers<CSSPropertyWebkitMaskImage>(style.maskLayers(), style);
case CSSPropertyWebkitMaskPositionX:
return createFromFillLayers<CSSPropertyWebkitMaskPositionX>(style.maskLayers(), style);
case CSSPropertyWebkitMaskPositionY:
return createFromFillLayers<CSSPropertyWebkitMaskPositionY>(style.maskLayers(), style);
case CSSPropertyWebkitMaskSize:
return createFromFillLayers<CSSPropertyWebkitMaskSize>(style.maskLayers(), style);
case CSSPropertyPerspective:
return createFromDouble(style.perspective());
case CSSPropertyPerspectiveOrigin:
......
......@@ -22,18 +22,15 @@ bool fillLayersEqual(const FillLayer& aLayers, const FillLayer& bLayers)
while (aLayer && bLayer) {
switch (property) {
case CSSPropertyBackgroundPositionX:
case CSSPropertyWebkitMaskPositionX:
if (aLayer->xPosition() != bLayer->xPosition())
return false;
break;
case CSSPropertyBackgroundPositionY:
case CSSPropertyWebkitMaskPositionY:
if (aLayer->yPosition() != bLayer->yPosition())
return false;
break;
case CSSPropertyBackgroundSize:
case CSSPropertyWebkitBackgroundSize:
case CSSPropertyWebkitMaskSize:
if (!(aLayer->sizeLength() == bLayer->sizeLength()))
return false;
break;
......@@ -196,22 +193,6 @@ bool CSSPropertyEquality::propertiesEqual(CSSPropertyID prop, const RenderStyle&
return dataEquivalent(a.boxShadow(), b.boxShadow());
case CSSPropertyWebkitClipPath:
return dataEquivalent(a.clipPath(), b.clipPath());
case CSSPropertyWebkitMaskBoxImageOutset:
return a.maskBoxImageOutset() == b.maskBoxImageOutset();
case CSSPropertyWebkitMaskBoxImageSlice:
return a.maskBoxImageSlices() == b.maskBoxImageSlices();
case CSSPropertyWebkitMaskBoxImageSource:
return dataEquivalent(a.maskBoxImageSource(), b.maskBoxImageSource());
case CSSPropertyWebkitMaskBoxImageWidth:
return a.maskBoxImageWidth() == b.maskBoxImageWidth();
case CSSPropertyWebkitMaskImage:
return dataEquivalent(a.maskImage(), b.maskImage());
case CSSPropertyWebkitMaskPositionX:
return fillLayersEqual<CSSPropertyWebkitMaskPositionX>(a.maskLayers(), b.maskLayers());
case CSSPropertyWebkitMaskPositionY:
return fillLayersEqual<CSSPropertyWebkitMaskPositionY>(a.maskLayers(), b.maskLayers());
case CSSPropertyWebkitMaskSize:
return fillLayersEqual<CSSPropertyWebkitMaskSize>(a.maskLayers(), b.maskLayers());
case CSSPropertyPerspective:
return a.perspective() == b.perspective();
case CSSPropertyPerspectiveOrigin:
......
......@@ -220,19 +220,6 @@ static const CSSPropertyID staticComputableProperties[] = {
CSSPropertyWebkitLineBoxContain,
CSSPropertyWebkitLineBreak,
CSSPropertyWebkitLocale,
CSSPropertyWebkitMaskBoxImage,
CSSPropertyWebkitMaskBoxImageOutset,
CSSPropertyWebkitMaskBoxImageRepeat,
CSSPropertyWebkitMaskBoxImageSlice,
CSSPropertyWebkitMaskBoxImageSource,
CSSPropertyWebkitMaskBoxImageWidth,
CSSPropertyWebkitMaskClip,
CSSPropertyWebkitMaskComposite,
CSSPropertyWebkitMaskImage,
CSSPropertyWebkitMaskOrigin,
CSSPropertyWebkitMaskPosition,
CSSPropertyWebkitMaskRepeat,
CSSPropertyWebkitMaskSize,
CSSPropertyOrder,
CSSPropertyPerspective,
CSSPropertyWebkitPerspective,
......@@ -257,7 +244,6 @@ static const CSSPropertyID staticComputableProperties[] = {
CSSPropertyWebkitUserDrag,
CSSPropertyWebkitUserModify,
CSSPropertyWebkitUserSelect,
CSSPropertyMaskSourceType,
};
static const Vector<CSSPropertyID>& computableProperties()
......@@ -446,12 +432,12 @@ static PassRefPtr<CSSValueList> createPositionListForLayer(CSSPropertyID propert
{
RefPtr<CSSValueList> positionList = CSSValueList::createSpaceSeparated();
if (layer.isBackgroundXOriginSet()) {
ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPosition);
positionList->append(cssValuePool().createValue(layer.backgroundXOrigin()));
}
positionList->append(pixelValueForLength(layer.xPosition(), style));
if (layer.isBackgroundYOriginSet()) {
ASSERT(propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
ASSERT(propertyID == CSSPropertyBackgroundPosition);
positionList->append(cssValuePool().createValue(layer.backgroundYOrigin()));
}
positionList->append(pixelValueForLength(layer.yPosition(), style));
......@@ -1072,20 +1058,6 @@ static PassRefPtr<CSSValue> valueForFillRepeat(EFillRepeat xRepeat, EFillRepeat
return list.release();
}
static PassRefPtr<CSSValue> valueForFillSourceType(EMaskSourceType type)
{
switch (type) {
case MaskAlpha:
return cssValuePool().createValue(CSSValueAlpha);
case MaskLuminance:
return cssValuePool().createValue(CSSValueLuminance);
}
ASSERT_NOT_REACHED();
return nullptr;
}
static PassRefPtr<CSSValue> valueForFillSize(const FillSize& fillSize, const RenderStyle& style)
{
if (fillSize.type == Contain)
......@@ -1288,11 +1260,9 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
case CSSPropertyBackgroundColor:
return m_allowVisitedStyle ? cssValuePool().createColorValue(style->colorIncludingFallback(CSSPropertyBackgroundColor).rgb()) : currentColorOrValidColor(*style, style->backgroundColor());
case CSSPropertyBackgroundImage:
case CSSPropertyWebkitMaskImage: {
case CSSPropertyBackgroundImage: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskImage ? &style->maskLayers() : &style->backgroundLayers();
for (; currLayer; currLayer = currLayer->next()) {
for (const FillLayer* currLayer = &style->backgroundLayers(); currLayer; currLayer = currLayer->next()) {
if (currLayer->image())
list->append(currLayer->image()->cssValue());
else
......@@ -1301,33 +1271,21 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
return list.release();
}
case CSSPropertyBackgroundSize:
case CSSPropertyWebkitBackgroundSize:
case CSSPropertyWebkitMaskSize: {
case CSSPropertyWebkitBackgroundSize: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskSize ? &style->maskLayers() : &style->backgroundLayers();
for (; currLayer; currLayer = currLayer->next())
for (const FillLayer* currLayer = &style->backgroundLayers(); currLayer; currLayer = currLayer->next())
list->append(valueForFillSize(currLayer->size(), *style));
return list.release();
}
case CSSPropertyBackgroundRepeat:
case CSSPropertyWebkitMaskRepeat: {
case CSSPropertyBackgroundRepeat: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskRepeat ? &style->maskLayers() : &style->backgroundLayers();
for (; currLayer; currLayer = currLayer->next())
for (const FillLayer* currLayer = &style->backgroundLayers(); currLayer; currLayer = currLayer->next())
list->append(valueForFillRepeat(currLayer->repeatX(), currLayer->repeatY()));
return list.release();
}
case CSSPropertyMaskSourceType: {
case CSSPropertyWebkitBackgroundComposite: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
for (const FillLayer* currLayer = &style->maskLayers(); currLayer; currLayer = currLayer->next())
list->append(valueForFillSourceType(currLayer->maskSourceType()));
return list.release();
}
case CSSPropertyWebkitBackgroundComposite:
case CSSPropertyWebkitMaskComposite: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskComposite ? &style->maskLayers() : &style->backgroundLayers();
for (; currLayer; currLayer = currLayer->next())
for (const FillLayer* currLayer = &style->backgroundLayers(); currLayer; currLayer = currLayer->next())
list->append(cssValuePool().createValue(currLayer->composite()));
return list.release();
}
......@@ -1340,39 +1298,30 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
case CSSPropertyBackgroundClip:
case CSSPropertyBackgroundOrigin:
case CSSPropertyWebkitBackgroundClip:
case CSSPropertyWebkitBackgroundOrigin:
case CSSPropertyWebkitMaskClip:
case CSSPropertyWebkitMaskOrigin: {
bool isClip = propertyID == CSSPropertyBackgroundClip || propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyWebkitMaskClip;
case CSSPropertyWebkitBackgroundOrigin: {
bool isClip = propertyID == CSSPropertyBackgroundClip || propertyID == CSSPropertyWebkitBackgroundClip;
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const FillLayer* currLayer = (propertyID == CSSPropertyWebkitMaskClip || propertyID == CSSPropertyWebkitMaskOrigin) ? &style->maskLayers() : &style->backgroundLayers();
for (; currLayer; currLayer = currLayer->next()) {
for (const FillLayer* currLayer = &style->backgroundLayers(); currLayer; currLayer = currLayer->next()) {
EFillBox box = isClip ? currLayer->clip() : currLayer->origin();
list->append(cssValuePool().createValue(box));
}
return list.release();
}
case CSSPropertyBackgroundPosition:
case CSSPropertyWebkitMaskPosition: {
case CSSPropertyBackgroundPosition: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskPosition ? &style->maskLayers() : &style->backgroundLayers();
for (; currLayer; currLayer = currLayer->next())
for (const FillLayer* currLayer = &style->backgroundLayers(); currLayer; currLayer = currLayer->next())
list->append(createPositionListForLayer(propertyID, *currLayer, *style));
return list.release();
}
case CSSPropertyBackgroundPositionX:
case CSSPropertyWebkitMaskPositionX: {
case CSSPropertyBackgroundPositionX: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskPositionX ? &style->maskLayers() : &style->backgroundLayers();
for (; currLayer; currLayer = currLayer->next())
for (const FillLayer* currLayer = &style->backgroundLayers(); currLayer; currLayer = currLayer->next())
list->append(pixelValueForLength(currLayer->xPosition(), *style));
return list.release();
}
case CSSPropertyBackgroundPositionY:
case CSSPropertyWebkitMaskPositionY: {
case CSSPropertyBackgroundPositionY: {
RefPtr<CSSValueList> list = CSSValueList::createCommaSeparated();
const FillLayer* currLayer = propertyID == CSSPropertyWebkitMaskPositionY ? &style->maskLayers() : &style->backgroundLayers();
for (; currLayer; currLayer = currLayer->next())
for (const FillLayer* currLayer = &style->backgroundLayers(); currLayer; currLayer = currLayer->next())
list->append(pixelValueForLength(currLayer->yPosition(), *style));
return list.release();
}
......@@ -1961,20 +1910,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
return valueForNinePieceImageSlice(style->borderImage());
case CSSPropertyBorderImageWidth:
return valueForNinePieceImageQuad(style->borderImage().borderSlices(), *style);
case CSSPropertyWebkitMaskBoxImage:
return valueForNinePieceImage(style->maskBoxImage(), *style);
case CSSPropertyWebkitMaskBoxImageOutset:
return valueForNinePieceImageQuad(style->maskBoxImage().outset(), *style);
case CSSPropertyWebkitMaskBoxImageRepeat:
return valueForNinePieceImageRepeat(style->maskBoxImage());
case CSSPropertyWebkitMaskBoxImageSlice:
return valueForNinePieceImageSlice(style->maskBoxImage());
case CSSPropertyWebkitMaskBoxImageWidth:
return valueForNinePieceImageQuad(style->maskBoxImage().borderSlices(), *style);
case CSSPropertyWebkitMaskBoxImageSource:
if (style->maskBoxImageSource())
return style->maskBoxImageSource()->cssValue();
return cssValuePool().createIdentifierValue(CSSValueNone);
case CSSPropertyWebkitFontSizeDelta:
// Not a real style property -- used by the editing engine -- so has no computed value.
break;
......@@ -2195,9 +2130,6 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
/* Unimplemented -webkit- properties */
case CSSPropertyWebkitBorderRadius:
case CSSPropertyWebkitMask:
case CSSPropertyWebkitMaskRepeatX:
case CSSPropertyWebkitMaskRepeatY:
case CSSPropertyWebkitPerspectiveOriginX:
case CSSPropertyWebkitPerspectiveOriginY:
case CSSPropertyWebkitTextStroke:
......
......@@ -157,7 +157,6 @@ margin-bottom animatable, initial=initialMargin, converter=convertLengthOrAuto
margin-left animatable, initial=initialMargin, converter=convertLengthOrAuto
margin-right animatable, initial=initialMargin, converter=convertLengthOrAuto
margin-top animatable, initial=initialMargin, converter=convertLengthOrAuto
mask-source-type runtime_flag=CSSMaskSourceType, custom_all
max-height animatable, initial=initialMaxSize, converter=convertLengthMaxSizing
max-width animatable, initial=initialMaxSize, converter=convertLengthMaxSizing
min-height animatable, initial=initialMinSize, converter=convertLengthSizing
......@@ -236,20 +235,6 @@ filter animatable, custom_value
-webkit-hyphenate-character inherited, name_for_methods=HyphenationString, converter=convertString<CSSValueAuto>
-webkit-line-box-contain inherited, converter=convertLineBoxContain
-webkit-line-break inherited, type_name=LineBreak
-webkit-mask-box-image-outset animatable, custom_all
-webkit-mask-box-image-repeat custom_all
-webkit-mask-box-image-slice animatable, custom_all
-webkit-mask-box-image-source animatable, custom_value
-webkit-mask-box-image-width animatable, custom_all
-webkit-mask-clip custom_all
-webkit-mask-composite custom_all
-webkit-mask-image animatable, custom_all
-webkit-mask-origin custom_all
-webkit-mask-position-x animatable, custom_all
-webkit-mask-position-y animatable, custom_all
-webkit-mask-repeat-x custom_all
-webkit-mask-repeat-y custom_all
-webkit-mask-size animatable, custom_all
-webkit-perspective custom_all
-webkit-perspective-origin custom_all
-webkit-perspective-origin-x converter=convertLength
......@@ -354,10 +339,6 @@ animation longhands=animation-name;animation-duration;animation-timing-function;
// "-webkit-border-radius: 1px 2px" behaves as "border-radius: 1px / 2px"
-webkit-border-radius longhands=border-top-left-radius;border-top-right-radius;border-bottom-right-radius;border-bottom-left-radius
-webkit-border-start longhands=-webkit-border-start-width;-webkit-border-start-style;-webkit-border-start-color
-webkit-mask longhands=-webkit-mask-image;-webkit-mask-position-x;-webkit-mask-position-y;-webkit-mask-size;-webkit-mask-repeat-x;-webkit-mask-repeat-y;-webkit-mask-origin;-webkit-mask-clip
-webkit-mask-box-image longhands=-webkit-mask-box-image-source;-webkit-mask-box-image-slice;-webkit-mask-box-image-width;-webkit-mask-box-image-outset;-webkit-mask-box-image-repeat
-webkit-mask-position longhands=-webkit-mask-position-x;-webkit-mask-position-y
-webkit-mask-repeat longhands=-webkit-mask-repeat-x;-webkit-mask-repeat-y
-webkit-text-emphasis longhands=-webkit-text-emphasis-style;-webkit-text-emphasis-color
-webkit-text-stroke longhands=-webkit-text-stroke-width;-webkit-text-stroke-color
-webkit-transform-origin longhands=-webkit-transform-origin-x;-webkit-transform-origin-y;-webkit-transform-origin-z
......
......@@ -180,17 +180,6 @@ String StylePropertySerializer::asText() const
case CSSPropertyFlexShrink:
shorthandPropertyID = CSSPropertyFlex;
break;
case CSSPropertyWebkitMaskPositionX:
case CSSPropertyWebkitMaskPositionY:
case CSSPropertyWebkitMaskRepeatX:
case CSSPropertyWebkitMaskRepeatY:
case CSSPropertyWebkitMaskImage:
case CSSPropertyWebkitMaskRepeat:
case CSSPropertyWebkitMaskPosition:
case CSSPropertyWebkitMaskClip:
case CSSPropertyWebkitMaskOrigin:
shorthandPropertyID = CSSPropertyWebkitMask;
break;
case CSSPropertyWebkitTransformOriginX:
case CSSPropertyWebkitTransformOriginY:
case CSSPropertyWebkitTransformOriginZ:
......@@ -278,12 +267,6 @@ String StylePropertySerializer::getPropertyValue(CSSPropertyID propertyID) const
return getLayeredShorthandValue(transitionShorthand());
case CSSPropertyListStyle:
return getShorthandValue(listStyleShorthand());
case CSSPropertyWebkitMaskPosition:
return getLayeredShorthandValue(webkitMaskPositionShorthand());
case CSSPropertyWebkitMaskRepeat:
return getLayeredShorthandValue(webkitMaskRepeatShorthand());
case CSSPropertyWebkitMask:
return getLayeredShorthandValue(webkitMaskShorthand());
case CSSPropertyWebkitTextEmphasis:
return getShorthandValue(webkitTextEmphasisShorthand());
case CSSPropertyWebkitTextStroke:
......@@ -488,12 +471,10 @@ String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
// We need to report background-repeat as it was written in the CSS. If the property is implicit,
// then it was written with only one value. Here we figure out which value that was so we can
// report back correctly.
if ((shorthand.properties()[j] == CSSPropertyBackgroundRepeatX && m_propertySet.isPropertyImplicit(shorthand.properties()[j]))
|| (shorthand.properties()[j] == CSSPropertyWebkitMaskRepeatX && m_propertySet.isPropertyImplicit(shorthand.properties()[j]))) {
if (shorthand.properties()[j] == CSSPropertyBackgroundRepeatX && m_propertySet.isPropertyImplicit(shorthand.properties()[j])) {
// BUG 49055: make sure the value was not reset in the layer check just above.
if ((j < size - 1 && shorthand.properties()[j + 1] == CSSPropertyBackgroundRepeatY && value)
|| (j < size - 1 && shorthand.properties()[j + 1] == CSSPropertyWebkitMaskRepeatY && value)) {
if (j < size - 1 && shorthand.properties()[j + 1] == CSSPropertyBackgroundRepeatY && value) {
RefPtr<CSSValue> yValue = nullptr;
RefPtr<CSSValue> nextValue = values[j + 1];
if (nextValue->isValueList())
......@@ -533,10 +514,10 @@ String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
if (!layerResult.isEmpty())
layerResult.append(' ');
if (foundPositionYCSSProperty
&& (shorthand.properties()[j] == CSSPropertyBackgroundSize || shorthand.properties()[j] == CSSPropertyWebkitMaskSize))
&& shorthand.properties()[j] == CSSPropertyBackgroundSize)
layerResult.appendLiteral("/ ");
if (!foundPositionYCSSProperty
&& (shorthand.properties()[j] == CSSPropertyBackgroundSize || shorthand.properties()[j] == CSSPropertyWebkitMaskSize))
&& shorthand.properties()[j] == CSSPropertyBackgroundSize)
continue;
if (useRepeatXShorthand) {
......@@ -552,8 +533,7 @@ String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
layerResult.append(valueText);
}
if (shorthand.properties()[j] == CSSPropertyBackgroundPositionY
|| shorthand.properties()[j] == CSSPropertyWebkitMaskPositionY) {
if (shorthand.properties()[j] == CSSPropertyBackgroundPositionY) {
foundPositionYCSSProperty = true;
// background-position is a special case: if only the first offset is specified,
......
......@@ -627,7 +627,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
case CSSPropertyWebkitBackgroundComposite:
case CSSPropertyBackgroundImage:
case CSSPropertyBackgroundOrigin:
case CSSPropertyMaskSourceType:
case CSSPropertyWebkitBackgroundOrigin:
case CSSPropertyBackgroundPosition:
case CSSPropertyBackgroundPositionX:
......@@ -635,17 +634,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
case CSSPropertyBackgroundSize:
case CSSPropertyWebkitBackgroundSize:
case CSSPropertyBackgroundRepeat:
case CSSPropertyWebkitMaskClip:
case CSSPropertyWebkitMaskComposite:
case CSSPropertyWebkitMaskImage:
case CSSPropertyWebkitMaskOrigin:
case CSSPropertyWebkitMaskPosition:
case CSSPropertyWebkitMaskPositionX:
case CSSPropertyWebkitMaskPositionY:
case CSSPropertyWebkitMaskSize:
case CSSPropertyWebkitMaskRepeat:
case CSSPropertyWebkitMaskRepeatX:
case CSSPropertyWebkitMaskRepeatY:
{
RefPtr<CSSValue> val1 = nullptr;
RefPtr<CSSValue> val2 = nullptr;
......@@ -653,9 +641,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
bool result = false;
if (parseFillProperty(propId, propId1, propId2, val1, val2)) {
if (propId == CSSPropertyBackgroundPosition ||
propId == CSSPropertyBackgroundRepeat ||
propId == CSSPropertyWebkitMaskPosition ||
propId == CSSPropertyWebkitMaskRepeat) {
propId == CSSPropertyBackgroundRepeat) {
ShorthandScope scope(this, propId);
addProperty(propId1, val1.release());
if (val2)
......@@ -676,7 +662,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
break;
case CSSPropertyListStyleImage: // <uri> | none | inherit
case CSSPropertyBorderImageSource:
case CSSPropertyWebkitMaskBoxImageSource:
if (id == CSSValueNone) {
parsedValue = cssValuePool().createIdentifierValue(CSSValueNone);
m_valueList->next();
......@@ -843,7 +828,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
/* CSS3 properties */
case CSSPropertyBorderImage:
case CSSPropertyWebkitMaskBoxImage:
return parseBorderImageShorthand(propId);
case CSSPropertyWebkitBorderImage: {
if (RefPtr<CSSValue> result = parseBorderImage(propId)) {
......@@ -853,8 +837,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
return false;
}
case CSSPropertyBorderImageOutset:
case CSSPropertyWebkitMaskBoxImageOutset: {
case CSSPropertyBorderImageOutset: {
RefPtr<CSSPrimitiveValue> result = nullptr;
if (parseBorderImageOutset(result)) {
addProperty(propId, result);
......@@ -862,8 +845,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
}
break;
}
case CSSPropertyBorderImageRepeat:
case CSSPropertyWebkitMaskBoxImageRepeat: {
case CSSPropertyBorderImageRepeat: {
RefPtr<CSSValue> result = nullptr;
if (parseBorderImageRepeat(result)) {
addProperty(propId, result);
......@@ -871,8 +853,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
}
break;
}
case CSSPropertyBorderImageSlice:
case CSSPropertyWebkitMaskBoxImageSlice: {
case CSSPropertyBorderImageSlice: {
RefPtr<CSSBorderImageSliceValue> result = nullptr;
if (parseBorderImageSlice(propId, result)) {
addProperty(propId, result);
......@@ -880,8 +861,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
}
break;
}
case CSSPropertyBorderImageWidth:
case CSSPropertyWebkitMaskBoxImageWidth: {
case CSSPropertyBorderImageWidth: {
RefPtr<CSSPrimitiveValue> result = nullptr;
if (parseBorderImageWidth(result)) {
addProperty(propId, result);
......@@ -1121,11 +1101,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID propId)
CSSPropertyBackgroundClip, CSSPropertyBackgroundColor, CSSPropertyBackgroundSize };
return parseFillShorthand(propId, properties, WTF_ARRAY_LENGTH(properties));
}
case CSSPropertyWebkitMask: {
const CSSPropertyID properties[] = { CSSPropertyWebkitMaskImage, CSSPropertyWebkitMaskRepeat,
CSSPropertyWebkitMaskPosition, CSSPropertyWebkitMaskOrigin, CSSPropertyWebkitMaskClip, CSSPropertyWebkitMaskSize };
return parseFillShorthand(propId, properties, WTF_ARRAY_LENGTH(properties));
}
case CSSPropertyBorder:
// [ 'border-width' || 'border-style' || <color> ] | inherit
{
......@@ -1328,11 +1303,11 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
if (!parsedProperty[i] && properties[i] != CSSPropertyBackgroundColor) {
addFillValue(values[i], cssValuePool().createImplicitInitialValue());
if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition)
if (properties[i] == CSSPropertyBackgroundPosition)
addFillValue(positionYValue, cssValuePool().createImplicitInitialValue());
if (properties[i] == CSSPropertyBackgroundRepeat || properties[i] == CSSPropertyWebkitMaskRepeat)
if (properties[i] == CSSPropertyBackgroundRepeat)
addFillValue(repeatYValue, cssValuePool().createImplicitInitialValue());
if ((properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin) && !parsedProperty[i]) {
if (properties[i] == CSSPropertyBackgroundOrigin && !parsedProperty[i]) {
// If background-origin wasn't present, then reset background-clip also.
addFillValue(clipValue, cssValuePool().createImplicitInitialValue());
}
......@@ -1353,9 +1328,9 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
bool found = false;
for (i = 0; !found && i < numProperties; ++i) {
if (sizeCSSPropertyExpected && (properties[i] != CSSPropertyBackgroundSize && properties[i] != CSSPropertyWebkitMaskSize))
if (sizeCSSPropertyExpected && properties[i] != CSSPropertyBackgroundSize)
continue;
if (!sizeCSSPropertyExpected && (properties[i] == CSSPropertyBackgroundSize || properties[i] == CSSPropertyWebkitMaskSize))
if (!sizeCSSPropertyExpected && properties[i] == CSSPropertyBackgroundSize)
continue;
if (!parsedProperty[i]) {
......@@ -1368,23 +1343,23 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
if (parseFillProperty(properties[i], propId1, propId2, val1, val2)) {
parsedProperty[i] = found = true;
addFillValue(values[i], val1.release());
if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition)
if (properties[i] == CSSPropertyBackgroundPosition)
addFillValue(positionYValue, val2.release());
if (properties[i] == CSSPropertyBackgroundRepeat || properties[i] == CSSPropertyWebkitMaskRepeat)
if (properties[i] == CSSPropertyBackgroundRepeat)
addFillValue(repeatYValue, val2.release());
if (properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin) {
if (properties[i] == CSSPropertyBackgroundOrigin) {
// Reparse the value as a clip, and see if we succeed.
if (parseBackgroundClip(parserValue, val1))
addFillValue(clipValue, val1.release()); // The property parsed successfully.
else
addFillValue(clipValue, cssValuePool().createImplicitInitialValue()); // Some value was used for origin that is not supported by clip. Just reset clip instead.
}
if (properties[i] == CSSPropertyBackgroundClip || properties[i] == CSSPropertyWebkitMaskClip) {
if (properties[i] == CSSPropertyBackgroundClip) {
// Update clipValue
addFillValue(clipValue, val1.release());
foundClip = true;
}
if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition)
if (properties[i] == CSSPropertyBackgroundPosition)
foundPositionCSSProperty = true;
}
}
......@@ -1403,11 +1378,11 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
// Fill in any remaining properties with the initial value.
if (!parsedProperty[i]) {
addFillValue(values[i], cssValuePool().createImplicitInitialValue());
if (properties[i] == CSSPropertyBackgroundPosition || properties[i] == CSSPropertyWebkitMaskPosition)
if (properties[i] == CSSPropertyBackgroundPosition)
addFillValue(positionYValue, cssValuePool().createImplicitInitialValue());
if (properties[i] == CSSPropertyBackgroundRepeat || properties[i] == CSSPropertyWebkitMaskRepeat)
if (properties[i] == CSSPropertyBackgroundRepeat)
addFillValue(repeatYValue, cssValuePool().createImplicitInitialValue());
if (properties[i] == CSSPropertyBackgroundOrigin || properties[i] == CSSPropertyWebkitMaskOrigin) {
if (properties[i] == CSSPropertyBackgroundOrigin) {
// If background-origin wasn't present, then reset background-clip also.
addFillValue(clipValue, cssValuePool().createImplicitInitialValue());
}
......@@ -1416,19 +1391,11 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
addProperty(CSSPropertyBackgroundPositionX, values[i].release());
// it's OK to call positionYValue.release() since we only see CSSPropertyBackgroundPosition once
addProperty(CSSPropertyBackgroundPositionY, positionYValue.release());
} else if (properties[i] == CSSPropertyWebkitMaskPosition) {
addProperty(CSSPropertyWebkitMaskPositionX, values[i].release());
// it's OK to call positionYValue.release() since we only see CSSPropertyWebkitMaskPosition once
addProperty(CSSPropertyWebkitMaskPositionY, positionYValue.release());
} else if (properties[i] == CSSPropertyBackgroundRepeat) {
addProperty(CSSPropertyBackgroundRepeatX, values[i].release());
// it's OK to call repeatYValue.release() since we only see CSSPropertyBackgroundPosition once
addProperty(CSSPropertyBackgroundRepeatY, repeatYValue.release());
} else if (properties[i] == CSSPropertyWebkitMaskRepeat) {
addProperty(CSSPropertyWebkitMaskRepeatX, values[i].release());
// it's OK to call repeatYValue.release() since we only see CSSPropertyBackgroundPosition once
addProperty(CSSPropertyWebkitMaskRepeatY, repeatYValue.release());
} else if ((properties[i] == CSSPropertyBackgroundClip || properties[i] == CSSPropertyWebkitMaskClip) && !foundClip)
} else if (properties[i] == CSSPropertyBackgroundClip && !foundClip)
// Value is already set while updating origin
continue;
else
......@@ -1437,8 +1404,6 @@ bool CSSPropertyParser::parseFillShorthand(CSSPropertyID propId, const CSSProper
// Add in clip values when we hit the corresponding origin property.
if (properties[i] == CSSPropertyBackgroundOrigin && !foundClip)
addProperty(CSSPropertyBackgroundClip, clipValue.release());
else if (properties[i] == CSSPropertyWebkitMaskOrigin && !foundClip)
addProperty(CSSPropertyWebkitMaskClip, clipValue.release());
}
m_implicitShorthand = false;
......@@ -2293,15 +2258,9 @@ bool CSSPropertyParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& p
if (propId == CSSPropertyBackgroundPosition) {
propId1 = CSSPropertyBackgroundPositionX;
propId2 = CSSPropertyBackgroundPositionY;
} else if (propId == CSSPropertyWebkitMaskPosition) {
propId1 = CSSPropertyWebkitMaskPositionX;
propId2 = CSSPropertyWebkitMaskPositionY;
} else if (propId == CSSPropertyBackgroundRepeat) {
propId1 = CSSPropertyBackgroundRepeatX;
propId2 = CSSPropertyBackgroundRepeatY;
} else if (propId == CSSPropertyWebkitMaskRepeat) {
propId1 = CSSPropertyWebkitMaskRepeatX;
propId2 = CSSPropertyWebkitMaskRepeatY;
}
for (CSSParserValue* val = m_valueList->current(); val; val = m_valueList->current()) {
......@@ -2328,19 +2287,16 @@ bool CSSPropertyParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& p
}
break;
case CSSPropertyBackgroundImage:
case CSSPropertyWebkitMaskImage:
if (parseFillImage(m_valueList, currValue))
m_valueList->next();
break;
case CSSPropertyWebkitBackgroundClip:
case CSSPropertyWebkitBackgroundOrigin:
case CSSPropertyWebkitMaskClip:
case CSSPropertyWebkitMaskOrigin:
// The first three values here are deprecated and do not apply to the version of the property that has
// the -webkit- prefix removed.
if (val->id == CSSValueBorder || val->id == CSSValuePadding || val->id == CSSValueContent ||
val->id == CSSValueBorderBox || val->id == CSSValuePaddingBox || val->id == CSSValueContentBox ||
((propId == CSSPropertyWebkitBackgroundClip || propId == CSSPropertyWebkitMaskClip) &&
(propId == CSSPropertyWebkitBackgroundClip &&
(val->id == CSSValueText))) {
currValue = cssValuePool().createIdentifierValue(val->id);
m_valueList->next();
......@@ -2357,54 +2313,38 @@ bool CSSPropertyParser::parseFillProperty(CSSPropertyID propId, CSSPropertyID& p
}
break;
case CSSPropertyBackgroundPosition:
case CSSPropertyWebkitMaskPosition:
parseFillPosition(m_valueList, currValue, currValue2);
// parseFillPosition advances the m_valueList pointer.
break;
case CSSPropertyBackgroundPositionX:
case CSSPropertyWebkitMaskPositionX: {
case CSSPropertyBackgroundPositionX: {
currValue = parseFillPositionX(m_valueList);
if (currValue)
m_valueList->next();
break;
}
case CSSPropertyBackgroundPositionY:
case CSSPropertyWebkitMaskPositionY: {
case CSSPropertyBackgroundPositionY: {
currValue = parseFillPositionY(m_valueList);
if (currValue)
m_valueList->next();
break;
}
case CSSPropertyWebkitBackgroundComposite:
case CSSPropertyWebkitMaskComposite:
if (val->id >= CSSValueClear && val->id <= CSSValuePlusLighter) {
currValue = cssValuePool().createIdentifierValue(val->id);
m_valueList->next();
}
break;
case CSSPropertyBackgroundRepeat:
case CSSPropertyWebkitMaskRepeat:
parseFillRepeat(currValue, currValue2);
// parseFillRepeat advances the m_valueList pointer
break;
case CSSPropertyBackgroundSize:
case CSSPropertyWebkitBackgroundSize:
case CSSPropertyWebkitMaskSize: {
case CSSPropertyWebkitBackgroundSize: {
currValue = parseFillSize(propId, allowComma);
if (currValue)
m_valueList->next();
break;
}
case CSSPropertyMaskSourceType: {
ASSERT(RuntimeEnabledFeatures::cssMaskSourceTypeEnabled());
if (val->id == CSSValueAuto || val->id == CSSValueAlpha || val->id == CSSValueLuminance) {
currValue = cssValuePool().createIdentifierValue(val->id);
m_valueList->next();
} else {
currValue = nullptr;
}
break;
}
default:
break;
}
......@@ -4460,15 +4400,6 @@ public:
return createBorderImageValue(m_image, m_imageSlice.get(), m_borderWidth.get(), m_outset.get(), m_repeat.get());
}
void commitMaskBoxImage(CSSPropertyParser* parser)
{
commitBorderImageProperty(CSSPropertyWebkitMaskBoxImageSource, parser, m_image);
commitBorderImageProperty(CSSPropertyWebkitMaskBoxImageSlice, parser, m_imageSlice.get());
commitBorderImageProperty(CSSPropertyWebkitMaskBoxImageWidth, parser, m_borderWidth.get());
commitBorderImageProperty(CSSPropertyWebkitMaskBoxImageOutset, parser, m_outset.get());
commitBorderImageProperty(CSSPropertyWebkitMaskBoxImageRepeat, parser, m_repeat.get());
}
void commitBorderImage(CSSPropertyParser* parser)
{
commitBorderImageProperty(CSSPropertyBorderImageSource, parser, m_image);
......@@ -4572,17 +4503,9 @@ bool CSSPropertyParser::parseBorderImageShorthand(CSSPropertyID propId)
{
BorderImageParseContext context;
if (BorderImageParseContext::buildFromParser(*this, propId, context)) {
switch (propId) {
case CSSPropertyWebkitMaskBoxImage:
context.commitMaskBoxImage(this);
return true;
case CSSPropertyBorderImage:
context.commitBorderImage(this);
return true;
default:
ASSERT_NOT_REACHED();
return false;
}
ASSERT(propId == CSSPropertyBorderImage);
context.commitBorderImage(this);
return true;
}
return false;
}
......@@ -4735,7 +4658,7 @@ bool CSSPropertyParser::parseBorderImageSlice(CSSPropertyID propId, RefPtr<CSSBo
if (context.allowFinalCommit()) {
// FIXME: For backwards compatibility, -webkit-border-image, -webkit-mask-box-image and -webkit-box-reflect have to do a fill by default.
// FIXME: What do we do with -webkit-box-reflect and -webkit-mask-box-image? Probably just have to leave them filling...
if (propId == CSSPropertyWebkitBorderImage || propId == CSSPropertyWebkitMaskBoxImage)
if (propId == CSSPropertyWebkitBorderImage)
context.commitFill();
// Need to fully commit as a single value.
......
......@@ -143,7 +143,6 @@ void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR
const AnimatableValue* layerValue = values[i].get();
switch (property) {
case CSSPropertyBackgroundImage:
case CSSPropertyWebkitMaskImage:
if (layerValue->isImage()) {
fillLayer->setImage(state.styleImage(property, toAnimatableImage(layerValue)->toCSSValue()));
} else {
......@@ -152,16 +151,13 @@ void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR
}
break;
case CSSPropertyBackgroundPositionX:
case CSSPropertyWebkitMaskPositionX:
fillLayer->setXPosition(animatableValueToLength(layerValue, state));
break;
case CSSPropertyBackgroundPositionY:
case CSSPropertyWebkitMaskPositionY:
fillLayer->setYPosition(animatableValueToLength(layerValue, state));
break;
case CSSPropertyBackgroundSize:
case CSSPropertyWebkitBackgroundSize:
case CSSPropertyWebkitMaskSize:
setFillSize(fillLayer, layerValue, state);
break;
default:
......@@ -173,20 +169,16 @@ void setOnFillLayers(FillLayer& fillLayers, const AnimatableValue* value, StyleR
while (fillLayer) {
switch (property) {
case CSSPropertyBackgroundImage:
case CSSPropertyWebkitMaskImage:
fillLayer->clearImage();
break;
case CSSPropertyBackgroundPositionX:
case CSSPropertyWebkitMaskPositionX:
fillLayer->clearXPosition();
break;
case CSSPropertyBackgroundPositionY:
case CSSPropertyWebkitMaskPositionY:
fillLayer->clearYPosition();
break;
case CSSPropertyBackgroundSize:
case CSSPropertyWebkitBackgroundSize:
case CSSPropertyWebkitMaskSize:
fillLayer->clearSize();
break;
default:
......@@ -446,31 +438,6 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
case CSSPropertyFilter:
style->setFilter(toAnimatableFilterOperations(value)->operations());
return;
case CSSPropertyWebkitMaskBoxImageOutset:
style->setMaskBoxImageOutset(animatableValueToBorderImageLengthBox(value, state));
return;
case CSSPropertyWebkitMaskBoxImageSlice:
style->setMaskBoxImageSlices(animatableValueToLengthBox(toAnimatableLengthBoxAndBool(value)->box(), state, ValueRangeNonNegative));
style->setMaskBoxImageSlicesFill(toAnimatableLengthBoxAndBool(value)->flag());
return;
case CSSPropertyWebkitMaskBoxImageSource:
style->setMaskBoxImageSource(state.styleImage(property, toAnimatableImage(value)->toCSSValue()));
return;
case CSSPropertyWebkitMaskBoxImageWidth:
style->setMaskBoxImageWidth(animatableValueToBorderImageLengthBox(value, state));
return;
case CSSPropertyWebkitMaskImage:
setOnFillLayers<CSSPropertyWebkitMaskImage>(style->accessMaskLayers(), value, state);
return;
case CSSPropertyWebkitMaskPositionX:
setOnFillLayers<CSSPropertyWebkitMaskPositionX>(style->accessMaskLayers(), value, state);
return;
case CSSPropertyWebkitMaskPositionY:
setOnFillLayers<CSSPropertyWebkitMaskPositionY>(style->accessMaskLayers(), value, state);
return;
case CSSPropertyWebkitMaskSize:
setOnFillLayers<CSSPropertyWebkitMaskSize>(style->accessMaskLayers(), value, state);
return;
case CSSPropertyPerspective:
style->setPerspective(clampTo<float>(toAnimatableDouble(value)->toDouble()));
return;
......
......@@ -139,8 +139,7 @@ void CSSToStyleMap::mapFillImage(FillLayer* layer, CSSValue* value)
return;
}
CSSPropertyID property = layer->type() == BackgroundFillLayer ? CSSPropertyBackgroundImage : CSSPropertyWebkitMaskImage;
layer->setImage(styleImage(property, value));
layer->setImage(styleImage(CSSPropertyBackgroundImage, value));
}
void CSSToStyleMap::mapFillRepeatX(FillLayer* layer, CSSValue* value) const
......@@ -443,8 +442,6 @@ void CSSToStyleMap::mapNinePieceImage(RenderStyle* mutableStyle, CSSPropertyID p
CSSPropertyID imageProperty;
if (property == CSSPropertyWebkitBorderImage)
imageProperty = CSSPropertyBorderImageSource;
else if (property == CSSPropertyWebkitMaskBoxImage)
imageProperty = CSSPropertyWebkitMaskBoxImageSource;
else
imageProperty = property;
......
......@@ -116,8 +116,6 @@ static bool hasWillChangeThatCreatesStackingContext(const RenderStyle* style)
case CSSPropertyWebkitTransformStyle:
case CSSPropertyPerspective:
case CSSPropertyWebkitPerspective:
case CSSPropertyWebkitMask:
case CSSPropertyWebkitMaskBoxImage:
case CSSPropertyWebkitClipPath:
case CSSPropertyFilter:
case CSSPropertyZIndex:
......
......@@ -102,18 +102,6 @@ void StyleResourceLoader::loadPendingImages(RenderStyle* style, ElementStyleReso
style->setBorderImageSource(loadPendingImage(toStylePendingImage(style->borderImageSource()), elementStyleResources.deviceScaleFactor()));
break;
}
case CSSPropertyWebkitMaskBoxImageSource: {
if (style->maskBoxImageSource() && style->maskBoxImageSource()->isPendingImage())
style->setMaskBoxImageSource(loadPendingImage(toStylePendingImage(style->maskBoxImageSource()), elementStyleResources.deviceScaleFactor()));
break;
}
case CSSPropertyWebkitMaskImage: {
for (FillLayer* maskLayer = &style->accessMaskLayers(); maskLayer; maskLayer = maskLayer->next()) {
if (maskLayer->image() && maskLayer->image()->isPendingImage())
maskLayer->setImage(loadPendingImage(toStylePendingImage(maskLayer->image()), elementStyleResources.deviceScaleFactor()));
}
break;
}
default:
ASSERT_NOT_REACHED();
}
......
......@@ -33,7 +33,6 @@ BleedingEdgeFastPaths
ClientHintsDpr status=experimental
Crypto status=stable
CSSAttributeCaseSensitivity status=experimental
CSSMaskSourceType status=experimental
CSSTouchActionDelay status=test
CSSViewport status=experimental
CSS3Text status=experimental
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册