mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 04:59:23 +00:00
LibWeb: Clamp interpolated font-style
angle
This change adds the allowed angle range to the `font-style` property definition. This allows these angles to be clamped after interpolation. Ideally, the generator should be updated so that we can specify the angle is in degrees. This would allow us to make use of this information during parsing, which we can't do currently because we don't know what the unit is. Using this value for interpolation purposes is fine because the angle has been converted to its canonical unit by this point.
This commit is contained in:
parent
9d7689ecd8
commit
27de4fdcea
Notes:
github-actions[bot]
2025-09-24 10:42:06 +00:00
Author: https://github.com/tcl3
Commit: 27de4fdcea
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6284
Reviewed-by: https://github.com/AtkinsSJ ✅
3 changed files with 17 additions and 16 deletions
|
@ -2974,7 +2974,7 @@ RefPtr<StyleValue const> Parser::parse_font_style_value(TokenStream<ComponentVal
|
||||||
// normal | italic | left | right | oblique <angle [-90deg,90deg]>?
|
// normal | italic | left | right | oblique <angle [-90deg,90deg]>?
|
||||||
auto transaction = tokens.begin_transaction();
|
auto transaction = tokens.begin_transaction();
|
||||||
auto keyword_value = parse_css_value_for_property(PropertyID::FontStyle, tokens);
|
auto keyword_value = parse_css_value_for_property(PropertyID::FontStyle, tokens);
|
||||||
if (!keyword_value)
|
if (!keyword_value || !keyword_value->is_keyword())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
auto font_style = keyword_to_font_style(keyword_value->to_keyword());
|
auto font_style = keyword_to_font_style(keyword_value->to_keyword());
|
||||||
VERIFY(font_style.has_value());
|
VERIFY(font_style.has_value());
|
||||||
|
|
|
@ -1694,7 +1694,8 @@
|
||||||
"inherited": true,
|
"inherited": true,
|
||||||
"initial": "normal",
|
"initial": "normal",
|
||||||
"valid-types": [
|
"valid-types": [
|
||||||
"font-style"
|
"font-style",
|
||||||
|
"angle [-90,90]"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"font-variant": {
|
"font-variant": {
|
||||||
|
|
|
@ -2,8 +2,8 @@ Harness status: OK
|
||||||
|
|
||||||
Found 129 tests
|
Found 129 tests
|
||||||
|
|
||||||
116 Pass
|
128 Pass
|
||||||
13 Fail
|
1 Fail
|
||||||
Pass CSS Transitions: property <font-style> from [normal] to [oblique 10deg] at (-2) should be [oblique -20deg]
|
Pass CSS Transitions: property <font-style> from [normal] to [oblique 10deg] at (-2) should be [oblique -20deg]
|
||||||
Pass CSS Transitions: property <font-style> from [normal] to [oblique 10deg] at (-0.25) should be [oblique -2.5deg]
|
Pass CSS Transitions: property <font-style> from [normal] to [oblique 10deg] at (-0.25) should be [oblique -2.5deg]
|
||||||
Pass CSS Transitions: property <font-style> from [normal] to [oblique 10deg] at (0) should be [normal]
|
Pass CSS Transitions: property <font-style> from [normal] to [oblique 10deg] at (0) should be [normal]
|
||||||
|
@ -108,28 +108,28 @@ Pass Web Animations: property <font-style> from [oblique 20deg] to [normal] at (
|
||||||
Pass Web Animations: property <font-style> from [oblique 20deg] to [normal] at (0.5) should be [oblique 10deg]
|
Pass Web Animations: property <font-style> from [oblique 20deg] to [normal] at (0.5) should be [oblique 10deg]
|
||||||
Pass Web Animations: property <font-style> from [oblique 20deg] to [normal] at (1) should be [normal]
|
Pass Web Animations: property <font-style> from [oblique 20deg] to [normal] at (1) should be [normal]
|
||||||
Pass Web Animations: property <font-style> from [oblique 20deg] to [normal] at (1.5) should be [oblique -10deg]
|
Pass Web Animations: property <font-style> from [oblique 20deg] to [normal] at (1.5) should be [oblique -10deg]
|
||||||
Fail CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg]
|
Pass CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg]
|
||||||
Fail CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg]
|
Pass CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg]
|
||||||
Pass CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg]
|
Pass CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg]
|
||||||
Pass CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal]
|
Pass CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal]
|
||||||
Pass CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg]
|
Pass CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg]
|
||||||
Fail CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg]
|
Pass CSS Transitions: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg]
|
||||||
Fail CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg]
|
Pass CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg]
|
||||||
Fail CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg]
|
Pass CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg]
|
||||||
Pass CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg]
|
Pass CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg]
|
||||||
Pass CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal]
|
Pass CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal]
|
||||||
Pass CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg]
|
Pass CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg]
|
||||||
Fail CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg]
|
Pass CSS Transitions with transition: all: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg]
|
||||||
Fail CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg]
|
Pass CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg]
|
||||||
Fail CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg]
|
Pass CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg]
|
||||||
Pass CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg]
|
Pass CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg]
|
||||||
Pass CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal]
|
Pass CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal]
|
||||||
Pass CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg]
|
Pass CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg]
|
||||||
Fail CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg]
|
Pass CSS Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg]
|
||||||
Fail Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg]
|
Pass Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg]
|
||||||
Fail Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg]
|
Pass Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg]
|
||||||
Pass Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg]
|
Pass Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg]
|
||||||
Pass Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal]
|
Pass Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal]
|
||||||
Pass Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg]
|
Pass Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg]
|
||||||
Fail Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg]
|
Pass Web Animations: property <font-style> from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg]
|
||||||
Fail An interpolation to inherit updates correctly on a parent style change.
|
Fail An interpolation to inherit updates correctly on a parent style change.
|
Loading…
Add table
Add a link
Reference in a new issue