mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibWeb: Limit <ident> to <custom-ident> in @property/syntax
The definition of syntax in the "css-properties-values-api" spec (which is used for the `@property/syntax` descriptor) is slightly different from the definition of `<syntax>` in the "css-values" spec (which we implement) in that it limits literal idents to exclusively `<custom-ident>`s (i.e. not CSS-wide keywords or "default"). `<custom-ident>`s are also case-sensitive so that behavior is implemented for syntax matching here as well
This commit is contained in:
Notes:
github-actions[bot]
2026-03-26 01:13:01 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/6afe2ff27bf Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8330 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -2,8 +2,8 @@ Harness status: OK
|
||||
|
||||
Found 106 tests
|
||||
|
||||
100 Pass
|
||||
6 Fail
|
||||
102 Pass
|
||||
4 Fail
|
||||
Pass Attribute 'syntax' returns expected value for ["<color>"]
|
||||
Pass Attribute 'syntax' returns expected value for ["<color> | none"]
|
||||
Pass Attribute 'syntax' returns expected value for ["<color># | <image> | none"]
|
||||
@@ -18,8 +18,8 @@ Pass Attribute 'syntax' returns expected value for ["red"]
|
||||
Pass Attribute 'syntax' makes the @property rule invalid for ["rgb(255, 0, 0)"]
|
||||
Pass Attribute 'syntax' makes the @property rule invalid for [<color>]
|
||||
Pass Attribute 'syntax' makes the @property rule invalid for [foo | bar]
|
||||
Fail Attribute 'syntax' makes the @property rule invalid for ["default"]
|
||||
Fail Attribute 'syntax' makes the @property rule invalid for ["Default"]
|
||||
Pass Attribute 'syntax' makes the @property rule invalid for ["default"]
|
||||
Pass Attribute 'syntax' makes the @property rule invalid for ["Default"]
|
||||
Pass Attribute 'syntax' makes the @property rule invalid for ["initial"]
|
||||
Pass Attribute 'syntax' makes the @property rule invalid for ["Initial"]
|
||||
Pass Attribute 'syntax' makes the @property rule invalid for ["inherit"]
|
||||
|
||||
@@ -2,8 +2,8 @@ Harness status: OK
|
||||
|
||||
Found 239 tests
|
||||
|
||||
217 Pass
|
||||
22 Fail
|
||||
226 Pass
|
||||
13 Fail
|
||||
Pass syntax:'*', initialValue:'a' is valid
|
||||
Pass syntax:' * ', initialValue:'b' is valid
|
||||
Pass syntax:'<length>', initialValue:'2px' is valid
|
||||
@@ -173,12 +173,12 @@ Pass syntax:'inherit', initialValue:'inherit' is invalid
|
||||
Pass syntax:'inherit', initialValue:'inherit' is invalid
|
||||
Pass syntax:'unset', initialValue:'unset' is invalid
|
||||
Pass syntax:'revert', initialValue:'revert' is invalid
|
||||
Pass syntax:'revert-layer', initialValue:'revert-layer' is invalid
|
||||
Fail syntax:'default', initialValue:'default' is invalid
|
||||
Fail syntax:'<length>|initial', initialValue:'10px' is invalid
|
||||
Fail syntax:'<length>|INHERIT', initialValue:'10px' is invalid
|
||||
Fail syntax:'<percentage>|unsEt', initialValue:'2%' is invalid
|
||||
Fail syntax:'<color>|REVert', initialValue:'red' is invalid
|
||||
Pass syntax:'revert-layer', initialValue:'revert-layer' is invalid
|
||||
Pass syntax:'default', initialValue:'default' is invalid
|
||||
Pass syntax:'<length>|initial', initialValue:'10px' is invalid
|
||||
Pass syntax:'<length>|INHERIT', initialValue:'10px' is invalid
|
||||
Pass syntax:'<percentage>|unsEt', initialValue:'2%' is invalid
|
||||
Pass syntax:'<color>|REVert', initialValue:'red' is invalid
|
||||
Pass syntax:'<integer>|deFAUlt', initialValue:'1' is invalid
|
||||
Fail syntax:'*', initialValue:'initial' is invalid
|
||||
Fail syntax:'*', initialValue:'inherit' is invalid
|
||||
@@ -205,7 +205,7 @@ Fail syntax:'*', initialValue:'url(moo '')' is invalid
|
||||
Fail syntax:'*', initialValue:'url(moo '')' is invalid
|
||||
Pass syntax:'*', initialValue:'semi;colon' is invalid
|
||||
Fail syntax:'*', initialValue:'var(invalid var ref)' is invalid
|
||||
Fail syntax:'*', initialValue:'var(--foo)' is invalid
|
||||
Fail syntax:'*', initialValue:'var(--foo)' is invalid
|
||||
Pass syntax:'banana', initialValue:'bAnAnA' is invalid
|
||||
Pass syntax:'<length>', initialValue:'var(--moo)' is invalid
|
||||
Pass syntax:'<length>', initialValue:'10' is invalid
|
||||
@@ -223,8 +223,8 @@ Pass syntax:'<percentage>', initialValue:'0' is invalid
|
||||
Pass syntax:'<percentage>', initialValue:'0' is invalid
|
||||
Pass syntax:'<integer>', initialValue:'1.0' is invalid
|
||||
Pass syntax:'<integer>', initialValue:'1e0' is invalid
|
||||
Pass syntax:'<number>|foo', initialValue:'foo var(--foo, bla)' is invalid
|
||||
Fail syntax:'Foo | bar', initialValue:'foo' is invalid
|
||||
Pass syntax:'<number>|foo', initialValue:'foo var(--foo, bla)' is invalid
|
||||
Pass syntax:'Foo | bar', initialValue:'foo' is invalid
|
||||
Pass syntax:'Foo | bar', initialValue:'Bar' is invalid
|
||||
Pass syntax:'<angle>', initialValue:'0' is invalid
|
||||
Pass syntax:'<angle>', initialValue:'10%' is invalid
|
||||
|
||||
Reference in New Issue
Block a user