LibWeb/CSS: Parse mask-repeat property

This commit is contained in:
InvalidUsernameException 2025-07-18 20:36:10 +02:00 committed by Sam Atkins
commit 7c5f1a93ed
Notes: github-actions[bot] 2025-08-06 22:10:53 +00:00
8 changed files with 71 additions and 48 deletions

View file

@ -673,6 +673,10 @@ Parser::ParseErrorOr<NonnullRefPtr<CSSStyleValue const>> Parser::parse_css_value
if (auto parsed_value = parse_comma_separated_value_list(tokens, [this](auto& tokens) { return parse_position_value(tokens); }))
return parsed_value.release_nonnull();
return ParseError::SyntaxError;
case PropertyID::MaskRepeat:
if (auto parsed_value = parse_comma_separated_value_list(tokens, [this, property_id](auto& tokens) { return parse_single_repeat_style_value(property_id, tokens); }))
return parsed_value.release_nonnull();
return ParseError::SyntaxError;
case PropertyID::Opacity:
case PropertyID::FillOpacity:
case PropertyID::FloodOpacity:

View file

@ -2425,6 +2425,20 @@
],
"percentages-resolve-to": "length"
},
"mask-repeat": {
"affects-layout": false,
"animation-type": "discrete",
"inherited": false,
"initial": "repeat",
"max-values": 2,
"valid-types": [
"repetition"
],
"valid-identifiers": [
"repeat-x",
"repeat-y"
]
},
"mask-type": {
"animation-type": "discrete",
"inherited": false,

View file

@ -190,6 +190,7 @@ All properties associated with getComputedStyle(document.body):
"mask-image",
"mask-mode",
"mask-position",
"mask-repeat",
"mask-type",
"max-block-size",
"max-height",

View file

@ -533,6 +533,8 @@ All supported properties and their default values exposed from CSSStylePropertie
'mask-mode': 'match-source'
'maskPosition': '0% 0%'
'mask-position': '0% 0%'
'maskRepeat': 'repeat'
'mask-repeat': 'repeat'
'maskType': 'luminance'
'mask-type': 'luminance'
'mathDepth': '0'

View file

@ -188,6 +188,7 @@ mask-composite: add
mask-image: none
mask-mode: match-source
mask-position: 0% 0%
mask-repeat: repeat
mask-type: luminance
max-block-size: none
max-height: none

View file

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

View file

@ -2,26 +2,26 @@ Harness status: OK
Found 22 tests
22 Fail
Fail Property mask-repeat value 'repeat-x'
Fail Property mask-repeat value 'repeat-y'
Fail Property mask-repeat value 'repeat'
Fail Property mask-repeat value 'space'
Fail Property mask-repeat value 'round'
Fail Property mask-repeat value 'no-repeat'
Fail Property mask-repeat value 'repeat repeat'
Fail Property mask-repeat value 'repeat space'
Fail Property mask-repeat value 'repeat round'
Fail Property mask-repeat value 'repeat no-repeat'
Fail Property mask-repeat value 'space repeat'
Fail Property mask-repeat value 'space space'
Fail Property mask-repeat value 'space round'
Fail Property mask-repeat value 'space no-repeat'
Fail Property mask-repeat value 'round repeat'
Fail Property mask-repeat value 'round space'
Fail Property mask-repeat value 'round round'
Fail Property mask-repeat value 'round no-repeat'
Fail Property mask-repeat value 'no-repeat repeat'
Fail Property mask-repeat value 'no-repeat space'
Fail Property mask-repeat value 'no-repeat round'
Fail Property mask-repeat value 'no-repeat no-repeat'
22 Pass
Pass Property mask-repeat value 'repeat-x'
Pass Property mask-repeat value 'repeat-y'
Pass Property mask-repeat value 'repeat'
Pass Property mask-repeat value 'space'
Pass Property mask-repeat value 'round'
Pass Property mask-repeat value 'no-repeat'
Pass Property mask-repeat value 'repeat repeat'
Pass Property mask-repeat value 'repeat space'
Pass Property mask-repeat value 'repeat round'
Pass Property mask-repeat value 'repeat no-repeat'
Pass Property mask-repeat value 'space repeat'
Pass Property mask-repeat value 'space space'
Pass Property mask-repeat value 'space round'
Pass Property mask-repeat value 'space no-repeat'
Pass Property mask-repeat value 'round repeat'
Pass Property mask-repeat value 'round space'
Pass Property mask-repeat value 'round round'
Pass Property mask-repeat value 'round no-repeat'
Pass Property mask-repeat value 'no-repeat repeat'
Pass Property mask-repeat value 'no-repeat space'
Pass Property mask-repeat value 'no-repeat round'
Pass Property mask-repeat value 'no-repeat no-repeat'

View file

@ -2,26 +2,26 @@ Harness status: OK
Found 22 tests
22 Fail
Fail e.style['mask-repeat'] = "repeat-x" should set the property value
Fail e.style['mask-repeat'] = "repeat-y" should set the property value
Fail e.style['mask-repeat'] = "repeat" should set the property value
Fail e.style['mask-repeat'] = "space" should set the property value
Fail e.style['mask-repeat'] = "round" should set the property value
Fail e.style['mask-repeat'] = "no-repeat" should set the property value
Fail e.style['mask-repeat'] = "repeat repeat" should set the property value
Fail e.style['mask-repeat'] = "repeat space" should set the property value
Fail e.style['mask-repeat'] = "repeat round" should set the property value
Fail e.style['mask-repeat'] = "repeat no-repeat" should set the property value
Fail e.style['mask-repeat'] = "space repeat" should set the property value
Fail e.style['mask-repeat'] = "space space" should set the property value
Fail e.style['mask-repeat'] = "space round" should set the property value
Fail e.style['mask-repeat'] = "space no-repeat" should set the property value
Fail e.style['mask-repeat'] = "round repeat" should set the property value
Fail e.style['mask-repeat'] = "round space" should set the property value
Fail e.style['mask-repeat'] = "round round" should set the property value
Fail e.style['mask-repeat'] = "round no-repeat" should set the property value
Fail e.style['mask-repeat'] = "no-repeat repeat" should set the property value
Fail e.style['mask-repeat'] = "no-repeat space" should set the property value
Fail e.style['mask-repeat'] = "no-repeat round" should set the property value
Fail e.style['mask-repeat'] = "no-repeat no-repeat" should set the property value
22 Pass
Pass e.style['mask-repeat'] = "repeat-x" should set the property value
Pass e.style['mask-repeat'] = "repeat-y" should set the property value
Pass e.style['mask-repeat'] = "repeat" should set the property value
Pass e.style['mask-repeat'] = "space" should set the property value
Pass e.style['mask-repeat'] = "round" should set the property value
Pass e.style['mask-repeat'] = "no-repeat" should set the property value
Pass e.style['mask-repeat'] = "repeat repeat" should set the property value
Pass e.style['mask-repeat'] = "repeat space" should set the property value
Pass e.style['mask-repeat'] = "repeat round" should set the property value
Pass e.style['mask-repeat'] = "repeat no-repeat" should set the property value
Pass e.style['mask-repeat'] = "space repeat" should set the property value
Pass e.style['mask-repeat'] = "space space" should set the property value
Pass e.style['mask-repeat'] = "space round" should set the property value
Pass e.style['mask-repeat'] = "space no-repeat" should set the property value
Pass e.style['mask-repeat'] = "round repeat" should set the property value
Pass e.style['mask-repeat'] = "round space" should set the property value
Pass e.style['mask-repeat'] = "round round" should set the property value
Pass e.style['mask-repeat'] = "round no-repeat" should set the property value
Pass e.style['mask-repeat'] = "no-repeat repeat" should set the property value
Pass e.style['mask-repeat'] = "no-repeat space" should set the property value
Pass e.style['mask-repeat'] = "no-repeat round" should set the property value
Pass e.style['mask-repeat'] = "no-repeat no-repeat" should set the property value