LibWeb/CSS: Parse mask-mode property

This commit is contained in:
InvalidUsernameException 2025-07-18 20:36:07 +02:00 committed by Sam Atkins
commit d022eea9fc
Notes: github-actions[bot] 2025-08-06 22:11:13 +00:00
8 changed files with 23 additions and 2 deletions

View file

@ -491,6 +491,11 @@
"luminance", "luminance",
"alpha" "alpha"
], ],
"masking-mode": [
"alpha",
"luminance",
"match-source"
],
"math-shift": [ "math-shift": [
"normal", "normal",
"compact" "compact"

View file

@ -319,6 +319,7 @@
"mark", "mark",
"marktext", "marktext",
"match-parent", "match-parent",
"match-source",
"math", "math",
"math-auto", "math-auto",
"max-content", "max-content",

View file

@ -665,6 +665,7 @@ Parser::ParseErrorOr<NonnullRefPtr<CSSStyleValue const>> Parser::parse_css_value
return parsed_value.release_nonnull(); return parsed_value.release_nonnull();
return ParseError::SyntaxError; return ParseError::SyntaxError;
case PropertyID::MaskComposite: case PropertyID::MaskComposite:
case PropertyID::MaskMode:
if (auto parsed_value = parse_simple_comma_separated_value_list(property_id, tokens)) if (auto parsed_value = parse_simple_comma_separated_value_list(property_id, tokens))
return parsed_value.release_nonnull(); return parsed_value.release_nonnull();
return ParseError::SyntaxError; return ParseError::SyntaxError;

View file

@ -2406,6 +2406,15 @@
], ],
"initial": "none" "initial": "none"
}, },
"mask-mode": {
"animation-type": "discrete",
"inherited": false,
"affects-layout": false,
"valid-types": [
"masking-mode"
],
"initial": "match-source"
},
"mask-type": { "mask-type": {
"animation-type": "discrete", "animation-type": "discrete",
"inherited": false, "inherited": false,

View file

@ -188,6 +188,7 @@ All properties associated with getComputedStyle(document.body):
"margin-top", "margin-top",
"mask-composite", "mask-composite",
"mask-image", "mask-image",
"mask-mode",
"mask-type", "mask-type",
"max-block-size", "max-block-size",
"max-height", "max-height",

View file

@ -529,6 +529,8 @@ All supported properties and their default values exposed from CSSStylePropertie
'mask-composite': 'add' 'mask-composite': 'add'
'maskImage': 'none' 'maskImage': 'none'
'mask-image': 'none' 'mask-image': 'none'
'maskMode': 'match-source'
'mask-mode': 'match-source'
'maskType': 'luminance' 'maskType': 'luminance'
'mask-type': 'luminance' 'mask-type': 'luminance'
'mathDepth': '0' 'mathDepth': '0'

View file

@ -186,6 +186,7 @@ margin-right: 8px
margin-top: 8px margin-top: 8px
mask-composite: add mask-composite: add
mask-image: none mask-image: none
mask-mode: match-source
mask-type: luminance mask-type: luminance
max-block-size: none max-block-size: none
max-height: none max-height: none

View file

@ -1,8 +1,8 @@
Harness status: OK Harness status: OK
Found 249 tests Found 250 tests
242 Pass 243 Pass
7 Fail 7 Fail
Pass accent-color Pass accent-color
Pass border-collapse Pass border-collapse
@ -187,6 +187,7 @@ Pass margin-right
Pass margin-top Pass margin-top
Pass mask-composite Pass mask-composite
Pass mask-image Pass mask-image
Pass mask-mode
Pass mask-type Pass mask-type
Pass max-block-size Pass max-block-size
Pass max-height Pass max-height