Bug 285142
| Summary: | Fix font-style-interpolation.html WPT to expect `oblique 0deg` instead of `normal` | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
| Component: | CSS | Assignee: | Tim Nguyen (:ntim) <ntim> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | graouts, koivisto, ntim, sam, webkit-bug-importer |
| Priority: | P2 | Keywords: | GoodFirstBug, InRadar, WPTImpact |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | https://wpt.fyi/results/css/css-fonts/animations/font-style-interpolation.html | ||
| See Also: | https://github.com/web-platform-tests/wpt/pull/49892 | ||
Karl Dubost
On Bug 258510, failures were fixed by Antoine.
https://wpt.fyi/results/css/css-fonts/animations/font-style-interpolation.html?label=master&label=experimental&aligned&q=font-style
Some asserts are failing.
assert_equals: expected "normal " but got "oblique 0deg "
It was regressed by
https://github.com/WebKit/WebKit/commit/ea0e8115cda32876124dc327f488b465e7041b0d
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
> It was regressed by
> https://github.com/WebKit/WebKit/commit/ea0e8115cda32876124dc327f488b465e7041b0d
That's https://commits.webkit.org/283851@main
Radar WebKit Bug Importer
<rdar://problem/142226848>
Tim Nguyen (:ntim)
You could fix this by making ComputedStyleExtractor return `CSSPrimitiveValue::create(CSSValueNormal)` when the angle is 0deg:
https://searchfox.org/wubkat/rev/334d5acc1496f43ce5ffbc3abc190f145f9add1a/Source/WebCore/css/ComputedStyleExtractor.cpp#2557-2563
Sam Weinig
My reading of the spec is that 0deg oblique is correct.
Per https://drafts.csswg.org/css-fonts-4/#font-weight-prop, Animation Type is spec'd to "by computed value type;normal animates as oblique 0deg".
Tim Nguyen (:ntim)
(In reply to Sam Weinig from comment #4)
> My reading of the spec is that 0deg oblique is correct.
>
> Per https://drafts.csswg.org/css-fonts-4/#font-weight-prop, Animation Type
> is spec'd to "by computed value type;normal animates as oblique 0deg".
Indeed: https://github.com/w3c/csswg-drafts/issues/2505
The computed value should be left alone, and only the interpolation should use `oblique 0deg`.
https://drafts.csswg.org/css-fonts-4/#font-style-prop
We should probably update the WPT then.
Tim Nguyen (:ntim)
Arguably `normal` is the shorter serialization for `oblique 0deg` so my suggested change might be reasonable, but more as a general serialization rule rather than an interpolation specific one.
Sam Weinig
Updating the tests makes the most sense to me.
Tim Nguyen (:ntim)
Pull request: https://github.com/WebKit/WebKit/pull/38475
Tim Nguyen (:ntim)
Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/49892
Tim Nguyen (:ntim)
Pull request: https://github.com/WebKit/WebKit/pull/38481
EWS
Committed 288388@main (4cb01b5b4562): <https://commits.webkit.org/288388@main>
Reviewed commits have been landed. Closing PR #38481 and removing active labels.