Skip to content
Permalink
Browse files
font-style: oblique must allow angles equal to 90deg or -90deg
https://bugs.webkit.org/show_bug.cgi?id=246901
rdar://101461149

Reviewed by Alan Bujtas and Darin Adler.

* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/variations/font-parse-numeric-stretch-style-weight-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/variations/font-style-parsing-expected.txt:
* Source/WebCore/css/parser/CSSPropertyParserHelpers.h:
(WebCore::CSSPropertyParserHelpers::isFontStyleAngleInRange):

Canonical link: https://commits.webkit.org/255875@main
  • Loading branch information
nt1m committed Oct 22, 2022
1 parent cd16428 commit 817e48d200576ca3a12a2c5928825725ffec05cd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
@@ -69,8 +69,8 @@ PASS font-style(invalid): 'italic' followed by angle: italic 20deg
PASS font-style(invalid): Extra content after keyword: italic a
PASS font-style(valid): 'oblique' followed by zero degrees: oblique 0deg
FAIL font-style(valid): 'oblique' followed by default 20deg angle: oblique 20deg assert_equals: Unexpected resulting value. expected "oblique" but got "oblique 20deg"
FAIL font-style(valid): 'oblique' followed by maxumum 90 degree angle: oblique 90deg assert_not_equals: Valid value should be accepted. got disallowed value ""
FAIL font-style(valid): 'oblique' followed by minimum -90 degree angle: oblique -90deg assert_not_equals: Valid value should be accepted. got disallowed value ""
PASS font-style(valid): 'oblique' followed by maxumum 90 degree angle: oblique 90deg
PASS font-style(valid): 'oblique' followed by minimum -90 degree angle: oblique -90deg
FAIL font-style(valid): 'oblique' followed by calc with out of range value (should be clamped): oblique calc(91deg) assert_not_equals: Valid value should be accepted. got disallowed value ""
FAIL font-style(valid): 'oblique' followed by calc with out of range value (should be clamped): oblique calc(-91deg) assert_not_equals: Valid value should be accepted. got disallowed value ""
FAIL font-style(valid): 'oblique' followed by angle in radians: oblique 0rad assert_equals: Unexpected resulting value. expected "oblique 0deg" but got "oblique 0rad"
@@ -16,8 +16,8 @@ PASS Valid value normal for font property style used for styling.
PASS Valid value italic for font property style used for styling.
PASS Valid value oblique for font property style used for styling.
PASS Valid value oblique 50deg for font property style used for styling.
FAIL Valid value oblique -90deg for font property style used for styling. assert_true: expected true got false
FAIL Valid value oblique 90deg for font property style used for styling. assert_true: expected true got false
PASS Valid value oblique -90deg for font property style used for styling.
PASS Valid value oblique 90deg for font property style used for styling.
FAIL Valid value oblique calc(90deg + 20deg) for font property style used for styling. assert_true: expected true got false
PASS Valid value oblique calc(30deg + 20deg) for font property style used for styling.
PASS Invalid value 100 400 for font property weight used for styling.
@@ -11,8 +11,8 @@ PASS Font-style (supports): 'oblique' followed by positive angle in turns is val
PASS Font-style (supports): 'oblique' followed by number with invalid unit type is in valid
PASS Font-style (supports): 'oblique' followed by negative angle is valid
PASS Font-style (supports): 'oblique' followed by fractional angle is valid
FAIL Font-style (supports): 'oblique' followed by maxumum 90 degree angle is valid assert_equals: Font-style supports: 'oblique' followed by maxumum 90 degree angle is valid expected true but got false
FAIL Font-style (supports): 'oblique' followed by minimum -90 degree angle is valid assert_equals: Font-style supports: 'oblique' followed by minimum -90 degree angle is valid expected true but got false
PASS Font-style (supports): 'oblique' followed by maxumum 90 degree angle is valid
PASS Font-style (supports): 'oblique' followed by minimum -90 degree angle is valid
PASS Font-style (supports): 'oblique' followed by positive out of range angle is in invalid
PASS Font-style (supports): 'oblique' followed by negative out of range angle is in invalid
PASS Font-style (supports): 'oblique' followed by unit-less value is invalid
@@ -35,8 +35,8 @@ PASS Font-style (computed): 'oblique' followed by positive angle in gradians is
PASS Font-style (computed): 'oblique' followed by positive angle in turns is valid
PASS Font-style (computed): 'oblique' followed by negative angle is valid
PASS Font-style (computed): 'oblique' followed by fractional angle is valid
FAIL Font-style (computed): 'oblique' followed by maxumum 90 degree angle is valid assert_equals: Font-style computed style: 'oblique' followed by maxumum 90 degree angle is valid expected "oblique 90deg" but got "normal"
FAIL Font-style (computed): 'oblique' followed by minimum -90 degree angle is valid assert_equals: Font-style computed style: 'oblique' followed by minimum -90 degree angle is valid expected "oblique -90deg" but got "normal"
PASS Font-style (computed): 'oblique' followed by maxumum 90 degree angle is valid
PASS Font-style (computed): 'oblique' followed by minimum -90 degree angle is valid
PASS Font-style (computed): 'oblique' followed by positive angle is valid
PASS Font-style (computed): 'oblique' followed by calc is valid
FAIL Font-style (computed): 'oblique' followed by calc is valid even if it must be clamped (no computation) assert_equals: Font-style computed style: 'oblique' followed by calc is valid even if it must be clamped (no computation) expected "oblique -90deg" but got "normal"
@@ -246,7 +246,7 @@ template<CSSValueID... names> RefPtr<CSSPrimitiveValue> consumeIdentWorkerSafe(C

inline bool isFontStyleAngleInRange(double angleInDegrees)
{
return angleInDegrees > -90 && angleInDegrees < 90;
return angleInDegrees >= -90 && angleInDegrees <= 90;
}

inline bool isSystemFontShorthand(CSSValueID valueID)

0 comments on commit 817e48d

Please sign in to comment.