Bug 246909 - font-style: oblique with calc() should allow out-of-range angles, and clamp them for computed style
Summary: font-style: oblique with calc() should allow out-of-range angles, and clamp t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks: 246579
  Show dependency treegraph
 
Reported: 2022-10-22 20:32 PDT by Tim Nguyen (:ntim)
Modified: 2022-10-24 12:06 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2022-10-22 20:32:02 PDT
`font-style: oblique calc(91deg)` is allowed but should be clamped to `font-style: oblique 90deg`
Ditto for `font-style: oblique calc(-91deg)` 

See: https://drafts.csswg.org/css-values-3/#calc-range

WPT: https://wpt.live/css/css-fonts/variations/font-style-parsing.html
Comment 1 Radar WebKit Bug Importer 2022-10-23 20:48:42 PDT
<rdar://problem/101484863>
Comment 2 Darin Adler 2022-10-23 22:50:40 PDT
This test has incorrect expectations. Either the other browsers need to change or the specification does. The specification says that clamping does not have an effect on specified values, but this test requires that calc(91deg) change into 90deg in a specified value.

imported/w3c/web-platform-tests/css/css-fonts/variations/at-font-face-descriptors.html

{ value: "oblique calc(91deg)",     isValid: true,  expectedValue: "oblique 90deg", description: "'oblique' followed by calc with out of range value (should be clamped)" },
{ value: "oblique calc(-91deg)",    isValid: true,  expectedValue: "oblique -90deg", description: "'oblique' followed by calc with out of range value (should be clamped)" },

Tim, maybe you can help me figure out what to do.
Comment 3 Darin Adler 2022-10-23 23:05:51 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5695
Comment 4 EWS 2022-10-24 12:06:13 PDT
Committed 255925@main (0effe5fb60bb): <https://commits.webkit.org/255925@main>

Reviewed commits have been landed. Closing PR #5695 and removing active labels.