Ignore:
Timestamp:
Dec 9, 2021, 12:22:34 PM (3 years ago)
Author:
[email protected]
Message:

Unprefix -webkit-mask
https://bugs.webkit.org/show_bug.cgi?id=229082

Patch by Matt Woodrow <[email protected]> on 2021-12-09
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-masking/animations/mask-image-interpolation-expected.txt:
  • web-platform-tests/css/css-masking/animations/mask-position-interpolation-expected.txt:
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html:
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes1-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes1.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes2-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-overflow-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-overflow.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes1-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes1.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes2-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes2.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html:
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-transition-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-expected.html.
  • web-platform-tests/css/css-masking/clip-path/animations/clip-path-transition.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation.html.
  • web-platform-tests/css/css-masking/clip-path/animations/w3c-import.log:
  • web-platform-tests/css/css-masking/clip-path/clip-path-columns-shape-002.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-descendant-text-mutated-001.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-001.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-002.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-003.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-element-userSpaceOnUse-004.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-fixed-scroll-expected.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-fixed-scroll.html: Added.
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-001-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-002-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-001-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-path-interpolation-002-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-reference-restore.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-invalidate-expected.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-invalidate.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-text-backdrop-filter.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-svg-text-font-loading.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-001.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-transform-mutated-002.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-url-reference-change-from-empty.html:
  • web-platform-tests/css/css-masking/clip-path/clip-path-url-reference-change.html:
  • web-platform-tests/css/css-masking/clip-path/reference-local-url-with-base-001.html:
  • web-platform-tests/css/css-masking/clip-path/reference-mutated.html:
  • web-platform-tests/css/css-masking/clip-path/reference-nonexisting-existing-local.html:
  • web-platform-tests/css/css-masking/clip-path/w3c-import.log:
  • web-platform-tests/css/css-masking/clip-rule/clip-rule-001.html:
  • web-platform-tests/css/css-masking/clip-rule/clip-rule-002.html:
  • web-platform-tests/css/css-masking/hit-test/clip-path-element-objectboundingbox-001.html:
  • web-platform-tests/css/css-masking/hit-test/clip-path-element-objectboundingbox-002.html:
  • web-platform-tests/css/css-masking/hit-test/clip-path-element-userspaceonuse-001.html:
  • web-platform-tests/css/css-masking/idlharness.html:
  • web-platform-tests/css/css-masking/inheritance.sub-expected.txt:
  • web-platform-tests/css/css-masking/parsing/mask-position-valid-expected.txt:
  • web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt:

Source/WebCore:

Tests: fast/masking/parsing-webkit-mask.html

imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-filter.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes1.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-incompatible-shapes2.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-overflow.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes1.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-animation-three-keyframes2.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/animations/clip-path-transition.html
imported/w3c/web-platform-tests/css/css-masking/clip-path/clip-path-fixed-scroll.html
svg/masking/mask-external-reference-expected.svg
svg/masking/mask-external-reference.svg

  • animation/CSSPropertyAnimation.cpp:

(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::createPositionListForLayer):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):

  • css/CSSImageValue.cpp:

(WebCore::ResolvedURL::isLocalURL const):
(WebCore::CSSImageValue::reresolvedURL const):

  • css/CSSImageValue.h:
  • css/CSSPrimitiveValue.h:

(WebCore::CSSPrimitiveValue::create):

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator CompositeOperator const):
(WebCore::CSSPrimitiveValue::operator FillBox const):

  • css/CSSProperties.json:
  • css/CSSToStyleMap.cpp:

(WebCore::CSSToStyleMap::mapFillMaskMode):

  • css/CSSValueKeywords.in:
  • css/CSSValuePool.h:

(WebCore::CSSValuePool::createValue):

  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::getPropertyValue const):
(WebCore::resolvedClipValue):
(WebCore::isSameAsInitialClipValue):
(WebCore::StyleProperties::getLayeredShorthandValue const):
(WebCore::StyleProperties::asText const):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeMaskClip):
(WebCore::consumePrefixedBackgroundComposite):
(WebCore::consumeBackgroundComposite):
(WebCore::consumeBackgroundComponent):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::consumeBackgroundPosition):
(WebCore::CSSPropertyParser::consumeBackgroundShorthand):
(WebCore::CSSPropertyParser::parseShorthand):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumePositionCoordinates):

  • display/css/DisplayBoxDecorationPainter.cpp:

(WebCore::Display::BoxDecorationPainter::paintFillLayer const):

  • rendering/style/FillLayer.cpp:

(WebCore::clipMax):
(WebCore::FillLayer::computeClipMax const):

  • rendering/style/FillLayer.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::rareNonInheritedDataChangeRequiresLayerRepaint):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::hasPositionedMask const):

  • rendering/style/RenderStyleConstants.cpp:

(WebCore::operator<<):

  • rendering/style/RenderStyleConstants.h:
  • rendering/style/SVGRenderStyle.cpp:

(WebCore::SVGRenderStyle::SVGRenderStyle):
(WebCore::SVGRenderStyle::operator== const):
(WebCore::SVGRenderStyle::copyNonInheritedFrom):
(WebCore::SVGRenderStyle::diff const):

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::initialLightingColor):
(WebCore::SVGRenderStyle::y const):
(WebCore::SVGRenderStyle::hasFill const):
(WebCore::SVGRenderStyle::initialMaskerResource): Deleted.
(WebCore::SVGRenderStyle::maskerResource const): Deleted.
(WebCore::SVGRenderStyle::hasMasker const): Deleted.
(WebCore::SVGRenderStyle::isolatesBlending const): Deleted.
(WebCore::SVGRenderStyle::setMaskerResource): Deleted.

  • rendering/style/SVGRenderStyleDefs.cpp:

(WebCore::StyleResourceData::StyleResourceData): Deleted.
(WebCore::StyleResourceData::copy const): Deleted.
(WebCore::StyleResourceData::operator== const): Deleted.

  • rendering/style/SVGRenderStyleDefs.h:

(WebCore::StyleResourceData::create): Deleted.
(WebCore::StyleResourceData::operator!= const): Deleted.

  • rendering/style/StyleCachedImage.cpp:

(WebCore::StyleCachedImage::imageURL const):
(WebCore::StyleCachedImage::reresolvedURL const):
(WebCore::StyleCachedImage::imageURL): Deleted.

  • rendering/style/StyleCachedImage.h:
  • rendering/style/WillChangeData.cpp:

(WebCore::WillChangeData::propertyCreatesStackingContext):

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::isolatesBlending):
(WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeResources):

  • rendering/svg/SVGRenderingContext.cpp:

(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

  • rendering/svg/SVGResources.cpp:

(WebCore::SVGResources::buildCachedResources):

LayoutTests:

  • fast/masking/parsing-mask-expected.txt:
  • fast/masking/parsing-mask-mode.html:
  • fast/masking/parsing-mask.html:
  • fast/masking/parsing-webkit-mask-expected.txt: Copied from LayoutTests/fast/masking/parsing-mask-expected.txt.
  • fast/masking/parsing-webkit-mask.html: Copied from LayoutTests/fast/masking/parsing-mask.html.
  • platform/mac/imported/w3c/web-platform-tests/css/css-masking/animations/mask-image-interpolation-expected.png: Added.
  • platform/mac/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.png: Added.
  • svg/masking/mask-external-reference-expected.svg: Added.
  • svg/masking/mask-external-reference.svg: Added.
  • svg/masking/resources/mask-resource.svg: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp

    r286200 r286795  
    292292    auto list = CSSValueList::createSpaceSeparated();
    293293    if (layer.isBackgroundXOriginSet() && layer.backgroundXOrigin() != Edge::Left) {
    294         ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
     294        ASSERT_UNUSED(propertyID, propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyMaskPosition || propertyID == CSSPropertyWebkitMaskPosition);
    295295        list->append(CSSValuePool::singleton().createValue(layer.backgroundXOrigin()));
    296296    }
    297297    list->append(zoomAdjustedPixelValueForLength(layer.xPosition(), style));
    298298    if (layer.isBackgroundYOriginSet() && layer.backgroundYOrigin() != Edge::Top) {
    299         ASSERT(propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyWebkitMaskPosition);
     299        ASSERT(propertyID == CSSPropertyBackgroundPosition || propertyID == CSSPropertyMaskPosition || propertyID == CSSPropertyWebkitMaskPosition);
    300300        list->append(CSSValuePool::singleton().createValue(layer.backgroundYOrigin()));
    301301    }
     
    27242724            return m_allowVisitedStyle ? cssValuePool.createColorValue(style.visitedDependentColor(CSSPropertyBackgroundColor)) : currentColorOrValidColor(&style, style.backgroundColor());
    27252725        case CSSPropertyBackgroundImage:
    2726         case CSSPropertyWebkitMaskImage: {
    2727             auto& layers = propertyID == CSSPropertyWebkitMaskImage ? style.maskLayers() : style.backgroundLayers();
     2726        case CSSPropertyMaskImage: {
     2727            auto& layers = propertyID == CSSPropertyMaskImage ? style.maskLayers() : style.backgroundLayers();
    27282728            if (!layers.next()) {
    27292729                if (layers.image())
     
    27422742        case CSSPropertyBackgroundSize:
    27432743        case CSSPropertyWebkitBackgroundSize:
    2744         case CSSPropertyWebkitMaskSize: {
    2745             auto& layers = propertyID == CSSPropertyWebkitMaskSize ? style.maskLayers() : style.backgroundLayers();
     2744        case CSSPropertyMaskSize: {
     2745            auto& layers = propertyID == CSSPropertyMaskSize ? style.maskLayers() : style.backgroundLayers();
    27462746            if (!layers.next())
    27472747                return fillSizeToCSSValue(layers.size(), style);
     
    27522752        }
    27532753        case CSSPropertyBackgroundRepeat:
    2754         case CSSPropertyWebkitMaskRepeat: {
    2755             auto& layers = propertyID == CSSPropertyWebkitMaskRepeat ? style.maskLayers() : style.backgroundLayers();
     2754        case CSSPropertyMaskRepeat: {
     2755            auto& layers = propertyID == CSSPropertyMaskRepeat ? style.maskLayers() : style.backgroundLayers();
    27562756            if (!layers.next())
    27572757                return fillRepeatToCSSValue(layers.repeatX(), layers.repeatY());
     
    27702770            return list;
    27712771        }
    2772         case CSSPropertyWebkitMaskMode: {
     2772        case CSSPropertyMaskMode: {
    27732773            auto& layers = style.maskLayers();
    27742774            if (!layers.next())
     
    27802780        }
    27812781        case CSSPropertyWebkitBackgroundComposite:
    2782         case CSSPropertyWebkitMaskComposite: {
    2783             auto& layers = propertyID == CSSPropertyWebkitMaskComposite ? style.maskLayers() : style.backgroundLayers();
     2782        case CSSPropertyWebkitMaskComposite:
     2783        case CSSPropertyMaskComposite: {
     2784            auto& layers = propertyID == CSSPropertyWebkitBackgroundComposite ? style.backgroundLayers() : style.maskLayers();
    27842785            if (!layers.next())
    2785                 return cssValuePool.createValue(layers.composite());
     2786                return cssValuePool.createValue(layers.composite(), propertyID);
    27862787            auto list = CSSValueList::createCommaSeparated();
    27872788            for (auto* currLayer = &layers; currLayer; currLayer = currLayer->next())
    2788                 list->append(cssValuePool.createValue(currLayer->composite()));
     2789                list->append(cssValuePool.createValue(currLayer->composite(), propertyID));
    27892790            return list;
    27902791        }
     
    28022803        case CSSPropertyWebkitBackgroundClip:
    28032804        case CSSPropertyWebkitBackgroundOrigin:
     2805        case CSSPropertyMaskClip:
    28042806        case CSSPropertyWebkitMaskClip:
    2805         case CSSPropertyWebkitMaskOrigin: {
    2806             auto& layers = (propertyID == CSSPropertyWebkitMaskClip || propertyID == CSSPropertyWebkitMaskOrigin) ? style.maskLayers() : style.backgroundLayers();
    2807             bool isClip = propertyID == CSSPropertyBackgroundClip || propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyWebkitMaskClip;
     2807        case CSSPropertyMaskOrigin: {
     2808            auto& layers = (propertyID == CSSPropertyMaskClip || propertyID == CSSPropertyWebkitMaskClip || propertyID == CSSPropertyMaskOrigin) ? style.maskLayers() : style.backgroundLayers();
     2809            bool isClip = propertyID == CSSPropertyBackgroundClip || propertyID == CSSPropertyWebkitBackgroundClip || propertyID == CSSPropertyMaskClip || propertyID == CSSPropertyWebkitMaskClip;
    28082810            if (!layers.next())
    28092811                return cssValuePool.createValue(isClip ? layers.clip() : layers.origin());
     
    28142816        }
    28152817        case CSSPropertyBackgroundPosition:
    2816         case CSSPropertyWebkitMaskPosition: {
    2817             auto& layers = propertyID == CSSPropertyWebkitMaskPosition ? style.maskLayers() : style.backgroundLayers();
     2818        case CSSPropertyWebkitMaskPosition:
     2819        case CSSPropertyMaskPosition: {
     2820            auto& layers = propertyID == CSSPropertyBackgroundPosition ? style.backgroundLayers() : style.maskLayers();
    28182821            if (!layers.next())
    28192822                return createPositionListForLayer(propertyID, layers, style);
     
    38983901        case CSSPropertyBackground:
    38993902            return getBackgroundShorthandValue();
     3903        case CSSPropertyMask:
     3904            return getMaskShorthandValue();
    39003905        case CSSPropertyBorder: {
    39013906            auto value = propertyValue(CSSPropertyBorderTop, DoNotUpdateLayout);
     
    41744179        case CSSPropertyWebkitMarqueeSpeed:
    41754180        case CSSPropertyWebkitMask:
    4176         case CSSPropertyWebkitMaskRepeatX:
    4177         case CSSPropertyWebkitMaskRepeatY:
     4181        case CSSPropertyMaskRepeatX:
     4182        case CSSPropertyMaskRepeatY:
    41784183        case CSSPropertyPerspectiveOriginX:
    41794184        case CSSPropertyPerspectiveOriginY:
     
    41864191        case CSSPropertyBufferedRendering:
    41874192        case CSSPropertyClipRule:
    4188         case CSSPropertyMask:
    41894193        case CSSPropertyFloodColor:
    41904194        case CSSPropertyFloodOpacity:
     
    45204524}
    45214525
     4526Ref<CSSValueList> ComputedStyleExtractor::getMaskShorthandValue()
     4527{
     4528    static const CSSPropertyID propertiesBeforeSlashSeperator[2] = { CSSPropertyMaskImage, CSSPropertyMaskPosition };
     4529    static const CSSPropertyID propertiesAfterSlashSeperator[6] = { CSSPropertyMaskSize, CSSPropertyMaskRepeat, CSSPropertyMaskOrigin, CSSPropertyMaskClip, CSSPropertyMaskComposite, CSSPropertyMaskMode };
     4530
     4531    return getFillLayerPropertyShorthandValue(CSSPropertyMask, StylePropertyShorthand(CSSPropertyMask, propertiesBeforeSlashSeperator), StylePropertyShorthand(CSSPropertyMask, propertiesAfterSlashSeperator), CSSPropertyInvalid);
     4532}
     4533
    45224534} // namespace WebCore
Note: See TracChangeset for help on using the changeset viewer.