diff --git a/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp b/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp index 0e158b1e92b..e01dde157de 100644 --- a/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp +++ b/Libraries/LibWeb/CSS/Parser/PropertyParsing.cpp @@ -2974,7 +2974,7 @@ RefPtr Parser::parse_font_style_value(TokenStream? auto transaction = tokens.begin_transaction(); auto keyword_value = parse_css_value_for_property(PropertyID::FontStyle, tokens); - if (!keyword_value) + if (!keyword_value || !keyword_value->is_keyword()) return nullptr; auto font_style = keyword_to_font_style(keyword_value->to_keyword()); VERIFY(font_style.has_value()); diff --git a/Libraries/LibWeb/CSS/Properties.json b/Libraries/LibWeb/CSS/Properties.json index 849ca1da4e3..ca6af83aa60 100644 --- a/Libraries/LibWeb/CSS/Properties.json +++ b/Libraries/LibWeb/CSS/Properties.json @@ -1694,7 +1694,8 @@ "inherited": true, "initial": "normal", "valid-types": [ - "font-style" + "font-style", + "angle [-90,90]" ] }, "font-variant": { diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/animations/font-style-interpolation.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/animations/font-style-interpolation.txt index 3383b93d56c..66d582df394 100644 --- a/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/animations/font-style-interpolation.txt +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-fonts/animations/font-style-interpolation.txt @@ -2,8 +2,8 @@ Harness status: OK Found 129 tests -116 Pass -13 Fail +128 Pass +1 Fail Pass CSS Transitions: property from [normal] to [oblique 10deg] at (-2) should be [oblique -20deg] Pass CSS Transitions: property from [normal] to [oblique 10deg] at (-0.25) should be [oblique -2.5deg] Pass CSS Transitions: property from [normal] to [oblique 10deg] at (0) should be [normal] @@ -108,28 +108,28 @@ Pass Web Animations: property from [oblique 20deg] to [normal] at ( Pass Web Animations: property from [oblique 20deg] to [normal] at (0.5) should be [oblique 10deg] Pass Web Animations: property from [oblique 20deg] to [normal] at (1) should be [normal] Pass Web Animations: property from [oblique 20deg] to [normal] at (1.5) should be [oblique -10deg] -Fail CSS Transitions: property from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg] -Fail CSS Transitions: property from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg] +Pass CSS Transitions: property from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg] +Pass CSS Transitions: property from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg] Pass CSS Transitions: property from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg] Pass CSS Transitions: property from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal] Pass CSS Transitions: property from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg] -Fail CSS Transitions: property from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg] -Fail CSS Transitions with transition: all: property from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg] -Fail CSS Transitions with transition: all: property from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg] +Pass CSS Transitions: property from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg] +Pass CSS Transitions with transition: all: property from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg] +Pass CSS Transitions with transition: all: property from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg] Pass CSS Transitions with transition: all: property from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg] Pass CSS Transitions with transition: all: property from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal] Pass CSS Transitions with transition: all: property from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg] -Fail CSS Transitions with transition: all: property from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg] -Fail CSS Animations: property from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg] -Fail CSS Animations: property from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg] +Pass CSS Transitions with transition: all: property from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg] +Pass CSS Animations: property from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg] +Pass CSS Animations: property from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg] Pass CSS Animations: property from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg] Pass CSS Animations: property from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal] Pass CSS Animations: property from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg] -Fail CSS Animations: property from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg] -Fail Web Animations: property from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg] -Fail Web Animations: property from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg] +Pass CSS Animations: property from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg] +Pass Web Animations: property from [oblique -90deg] to [oblique 90deg] at (-2) should be [oblique -90deg] +Pass Web Animations: property from [oblique -90deg] to [oblique 90deg] at (-1) should be [oblique -90deg] Pass Web Animations: property from [oblique -90deg] to [oblique 90deg] at (0) should be [oblique -90deg] Pass Web Animations: property from [oblique -90deg] to [oblique 90deg] at (0.5) should be [normal] Pass Web Animations: property from [oblique -90deg] to [oblique 90deg] at (1) should be [oblique 90deg] -Fail Web Animations: property from [oblique -90deg] to [oblique 90deg] at (1.5) should be [oblique 90deg] +Pass Web Animations: property 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. \ No newline at end of file