[webkit-changes] [WebKit/WebKit] ecf24f: [css-masking] Implement `mask-border` properties
Tim Nguyen
noreply at github.com
Wed Aug 30 11:57:50 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ecf24fddc3cb9df61b9c8cb1fb9e9f5efaee267f
https://github.com/WebKit/WebKit/commit/ecf24fddc3cb9df61b9c8cb1fb9e9f5efaee267f
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-08-30 (Wed, 30 Aug 2023)
Changed paths:
M LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
M LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
M LayoutTests/fast/css/getComputedStyle/getComputedStyle-webkit-mask-box-image.html
M LayoutTests/fast/css/mask-box-image-parsing-expected.txt
M LayoutTests/fast/css/mask-box-image-parsing.html
M LayoutTests/fast/css/uri-token-parsing-expected.txt
M LayoutTests/fast/css/uri-token-parsing.html
M LayoutTests/fast/masking/parsing-mask-repeat-expected.txt
M LayoutTests/fast/masking/parsing-mask-repeat.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/inheritance.sub-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-shorthand-subproperties-reset-expected.txt
A LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-shorthand-subproperties-reset.html
M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub.html
M LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt
M LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M LayoutTests/platform/ipad/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt
M LayoutTests/svg/css/getComputedStyle-basic-expected.txt
M Source/WebCore/animation/CSSPropertyAnimation.cpp
M Source/WebCore/css/CSSProperties.json
M Source/WebCore/css/ComputedStyleExtractor.cpp
M Source/WebCore/css/ShorthandSerializer.cpp
M Source/WebCore/css/parser/CSSPropertyParser.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
M Source/WebCore/rendering/InlineBoxPainter.cpp
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/style/NinePieceImage.cpp
M Source/WebCore/rendering/style/RenderStyle.cpp
M Source/WebCore/rendering/style/RenderStyle.h
M Source/WebCore/rendering/style/RenderStyleInlines.h
M Source/WebCore/rendering/style/RenderStyleSetters.h
M Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
M Source/WebCore/rendering/style/StyleRareNonInheritedData.h
M Source/WebCore/rendering/style/StyleReflection.h
M Source/WebCore/rendering/style/WillChangeData.cpp
M Source/WebCore/style/StyleBuilderConverter.h
M Source/WebCore/style/StyleBuilderCustom.h
M Source/WebCore/style/StylePendingResources.cpp
Log Message:
-----------
[css-masking] Implement `mask-border` properties
https://bugs.webkit.org/show_bug.cgi?id=229900
rdar://82991599
Reviewed by Darin Adler.
This patch aliases -webkit-mask-box-image-* to mask-border-*, with a few changes:
- the initial value of mask-border-slice is now `0` instead of `0 fill`
- the `-webkit-mask-box-image` prop is implemented as a separate shorthand that sets the `fill` on the slice property unlike the `mask-border` shorthand
This is similar to how -webkit-border-image and border-image are setup.
Setting the mask shorthand (but not -webkit-mask) now also resets the `mask-border-*` properties as specified.
Also mass rename maskBoxImage in the codebase to maskBorder.
Specification at: https://drafts.fxtf.org/css-masking/#the-mask-border
* LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt:
* LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* LayoutTests/fast/css/getComputedStyle/getComputedStyle-webkit-mask-box-image.html:
* LayoutTests/fast/css/mask-box-image-parsing-expected.txt:
* LayoutTests/fast/css/mask-box-image-parsing.html:
* LayoutTests/fast/css/uri-token-parsing-expected.txt:
* LayoutTests/fast/css/uri-token-parsing.html:
* LayoutTests/fast/masking/parsing-mask-repeat-expected.txt:
* LayoutTests/fast/masking/parsing-mask-repeat.html:
* LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/inheritance.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-shorthand-subproperties-reset-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/mask-shorthand-subproperties-reset.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub.html:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/css/css-masking/parsing/mask-valid.sub-expected.txt:
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/platform/ipad/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/platform/wpe/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt:
* LayoutTests/svg/css/getComputedStyle-basic-expected.txt:
* Source/WebCore/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/css/ComputedStyleExtractor.cpp:
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle const):
* Source/WebCore/css/ShorthandSerializer.cpp:
(WebCore::ShorthandSerializer::serialize):
(WebCore::ShorthandSerializer::serializeBorderImage const):
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::initialValueForLonghand):
(WebCore::isInitialValueForLonghand):
(WebCore::initialValueTextForLonghand):
(WebCore::initialValueIDForLonghand):
(WebCore::CSSPropertyParser::consumeBorderImage):
(WebCore::CSSPropertyParser::consumeBackgroundShorthand):
(WebCore::CSSPropertyParser::parseShorthand):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeBorderImageComponents):
* Source/WebCore/rendering/InlineBoxPainter.cpp:
(WebCore::InlineBoxPainter::paintMask):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::paintMaskImages):
(WebCore::RenderBox::maskClipRect):
(WebCore::RenderBox::imageChanged):
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::styleDidChange):
(WebCore::RenderElement::willBeDestroyed):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
* Source/WebCore/rendering/style/NinePieceImage.cpp:
(WebCore::NinePieceImage::defaultMaskData):
* Source/WebCore/rendering/style/RenderStyle.cpp:
(WebCore::rareDataChangeRequiresLayerRepaint):
* Source/WebCore/rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialMaskBorderSource):
(WebCore::RenderStyle::initialMaskBoxImageSource): Deleted.
* Source/WebCore/rendering/style/RenderStyleInlines.h:
(WebCore::RenderStyle::hasMask const):
(WebCore::RenderStyle::maskBorder const):
(WebCore::RenderStyle::maskBorderOutsets const):
(WebCore::RenderStyle::maskBorderSource const):
(WebCore::RenderStyle::maskBoxImage const): Deleted.
(WebCore::RenderStyle::maskBoxImageOutsets const): Deleted.
(WebCore::RenderStyle::maskBoxImageSource const): Deleted.
* Source/WebCore/rendering/style/RenderStyleSetters.h:
(WebCore::RenderStyle::setMaskBorder):
(WebCore::RenderStyle::setMaskBorderSource):
(WebCore::RenderStyle::setMaskBoxImage): Deleted.
(WebCore::RenderStyle::setMaskBoxImageSource): Deleted.
* Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator== const):
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebCore/rendering/style/StyleReflection.h:
(WebCore::StyleReflection::StyleReflection):
* Source/WebCore/rendering/style/WillChangeData.cpp:
(WebCore::WillChangeData::propertyCreatesStackingContext):
* Source/WebCore/style/StyleBuilderConverter.h:
(WebCore::Style::BuilderConverter::convertReflection):
* Source/WebCore/style/StyleBuilderCustom.h:
(WebCore::Style::ApplyPropertyBorderImageModifier::applyInitialValue):
(WebCore::Style::ApplyPropertyBorderImageModifier::getValue):
(WebCore::Style::ApplyPropertyBorderImageModifier::setValue):
* Source/WebCore/style/StylePendingResources.cpp:
(WebCore::Style::loadPendingResources):
Canonical link: https://commits.webkit.org/267460@main
More information about the webkit-changes
mailing list