Title: [282058] trunk
Revision
282058
Author
[email protected]
Date
2021-09-06 09:33:24 -0700 (Mon, 06 Sep 2021)

Log Message

Add a temporarily prefixed property for mask-mode, aliased to -webkit-mask-source-type
https://bugs.webkit.org/show_bug.cgi?id=229915

Reviewed by Antti Koivisto.
Source/WebCore:

In preparation for unprefixing the "mask" property, add -webkit-mask-mode. This is
almost an alias to the existing -webkit-mask-source-type, but takes a "match-source"
value rather than "auto".

To make it easier to have aliases with different parsing requirements, add support
in CSSProperties.json for "synonyms"; these are like aliases but they get their
own CSSPropertyID to allow for customized parsing. They share style builder code
with the related property.

FillLayer now uses MaskMode rather than MaskSourceType.

Test: fast/masking/parsing-mask-mode.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::maskSourceTypeToCSSValue):
(WebCore::maskModeToCSSValue):
(WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
(WebCore::fillSourceTypeToCSSValue): Deleted.
* css/CSSProperties.json:
* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillMaskMode):
(WebCore::CSSToStyleMap::mapFillMaskSourceType): Deleted.
* css/CSSToStyleMap.h:
* css/CSSValueKeywords.in:
* css/makeprop.pl:
(addProperty):
(generateFillLayerPropertyValueSetter):
(generateValueSetter):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeWebkitMaskMode):
(WebCore::consumeBackgroundComponent):
(WebCore::CSSPropertyParser::parseSingleValue):
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/style/FillLayer.cpp:
(WebCore::FillLayer::FillLayer):
(WebCore::FillLayer::operator=):
(WebCore::FillLayer::operator== const):
(WebCore::operator<<):
* rendering/style/FillLayer.h:
(WebCore::FillLayer::maskMode const):
(WebCore::FillLayer::isMaskModeSet const):
(WebCore::FillLayer::setMaskMode):
(WebCore::FillLayer::clearMaskMode):
(WebCore::FillLayer::initialFillMaskMode):
(WebCore::FillLayer::maskSourceType const): Deleted.
(WebCore::FillLayer::isMaskSourceTypeSet const): Deleted.
(WebCore::FillLayer::setMaskSourceType): Deleted.
(WebCore::FillLayer::clearMaskSourceType): Deleted.
(WebCore::FillLayer::initialFillMaskSourceType): Deleted.
* rendering/style/RenderStyleConstants.cpp:
(WebCore::operator<<):
* rendering/style/RenderStyleConstants.h:

Tools:

Allow the "synonym" key in CSSProperties.json.

* Scripts/webkitpy/style/checkers/jsonchecker.py:
(JSONCSSPropertiesChecker.check_codegen_properties):

LayoutTests:

* fast/masking/parsing-mask-mode-expected.txt: Added.
* fast/masking/parsing-mask-mode.html: Added.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (282057 => 282058)


--- trunk/LayoutTests/ChangeLog	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/LayoutTests/ChangeLog	2021-09-06 16:33:24 UTC (rev 282058)
@@ -1,3 +1,13 @@
+2021-09-06  Simon Fraser  <[email protected]>
+
+        Add a temporarily prefixed property for mask-mode, aliased to -webkit-mask-source-type
+        https://bugs.webkit.org/show_bug.cgi?id=229915
+
+        Reviewed by Antti Koivisto.
+
+        * fast/masking/parsing-mask-mode-expected.txt: Added.
+        * fast/masking/parsing-mask-mode.html: Added.
+
 2021-09-06  Youenn Fablet  <[email protected]>
 
         Add support for RTCSctpTransport

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt (282057 => 282058)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml-expected.txt	2021-09-06 16:33:24 UTC (rev 282058)
@@ -367,6 +367,7 @@
 PASS -webkit-mask-clip
 PASS -webkit-mask-composite
 PASS -webkit-mask-image
+PASS -webkit-mask-mode
 PASS -webkit-mask-origin
 PASS -webkit-mask-position-x
 PASS -webkit-mask-position-y

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt (282057 => 282058)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt	2021-09-06 16:33:24 UTC (rev 282058)
@@ -9,5 +9,5 @@
 PASS invalid property does not appear
 FAIL Shorthands aren't serialized if there are other properties with different logical groups in between assert_equals: expected "margin-top: 10px; margin-right: 10px; margin-left: 10px; margin-inline-start: 10px; margin-block: 10px; margin-inline-end: 10px; margin-bottom: 10px;" but got "margin: 10px; margin-inline: 10px; margin-block: 10px;"
 PASS Shorthands _are_ serialized if there are no other properties with different logical groups in between
-FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; backface-visibility: visible; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0,
  0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none;
  border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; contain: none; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-f
 amily: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: no
 rmal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavio
 r-y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-stop: normal; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape
 -rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; t
 ranslate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -we
 bkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0; -webkit-mask-box-image-repeat: stretch; -webkit-mask-bo
 x-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;
 "
+FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; backface-visibility: visible; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 
 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; 
 border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; contain: none; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-fa
 mily: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: nor
 mal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior
 -y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-stop: normal; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-
 rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; tr
 anslate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -web
 kit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box
 -image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-mode: match-source; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-
 only; -webkit-user-select: text;"
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt (282057 => 282058)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt	2021-09-06 16:33:24 UTC (rev 282058)
@@ -1,8 +1,8 @@
 
 PASS getComputedStyle returns no style for detached element
-FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 390
-FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 390
-FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 390
-FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 390
+FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 391
+FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 391
+FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 391
+FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 391
 PASS getComputedStyle returns no style for shadow tree outside of flattened tree
 

Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt (282057 => 282058)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/cssstyledeclaration-csstext-expected.txt	2021-09-06 16:33:24 UTC (rev 282058)
@@ -9,5 +9,5 @@
 PASS invalid property does not appear
 FAIL Shorthands aren't serialized if there are other properties with different logical groups in between assert_equals: expected "margin-top: 10px; margin-right: 10px; margin-left: 10px; margin-inline-start: 10px; margin-block: 10px; margin-inline-end: 10px; margin-bottom: 10px;" but got "margin: 10px; margin-inline: 10px; margin-block: 10px;"
 PASS Shorthands _are_ serialized if there are no other properties with different logical groups in between
-FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; backface-visibility: visible; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0,
  0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none;
  border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; contain: none; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-f
 amily: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: no
 rmal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavio
 r-y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-stop: normal; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape
 -rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; t
 ranslate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -we
 bkit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0; -webkit-mask-box-image-repeat: stretch; -webkit-mask-bo
 x-image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-overflow-scrolling: auto; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: normal; -webkit-touch-callout: default; -webkit-transform-style: flat; -webkit-user-drag
 : auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
+FAIL cssText on computed style declaration returns the empty string assert_equals: cssText is empty expected "" but got "align-content: normal; align-items: normal; align-self: auto; alignment-baseline: auto; all: ; alt: \"\"; animation-delay: 0s; animation-direction: normal; animation-duration: 0s; animation-fill-mode: none; animation-iteration-count: 1; animation-name: none; animation-play-state: running; animation-timing-function: ease; aspect-ratio: auto; backface-visibility: visible; background-attachment: scroll; background-blend-mode: normal; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; baseline-shift: baseline; block-size: 0px; border-block-end-color: rgb(255, 0, 0); border-block-end-style: none; border-block-end-width: 0px; border-block-start-color: rgb(255, 0, 
 0); border-block-start-style: none; border-block-start-width: 0px; border-bottom-color: rgb(255, 0, 0); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; border-bottom-style: none; border-bottom-width: 0px; border-collapse: separate; border-end-end-radius: 0px; border-end-start-radius: 0px; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; border-inline-end-color: rgb(255, 0, 0); border-inline-end-style: none; border-inline-end-width: 0px; border-inline-start-color: rgb(255, 0, 0); border-inline-start-style: none; border-inline-start-width: 0px; border-left-color: rgb(255, 0, 0); border-left-style: none; border-left-width: 0px; border-right-color: rgb(255, 0, 0); border-right-style: none; border-right-width: 0px; border-start-end-radius: 0px; border-start-start-radius: 0px; border-top-color: rgb(255, 0, 0); border-top-left-radius: 0px; border-top-right-radius: 0px; border-top-style: none; 
 border-top-width: 0px; bottom: auto; box-shadow: none; box-sizing: content-box; break-after: auto; break-before: auto; break-inside: auto; buffered-rendering: auto; caption-side: top; caret-color: rgb(255, 0, 0); clear: none; clip: auto; clip-path: none; clip-rule: nonzero; color: rgb(255, 0, 0); color-interpolation: sRGB; color-interpolation-filters: linearRGB; color-rendering: auto; color-scheme: auto; column-count: auto; column-fill: balance; column-gap: normal; column-rule-color: rgb(255, 0, 0); column-rule-style: none; column-rule-width: 0px; column-span: none; column-width: auto; contain: none; content: ; counter-increment: none; counter-reset: none; cursor: auto; cx: 0px; cy: 0px; direction: ltr; display: block; dominant-baseline: auto; empty-cells: show; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flex-basis: auto; flex-direction: row; flex-grow: 0; flex-shrink: 1; flex-wrap: nowrap; float: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; font-fa
 mily: -webkit-standard; font-feature-settings: normal; font-optical-sizing: auto; font-size: 13.333333015441895px; font-stretch: normal; font-style: normal; font-synthesis: style weight small-caps; font-variant-alternates: normal; font-variant-caps: normal; font-variant-east-asian: normal; font-variant-ligatures: normal; font-variant-numeric: normal; font-variant-position: normal; font-variation-settings: normal; font-weight: normal; glyph-orientation-horizontal: 0deg; glyph-orientation-vertical: auto; grid-auto-columns: auto; grid-auto-flow: row; grid-auto-rows: auto; grid-column-end: auto; grid-column-start: auto; grid-row-end: auto; grid-row-start: auto; grid-template-areas: none; grid-template-columns: none; grid-template-rows: none; hanging-punctuation: none; height: 0px; image-orientation: from-image; image-rendering: auto; inline-size: 784px; inset-block-end: auto; inset-block-start: auto; inset-inline-end: auto; inset-inline-start: auto; isolation: auto; justify-content: nor
 mal; justify-items: normal; justify-self: auto; kerning: 0; left: auto; letter-spacing: normal; lighting-color: rgb(255, 255, 255); line-break: auto; line-height: normal; list-style-image: none; list-style-position: outside; list-style-type: disc; margin-block-end: 0px; margin-block-start: 0px; margin-bottom: 0px; margin-inline-end: 0px; margin-inline-start: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; marker-end: none; marker-mid: none; marker-start: none; mask: none; mask-type: luminance; math-style: normal; max-block-size: none; max-height: none; max-inline-size: none; max-width: none; min-block-size: 0px; min-height: 0px; min-inline-size: 0px; min-width: 0px; mix-blend-mode: normal; object-fit: fill; object-position: 50% 50%; opacity: 1; order: 0; orphans: auto; outline-color: rgb(255, 0, 0); outline-offset: 0px; outline-style: none; outline-width: 0px; overflow-wrap: normal; overflow-x: visible; overflow-y: visible; overscroll-behavior-x: auto; overscroll-behavior
 -y: auto; padding-block-end: 0px; padding-block-start: 0px; padding-bottom: 0px; padding-inline-end: 0px; padding-inline-start: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; paint-order: normal; perspective: none; perspective-origin-x: ; perspective-origin-y: ; pointer-events: auto; position: static; quotes: auto; r: 0px; resize: none; right: auto; rotate: none; row-gap: normal; rx: auto; ry: auto; scale: none; scroll-behavior: auto; scroll-margin-block: 0px; scroll-margin-bottom: 0px; scroll-margin-inline: 0px; scroll-margin-left: 0px; scroll-margin-right: 0px; scroll-margin-top: 0px; scroll-padding-block: auto; scroll-padding-bottom: auto; scroll-padding-inline: auto; scroll-padding-left: auto; scroll-padding-right: auto; scroll-padding-top: auto; scroll-snap-align: none; scroll-snap-stop: normal; scroll-snap-type: none; shape-image-threshold: 0; shape-margin: 0px; shape-outside: none; shape-
 rendering: auto; size: ; speak-as: normal; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-color: rgba(0, 0, 0, 0); stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; tab-size: 8; table-layout: auto; text-align: start; text-anchor: start; text-decoration: none; text-decoration-color: rgb(255, 0, 0); text-decoration-line: none; text-decoration-skip: auto; text-decoration-style: solid; text-decoration-thickness: auto; text-indent: 0px; text-orientation: mixed; text-overflow: clip; text-rendering: auto; text-shadow: none; text-transform: none; text-underline-offset: auto; text-underline-position: auto; top: auto; touch-action: auto; transform: none; transform-box: view-box; transform-origin-x: ; transform-origin-y: ; transform-origin-z: ; transform-style: flat; transition-delay: 0s; transition-duration: 0s; transition-property: all; transition-timing-function: ease; tr
 anslate: none; unicode-bidi: normal; vector-effect: none; vertical-align: baseline; visibility: visible; white-space: normal; widows: auto; width: 784px; will-change: auto; word-break: normal; word-spacing: 0px; word-wrap: normal; writing-mode: horizontal-tb; x: 0px; y: 0px; z-index: auto; zoom: 1; -apple-color-filter: none; -apple-pay-button-style: black; -apple-pay-button-type: plain; -apple-trailing-word: auto; -webkit-appearance: none; -webkit-backdrop-filter: none; -webkit-background-clip: border-box; -webkit-background-composite: source-over; -webkit-background-origin: padding-box; -webkit-background-size: auto; -webkit-border-fit: border; -webkit-border-horizontal-spacing: 0px; -webkit-border-image: none; -webkit-border-vertical-spacing: 0px; -webkit-box-align: stretch; -webkit-box-decoration-break: slice; -webkit-box-direction: normal; -webkit-box-flex: 0; -webkit-box-flex-group: 1; -webkit-box-lines: single; -webkit-box-ordinal-group: 1; -webkit-box-orient: horizontal; -web
 kit-box-pack: start; -webkit-box-reflect: none; -webkit-box-shadow: none; -webkit-column-axis: auto; -webkit-column-break-after: auto; -webkit-column-break-before: auto; -webkit-column-break-inside: auto; -webkit-column-progression: normal; -webkit-cursor-visibility: auto; -webkit-font-kerning: auto; -webkit-font-smoothing: auto; -webkit-hyphenate-character: auto; -webkit-hyphenate-limit-after: auto; -webkit-hyphenate-limit-before: auto; -webkit-hyphenate-limit-lines: no-limit; -webkit-hyphens: manual; -webkit-initial-letter: normal; -webkit-line-align: none; -webkit-line-box-contain: block inline replaced; -webkit-line-clamp: none; -webkit-line-grid: none; -webkit-line-snap: none; -webkit-locale: auto; -webkit-margin-after-collapse: collapse; -webkit-margin-before-collapse: collapse; -webkit-margin-bottom-collapse: collapse; -webkit-margin-top-collapse: collapse; -webkit-mask-box-image: none; -webkit-mask-box-image-outset: 0; -webkit-mask-box-image-repeat: stretch; -webkit-mask-box
 -image-slice: 0 fill; -webkit-mask-box-image-source: none; -webkit-mask-box-image-width: auto; -webkit-mask-clip: border-box; -webkit-mask-composite: source-over; -webkit-mask-image: none; -webkit-mask-mode: match-source; -webkit-mask-origin: border-box; -webkit-mask-position-x: 0%; -webkit-mask-position-y: 0%; -webkit-mask-repeat: repeat; -webkit-mask-size: auto; -webkit-mask-source-type: alpha; -webkit-nbsp-mode: normal; -webkit-overflow-scrolling: auto; -webkit-print-color-adjust: economy; -webkit-rtl-ordering: logical; -webkit-ruby-position: before; -webkit-tap-highlight-color: rgba(26, 26, 26, 0.3); -webkit-text-combine: none; -webkit-text-emphasis-color: rgb(255, 0, 0); -webkit-text-emphasis-position: over right; -webkit-text-emphasis-style: none; -webkit-text-fill-color: rgb(255, 0, 0); -webkit-text-orientation: mixed; -webkit-text-security: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-color: rgb(255, 0, 0); -webkit-text-stroke-width: 0px; -webkit-text-zoom: norm
 al; -webkit-touch-callout: default; -webkit-transform-style: flat; -webkit-user-drag: auto; -webkit-user-modify: read-only; -webkit-user-select: text;"
 

Modified: trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt (282057 => 282058)


--- trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/css/cssom/getComputedStyle-detached-subtree-expected.txt	2021-09-06 16:33:24 UTC (rev 282058)
@@ -1,8 +1,8 @@
 
 PASS getComputedStyle returns no style for detached element
-FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 392
-FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 392
-FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 392
-FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 392
+FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) assert_equals: expected 0 but got 394
+FAIL getComputedStyle returns no style for element in non-rendered iframe (display: none) from iframe's window assert_equals: expected 0 but got 394
+FAIL getComputedStyle returns no style for element outside the flat tree assert_equals: expected 0 but got 394
+FAIL getComputedStyle returns no style for descendant outside the flat tree assert_equals: expected 0 but got 394
 PASS getComputedStyle returns no style for shadow tree outside of flattened tree
 

Modified: trunk/Source/WebCore/ChangeLog (282057 => 282058)


--- trunk/Source/WebCore/ChangeLog	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/ChangeLog	2021-09-06 16:33:24 UTC (rev 282058)
@@ -1,3 +1,64 @@
+2021-09-06  Simon Fraser  <[email protected]>
+
+        Add a temporarily prefixed property for mask-mode, aliased to -webkit-mask-source-type
+        https://bugs.webkit.org/show_bug.cgi?id=229915
+
+        Reviewed by Antti Koivisto.
+        
+        In preparation for unprefixing the "mask" property, add -webkit-mask-mode. This is 
+        almost an alias to the existing -webkit-mask-source-type, but takes a "match-source"
+        value rather than "auto".
+
+        To make it easier to have aliases with different parsing requirements, add support
+        in CSSProperties.json for "synonyms"; these are like aliases but they get their
+        own CSSPropertyID to allow for customized parsing. They share style builder code
+        with the related property.
+        
+        FillLayer now uses MaskMode rather than MaskSourceType.
+
+        Test: fast/masking/parsing-mask-mode.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::maskSourceTypeToCSSValue):
+        (WebCore::maskModeToCSSValue):
+        (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
+        (WebCore::fillSourceTypeToCSSValue): Deleted.
+        * css/CSSProperties.json:
+        * css/CSSToStyleMap.cpp:
+        (WebCore::CSSToStyleMap::mapFillMaskMode):
+        (WebCore::CSSToStyleMap::mapFillMaskSourceType): Deleted.
+        * css/CSSToStyleMap.h:
+        * css/CSSValueKeywords.in:
+        * css/makeprop.pl:
+        (addProperty):
+        (generateFillLayerPropertyValueSetter):
+        (generateValueSetter):
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::consumeWebkitMaskMode):
+        (WebCore::consumeBackgroundComponent):
+        (WebCore::CSSPropertyParser::parseSingleValue):
+        * rendering/RenderBoxModelObject.cpp:
+        (WebCore::RenderBoxModelObject::paintFillLayerExtended):
+        * rendering/style/FillLayer.cpp:
+        (WebCore::FillLayer::FillLayer):
+        (WebCore::FillLayer::operator=):
+        (WebCore::FillLayer::operator== const):
+        (WebCore::operator<<):
+        * rendering/style/FillLayer.h:
+        (WebCore::FillLayer::maskMode const):
+        (WebCore::FillLayer::isMaskModeSet const):
+        (WebCore::FillLayer::setMaskMode):
+        (WebCore::FillLayer::clearMaskMode):
+        (WebCore::FillLayer::initialFillMaskMode):
+        (WebCore::FillLayer::maskSourceType const): Deleted.
+        (WebCore::FillLayer::isMaskSourceTypeSet const): Deleted.
+        (WebCore::FillLayer::setMaskSourceType): Deleted.
+        (WebCore::FillLayer::clearMaskSourceType): Deleted.
+        (WebCore::FillLayer::initialFillMaskSourceType): Deleted.
+        * rendering/style/RenderStyleConstants.cpp:
+        (WebCore::operator<<):
+        * rendering/style/RenderStyleConstants.h:
+
 2021-09-06  Youenn Fablet  <[email protected]>
 
         Add support for RTCSctpTransport

Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (282057 => 282058)


--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2021-09-06 16:33:24 UTC (rev 282058)
@@ -1700,17 +1700,36 @@
     return list;
 }
 
-static Ref<CSSValue> fillSourceTypeToCSSValue(MaskSourceType type)
+static Ref<CSSValue> maskSourceTypeToCSSValue(MaskMode type)
 {
     switch (type) {
-    case MaskSourceType::Alpha:
+    case MaskMode::Alpha:
         return CSSValuePool::singleton().createValue(CSSValueAlpha);
-    default:
-        ASSERT(type == MaskSourceType::Luminance);
+    case MaskMode::Luminance:
+        ASSERT(type == MaskMode::Luminance);
         return CSSValuePool::singleton().createValue(CSSValueLuminance);
+    case MaskMode::MatchSource:
+        // MatchSource is only available in the mask-mode property.
+        return CSSValuePool::singleton().createValue(CSSValueAlpha);
     }
+    ASSERT_NOT_REACHED();
+    return CSSValuePool::singleton().createValue(CSSValueAlpha);
 }
 
+static Ref<CSSValue> maskModeToCSSValue(MaskMode type)
+{
+    switch (type) {
+    case MaskMode::Alpha:
+        return CSSValuePool::singleton().createValue(CSSValueAlpha);
+    case MaskMode::Luminance:
+        return CSSValuePool::singleton().createValue(CSSValueLuminance);
+    case MaskMode::MatchSource:
+        return CSSValuePool::singleton().createValue(CSSValueMatchSource);
+    }
+    ASSERT_NOT_REACHED();
+    return CSSValuePool::singleton().createValue(CSSValueMatchSource);
+}
+
 static Ref<CSSValue> fillSizeToCSSValue(const FillSize& fillSize, const RenderStyle& style)
 {
     if (fillSize.type == FillSizeType::Contain)
@@ -2616,12 +2635,21 @@
         case CSSPropertyWebkitMaskSourceType: {
             auto& layers = style.maskLayers();
             if (!layers.next())
-                return fillSourceTypeToCSSValue(layers.maskSourceType());
+                return maskSourceTypeToCSSValue(layers.maskMode());
             auto list = CSSValueList::createCommaSeparated();
             for (auto* currLayer = &layers; currLayer; currLayer = currLayer->next())
-                list->append(fillSourceTypeToCSSValue(currLayer->maskSourceType()));
+                list->append(maskSourceTypeToCSSValue(currLayer->maskMode()));
             return list;
         }
+        case CSSPropertyWebkitMaskMode: {
+            auto& layers = style.maskLayers();
+            if (!layers.next())
+                return maskModeToCSSValue(layers.maskMode());
+            auto list = CSSValueList::createCommaSeparated();
+            for (auto* currLayer = &layers; currLayer; currLayer = currLayer->next())
+                list->append(maskModeToCSSValue(currLayer->maskMode()));
+            return list;
+        }
         case CSSPropertyWebkitBackgroundComposite:
         case CSSPropertyWebkitMaskComposite: {
             auto& layers = propertyID == CSSPropertyWebkitMaskComposite ? style.maskLayers() : style.backgroundLayers();

Modified: trunk/Source/WebCore/css/CSSProperties.json (282057 => 282058)


--- trunk/Source/WebCore/css/CSSProperties.json	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/css/CSSProperties.json	2021-09-06 16:33:24 UTC (rev 282058)
@@ -149,8 +149,14 @@
         "as seen when one is seen. This could enforce the 'last-one-wins' rule.",
         "",
         "* aliases:",
-        "An array of the alternative names for this property.",
+        "An array of the alternative names for this property. Aliases are folded at",
+        "parse time and don't have their own CSSPropertyID.",
         "",
+        "* synonym:",
+        "An alternative name for this property that gets its own CSSPropertyID.",
+        "This allows parsing code to handle differences in allowed values.",
+        "Style builder code is shared with the original property.",
+        "",
         "* enable-if:",
         "Indicates that code should only be generated for this property/value if the",
         "specified macro define is enabled. Prefix the macro define with '!' to",
@@ -6327,6 +6333,16 @@
                 "url": "https://www.w3.org/TR/css-masking-1/#propdef-mask-image"
             }
         },
+        "-webkit-mask-mode": {
+            "codegen-properties": {
+                "name-for-methods": "MaskMode",
+                "fill-layer-property": true
+            },
+            "specification": {
+                "category": "css-masking",
+                "url": "https://www.w3.org/TR/css-masking-1/#propdef-mask-mode"
+            }
+        },
         "-webkit-mask-origin": {
             "codegen-properties": {
                 "name-for-methods": "Origin",
@@ -6425,8 +6441,8 @@
         },
         "-webkit-mask-source-type": {
             "codegen-properties": {
-                "name-for-methods": "MaskSourceType",
-                "fill-layer-property": true
+                "synonym": "-webkit-mask-mode",
+                "comment": "Deprecated alias for mask-mode, supports an 'auto' value, does not support 'match-source'"
             },
             "status": "non-standard"
 ,

Modified: trunk/Source/WebCore/css/CSSToStyleMap.cpp (282057 => 282058)


--- trunk/Source/WebCore/css/CSSToStyleMap.cpp	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/css/CSSToStyleMap.cpp	2021-09-06 16:33:24 UTC (rev 282058)
@@ -264,11 +264,11 @@
         layer.setBackgroundYOrigin(*pair->first());
 }
 
-void CSSToStyleMap::mapFillMaskSourceType(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
+void CSSToStyleMap::mapFillMaskMode(CSSPropertyID propertyID, FillLayer& layer, const CSSValue& value)
 {
-    MaskSourceType type = FillLayer::initialFillMaskSourceType(layer.type());
+    MaskMode maskMode = FillLayer::initialFillMaskMode(layer.type());
     if (value.treatAsInitialValue(propertyID)) {
-        layer.setMaskSourceType(type);
+        layer.setMaskMode(maskMode);
         return;
     }
 
@@ -277,18 +277,23 @@
 
     switch (downcast<CSSPrimitiveValue>(value).valueID()) {
     case CSSValueAlpha:
-        type = MaskSourceType::Alpha;
+        maskMode = MaskMode::Alpha;
         break;
     case CSSValueLuminance:
-        type = MaskSourceType::Luminance;
+        maskMode = MaskMode::Luminance;
         break;
+    case CSSValueMatchSource:
+        ASSERT(propertyID == CSSPropertyWebkitMaskMode);
+        maskMode = MaskMode::MatchSource;
+        break;
     case CSSValueAuto:
+        ASSERT(propertyID == CSSPropertyWebkitMaskSourceType);
         break;
     default:
         ASSERT_NOT_REACHED();
     }
 
-    layer.setMaskSourceType(type);
+    layer.setMaskMode(maskMode);
 }
 
 void CSSToStyleMap::mapAnimationDelay(Animation& animation, const CSSValue& value)

Modified: trunk/Source/WebCore/css/CSSToStyleMap.h (282057 => 282058)


--- trunk/Source/WebCore/css/CSSToStyleMap.h	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/css/CSSToStyleMap.h	2021-09-06 16:33:24 UTC (rev 282058)
@@ -57,7 +57,7 @@
     void mapFillSize(CSSPropertyID, FillLayer&, const CSSValue&);
     void mapFillXPosition(CSSPropertyID, FillLayer&, const CSSValue&);
     void mapFillYPosition(CSSPropertyID, FillLayer&, const CSSValue&);
-    void mapFillMaskSourceType(CSSPropertyID, FillLayer&, const CSSValue&);
+    void mapFillMaskMode(CSSPropertyID, FillLayer&, const CSSValue&);
 
     void mapAnimationDelay(Animation&, const CSSValue&);
     void mapAnimationDirection(Animation&, const CSSValue&);

Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (282057 => 282058)


--- trunk/Source/WebCore/css/CSSValueKeywords.in	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in	2021-09-06 16:33:24 UTC (rev 282058)
@@ -1544,6 +1544,11 @@
 // normal
 compact
 
+// mask-type, mask-mode
+// alpha
+// luminance
+match-source
+
 // rotate
 x
 y

Modified: trunk/Source/WebCore/css/makeprop.pl (282057 => 282058)


--- trunk/Source/WebCore/css/makeprop.pl	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/css/makeprop.pl	2021-09-06 16:33:24 UTC (rev 282058)
@@ -117,6 +117,8 @@
 );
 my %nameToId;
 my %nameToAliases;
+my %synonyms;
+my %namesToSynonyms;
 my %relatedProperty;
 
 for my $name (@allNames) {
@@ -298,6 +300,9 @@
                     $relatedProperty{$name} = $codegenProperties->{"related-property"}
                 } elsif ($codegenOptionName eq "aliases") {
                     $nameToAliases{$name} = $codegenProperties->{"aliases"};
+                } elsif ($codegenOptionName eq "synonym") {
+                    $synonyms{$name} = 1;
+                    push @{$namesToSynonyms{$codegenProperties->{"synonym"}}}, $name;
                 } elsif ($styleBuilderOptions{$codegenOptionName}) {
                     $propertiesWithStyleBuilderOptions{$name}{$codegenOptionName} = $codegenProperties->{$codegenOptionName};
                 } elsif ($codegenOptionName eq "internal-only") {
@@ -1179,8 +1184,6 @@
   my $name = shift;
   my $indent = shift;
 
-  my $CSSPropertyId = "CSSProperty" . $nameToId{$name};
-
   my $setterContent = "";
   $setterContent .= $indent . "auto* child = &builderState.style()." . getLayersAccessorFunction($name) . "();\n";
   $setterContent .= $indent . "FillLayer* previousChild = nullptr;\n";
@@ -1191,12 +1194,12 @@
   $setterContent .= $indent . "            previousChild->setNext(FillLayer::create(" . getFillLayerType($name) . "));\n";
   $setterContent .= $indent . "            child = previousChild->next();\n";
   $setterContent .= $indent . "        }\n";
-  $setterContent .= $indent . "        builderState.styleMap()." . getFillLayerMapfunction($name) . "(" . $CSSPropertyId . ", *child, item);\n";
+  $setterContent .= $indent . "        builderState.styleMap()." . getFillLayerMapfunction($name) . "(propertyID, *child, item);\n";
   $setterContent .= $indent . "        previousChild = child;\n";
   $setterContent .= $indent . "        child = child->next();\n";
   $setterContent .= $indent . "    }\n";
   $setterContent .= $indent . "} else {\n";
-  $setterContent .= $indent . "    builderState.styleMap()." . getFillLayerMapfunction($name) . "(" . $CSSPropertyId . ", *child, value);\n";
+  $setterContent .= $indent . "    builderState.styleMap()." . getFillLayerMapfunction($name) . "(propertyID, *child, value);\n";
   $setterContent .= $indent . "    child = child->next();\n";
   $setterContent .= $indent . "}\n";
   $setterContent .= $indent . "for (; child; child = child->next())\n";
@@ -1295,9 +1298,15 @@
   my $name = shift;
   my $indent = shift;
 
+  my $valueApplierFirstArgument = "";
+  if (exists $propertiesWithStyleBuilderOptions{$name}{"fill-layer-property"}) {
+    $valueApplierFirstArgument = "CSSPropertyID propertyID, ";
+  }
+
   my $setterContent = "";
-  $setterContent .= $indent . "static void applyValue" . $nameToId{$name} . "(BuilderState& builderState, CSSValue& value)\n";
+  $setterContent .= $indent . "static void applyValue" . $nameToId{$name} . "(" . $valueApplierFirstArgument . "BuilderState& builderState, CSSValue& value)\n";
   $setterContent .= $indent . "{\n";
+
   my $convertedValue;
   if (exists($propertiesWithStyleBuilderOptions{$name}{"converter"})) {
     $convertedValue = "BuilderConverter::convert" . $propertiesWithStyleBuilderOptions{$name}{"converter"} . "(builderState, value)";
@@ -1374,6 +1383,7 @@
   # Skip Shorthand properties and properties that do not use the StyleBuilder.
   next if (exists $propertiesWithStyleBuilderOptions{$name}{"longhands"});
   next if (exists $propertiesWithStyleBuilderOptions{$name}{"skip-builder"});
+  next if (exists $synonyms{$name});
 
   my $indent = "    ";
   if (!$propertiesWithStyleBuilderOptions{$name}{"custom"}{"Initial"}) {
@@ -1408,7 +1418,18 @@
 EOF
 
 foreach my $name (@names) {
+  next if (exists $synonyms{$name});
+
   print STYLEBUILDER "    case CSSProperty" . $nameToId{$name} . ":\n";
+
+  my $valueApplierFirstArgument = "";
+  if (exists $propertiesWithStyleBuilderOptions{$name}{"fill-layer-property"}) {
+    $valueApplierFirstArgument = "property, ";
+  }
+  foreach my $synonym (@{$namesToSynonyms{$name}}) {
+    print STYLEBUILDER "    case CSSProperty" . $nameToId{$synonym} . ":\n";
+  }
+
   if (exists $propertiesWithStyleBuilderOptions{$name}{"longhands"}) {
     print STYLEBUILDER "        ASSERT(isShorthandCSSProperty(property));\n";
     print STYLEBUILDER "        ASSERT_NOT_REACHED();\n";
@@ -1418,7 +1439,7 @@
     print STYLEBUILDER "        else if (isInherit)\n";
     print STYLEBUILDER "            " . getScopeForFunction($name, "Inherit") . "::applyInherit" . $nameToId{$name} . "(builderState);\n";
     print STYLEBUILDER "        else\n";
-    print STYLEBUILDER "            " . getScopeForFunction($name, "Value") . "::applyValue" . $nameToId{$name} . "(builderState, value);\n";
+    print STYLEBUILDER "            " . getScopeForFunction($name, "Value") . "::applyValue" . $nameToId{$name} . "(" . $valueApplierFirstArgument . "builderState, value);\n";
   }
   print STYLEBUILDER "        break;\n";
 }

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (282057 => 282058)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2021-09-06 16:33:24 UTC (rev 282058)
@@ -3072,6 +3072,11 @@
     return consumeIdent<CSSValueAuto, CSSValueAlpha, CSSValueLuminance>(range);
 }
 
+static RefPtr<CSSPrimitiveValue> consumeWebkitMaskMode(CSSParserTokenRange& range)
+{
+    return consumeIdent<CSSValueAlpha, CSSValueLuminance, CSSValueMatchSource>(range);
+}
+
 static RefPtr<CSSPrimitiveValue> consumePrefixedBackgroundBox(CSSPropertyID property, CSSParserTokenRange& range, const CSSParserContext& /*context*/)
 {
     // The values 'border', 'padding' and 'content' are deprecated and do not apply to the version of the property that has the -webkit- prefix removed.
@@ -3147,6 +3152,8 @@
     case CSSPropertyBackgroundImage:
     case CSSPropertyWebkitMaskImage:
         return consumeImageOrNone(range, context);
+    case CSSPropertyWebkitMaskMode:
+        return consumeWebkitMaskMode(range);
     case CSSPropertyWebkitMaskSourceType:
         return consumeWebkitMaskSourceType(range);
     case CSSPropertyBackgroundPositionX:
@@ -4408,6 +4415,7 @@
     case CSSPropertyWebkitMaskPositionX:
     case CSSPropertyWebkitMaskPositionY:
     case CSSPropertyWebkitMaskSize:
+    case CSSPropertyWebkitMaskMode:
     case CSSPropertyWebkitMaskSourceType:
         return consumeCommaSeparatedBackgroundComponent(property, m_range, m_context);
     case CSSPropertyWebkitMaskRepeatX:

Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (282057 => 282058)


--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp	2021-09-06 16:33:24 UTC (rev 282058)
@@ -950,7 +950,7 @@
         geometry.clip(LayoutRect(pixelSnappedRect));
         RefPtr<Image> image;
         if (!geometry.destRect().isEmpty() && (image = bgImage->image(backgroundObject ? backgroundObject : this, geometry.tileSize()))) {
-            context.setDrawLuminanceMask(bgLayer.maskSourceType() == MaskSourceType::Luminance);
+            context.setDrawLuminanceMask(bgLayer.maskMode() == MaskMode::Luminance);
 
             if (is<BitmapImage>(image))
                 downcast<BitmapImage>(*image).updateFromSettings(settings());

Modified: trunk/Source/WebCore/rendering/style/FillLayer.cpp (282057 => 282058)


--- trunk/Source/WebCore/rendering/style/FillLayer.cpp	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/rendering/style/FillLayer.cpp	2021-09-06 16:33:24 UTC (rev 282058)
@@ -65,7 +65,7 @@
     , m_composite(static_cast<unsigned>(FillLayer::initialFillComposite(type)))
     , m_sizeType(static_cast<unsigned>(FillSizeType::None))
     , m_blendMode(static_cast<unsigned>(FillLayer::initialFillBlendMode(type)))
-    , m_maskSourceType(static_cast<unsigned>(FillLayer::initialFillMaskSourceType(type)))
+    , m_maskMode(static_cast<unsigned>(FillLayer::initialFillMaskMode(type)))
     , m_imageSet(false)
     , m_attachmentSet(false)
     , m_clipSet(false)
@@ -80,7 +80,7 @@
     , m_backgroundYOrigin(static_cast<unsigned>(Edge::Top))
     , m_compositeSet(type == FillLayerType::Mask)
     , m_blendModeSet(false)
-    , m_maskSourceTypeSet(false)
+    , m_maskModeSet(false)
     , m_type(static_cast<unsigned>(type))
 {
 }
@@ -98,7 +98,7 @@
     , m_composite(o.m_composite)
     , m_sizeType(o.m_sizeType)
     , m_blendMode(o.m_blendMode)
-    , m_maskSourceType(o.m_maskSourceType)
+    , m_maskMode(o.m_maskMode)
     , m_imageSet(o.m_imageSet)
     , m_attachmentSet(o.m_attachmentSet)
     , m_clipSet(o.m_clipSet)
@@ -113,7 +113,7 @@
     , m_backgroundYOrigin(o.m_backgroundYOrigin)
     , m_compositeSet(o.m_compositeSet)
     , m_blendModeSet(o.m_blendModeSet)
-    , m_maskSourceTypeSet(o.m_maskSourceTypeSet)
+    , m_maskModeSet(o.m_maskModeSet)
     , m_type(o.m_type)
 {
     if (o.m_next)
@@ -148,7 +148,7 @@
     m_repeatX = o.m_repeatX;
     m_repeatY = o.m_repeatY;
     m_sizeType = o.m_sizeType;
-    m_maskSourceType = o.m_maskSourceType;
+    m_maskMode = o.m_maskMode;
 
     m_imageSet = o.m_imageSet;
     m_attachmentSet = o.m_attachmentSet;
@@ -160,7 +160,7 @@
     m_repeatYSet = o.m_repeatYSet;
     m_xPosSet = o.m_xPosSet;
     m_yPosSet = o.m_yPosSet;
-    m_maskSourceTypeSet = o.m_maskSourceTypeSet;
+    m_maskModeSet = o.m_maskModeSet;
 
     m_type = o.m_type;
 
@@ -175,7 +175,7 @@
         && m_backgroundXOrigin == o.m_backgroundXOrigin && m_backgroundYOrigin == o.m_backgroundYOrigin
         && m_attachment == o.m_attachment && m_clip == o.m_clip && m_composite == o.m_composite
         && m_blendMode == o.m_blendMode && m_origin == o.m_origin && m_repeatX == o.m_repeatX
-        && m_repeatY == o.m_repeatY && m_sizeType == o.m_sizeType && m_maskSourceType == o.m_maskSourceType
+        && m_repeatY == o.m_repeatY && m_sizeType == o.m_sizeType && m_maskMode == o.m_maskMode
         && m_sizeLength == o.m_sizeLength && m_type == o.m_type
         && ((m_next && o.m_next) ? *m_next == *o.m_next : m_next == o.m_next);
 }
@@ -425,7 +425,7 @@
 
     ts.dumpProperty("composite", layer.composite());
     ts.dumpProperty("blend-mode", layer.blendMode());
-    ts.dumpProperty("mask-type", layer.maskSourceType());
+    ts.dumpProperty("mask-mode", layer.maskMode());
 
     if (layer.next())
         ts << *layer.next();

Modified: trunk/Source/WebCore/rendering/style/FillLayer.h (282057 => 282058)


--- trunk/Source/WebCore/rendering/style/FillLayer.h	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/rendering/style/FillLayer.h	2021-09-06 16:33:24 UTC (rev 282058)
@@ -85,7 +85,7 @@
     const LengthSize& sizeLength() const { return m_sizeLength; }
     FillSizeType sizeType() const { return static_cast<FillSizeType>(m_sizeType); }
     FillSize size() const { return FillSize(static_cast<FillSizeType>(m_sizeType), m_sizeLength); }
-    MaskSourceType maskSourceType() const { return static_cast<MaskSourceType>(m_maskSourceType); }
+    MaskMode maskMode() const { return static_cast<MaskMode>(m_maskMode); }
 
     const FillLayer* next() const { return m_next.get(); }
     FillLayer* next() { return m_next.get(); }
@@ -103,7 +103,7 @@
     bool isCompositeSet() const { return m_compositeSet; }
     bool isBlendModeSet() const { return m_blendModeSet; }
     bool isSizeSet() const { return static_cast<FillSizeType>(m_sizeType) != FillSizeType::None; }
-    bool isMaskSourceTypeSet() const { return m_maskSourceTypeSet; }
+    bool isMaskModeSet() const { return m_maskModeSet; }
 
     bool isEmpty() const { return (sizeType() == FillSizeType::Size && m_sizeLength.isEmpty()) || sizeType() == FillSizeType::None; }
 
@@ -122,7 +122,7 @@
     void setSizeType(FillSizeType b) { m_sizeType = static_cast<unsigned>(b); }
     void setSizeLength(LengthSize l) { m_sizeLength = l; }
     void setSize(FillSize f) { m_sizeType = static_cast<unsigned>(f.type); m_sizeLength = f.size; }
-    void setMaskSourceType(MaskSourceType m) { m_maskSourceType = static_cast<unsigned>(m); m_maskSourceTypeSet = true; }
+    void setMaskMode(MaskMode m) { m_maskMode = static_cast<unsigned>(m); m_maskModeSet = true; }
 
     void clearImage() { m_image = nullptr; m_imageSet = false; }
 
@@ -137,7 +137,7 @@
     void clearComposite() { m_compositeSet = false; }
     void clearBlendMode() { m_blendModeSet = false; }
     void clearSize() { m_sizeType = static_cast<unsigned>(FillSizeType::None); }
-    void clearMaskSourceType() { m_maskSourceTypeSet = false; }
+    void clearMaskMode() { m_maskModeSet = false; }
 
     void setNext(RefPtr<FillLayer>&& next) { m_next = WTFMove(next); }
 
@@ -170,7 +170,7 @@
     static Length initialFillXPosition(FillLayerType) { return Length(0.0f, LengthType::Percent); }
     static Length initialFillYPosition(FillLayerType) { return Length(0.0f, LengthType::Percent); }
     static StyleImage* initialFillImage(FillLayerType) { return nullptr; }
-    static MaskSourceType initialFillMaskSourceType(FillLayerType) { return MaskSourceType::Alpha; }
+    static MaskMode initialFillMaskMode(FillLayerType) { return MaskMode::MatchSource; }
 
 private:
     friend class RenderStyle;
@@ -199,7 +199,7 @@
     unsigned m_composite : 4; // CompositeOperator
     unsigned m_sizeType : 2; // FillSizeType
     unsigned m_blendMode : 5; // BlendMode
-    unsigned m_maskSourceType : 1; // MaskSourceType
+    unsigned m_maskMode : 2; // MaskMode
 
     unsigned m_imageSet : 1;
     unsigned m_attachmentSet : 1;
@@ -215,7 +215,7 @@
     unsigned m_backgroundYOrigin : 2; // Edge
     unsigned m_compositeSet : 1;
     unsigned m_blendModeSet : 1;
-    unsigned m_maskSourceTypeSet : 1;
+    unsigned m_maskModeSet : 1;
 
     unsigned m_type : 1; // FillLayerType
 

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp (282057 => 282058)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.cpp	2021-09-06 16:33:24 UTC (rev 282058)
@@ -753,11 +753,12 @@
     return ts;
 }
 
-TextStream& operator<<(TextStream& ts, MaskSourceType maskSource)
+TextStream& operator<<(TextStream& ts, MaskMode maskMode)
 {
-    switch (maskSource) {
-    case MaskSourceType::Alpha: ts << "alpha"; break;
-    case MaskSourceType::Luminance: ts << "luminance"; break;
+    switch (maskMode) {
+    case MaskMode::Alpha: ts << "alpha"; break;
+    case MaskMode::Luminance: ts << "luminance"; break;
+    case MaskMode::MatchSource: ts << "match-source"; break;
     }
 
     return ts;

Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (282057 => 282058)


--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h	2021-09-06 16:33:24 UTC (rev 282058)
@@ -363,11 +363,12 @@
     Left
 };
 
-// CSS3 Mask Source Types
+// CSS3 Mask Mode
 
-enum class MaskSourceType : uint8_t {
+enum class MaskMode : uint8_t {
     Alpha,
-    Luminance
+    Luminance,
+    MatchSource,
 };
 
 // CSS3 Marquee Properties
@@ -1313,7 +1314,7 @@
 WTF::TextStream& operator<<(WTF::TextStream&, MarginCollapse);
 WTF::TextStream& operator<<(WTF::TextStream&, MarqueeBehavior);
 WTF::TextStream& operator<<(WTF::TextStream&, MarqueeDirection);
-WTF::TextStream& operator<<(WTF::TextStream&, MaskSourceType);
+WTF::TextStream& operator<<(WTF::TextStream&, MaskMode);
 WTF::TextStream& operator<<(WTF::TextStream&, NBSPMode);
 WTF::TextStream& operator<<(WTF::TextStream&, ObjectFit);
 WTF::TextStream& operator<<(WTF::TextStream&, Order);

Modified: trunk/Tools/ChangeLog (282057 => 282058)


--- trunk/Tools/ChangeLog	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Tools/ChangeLog	2021-09-06 16:33:24 UTC (rev 282058)
@@ -1,3 +1,15 @@
+2021-09-06  Simon Fraser  <[email protected]>
+
+        Add a temporarily prefixed property for mask-mode, aliased to -webkit-mask-source-type
+        https://bugs.webkit.org/show_bug.cgi?id=229915
+
+        Reviewed by Antti Koivisto.
+        
+        Allow the "synonym" key in CSSProperties.json.
+
+        * Scripts/webkitpy/style/checkers/jsonchecker.py:
+        (JSONCSSPropertiesChecker.check_codegen_properties):
+
 2021-09-03  Aakash Jain  <[email protected]>
 
         [ews] Invoke validate-changelog with python 3

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/jsonchecker.py (282057 => 282058)


--- trunk/Tools/Scripts/webkitpy/style/checkers/jsonchecker.py	2021-09-06 16:14:32 UTC (rev 282057)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/jsonchecker.py	2021-09-06 16:33:24 UTC (rev 282058)
@@ -307,6 +307,7 @@
             'sink-priority': self.validate_boolean,
             'skip-builder': self.validate_boolean,
             'skip-codegen': self.validate_boolean,
+            'synonym': self.validate_string,
             'svg': self.validate_boolean,
             'visited-link-color-support': self.validate_boolean,
         }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to