WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
244254
ConicGradient angle should start at the x-axis, not at the top
https://bugs.webkit.org/show_bug.cgi?id=244254
Summary
ConicGradient angle should start at the x-axis, not at the top
Fernando Serboncini
Reported
2022-08-23 08:13:51 PDT
Here's the latest discussion about it on WhatWG:
https://github.com/whatwg/html/pull/8213
Here's the relevant spec:
https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-createconicgradient
And the broken WPT:
https://wpt.fyi/results/html/canvas/element/fill-and-stroke-styles?label=master&label=experimental&aligned&view=subtest&q=canvas%20conic
This means that the angle on ConicGradient needs to be +PI/4 to match the rest of the Canvas API.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-08-23 10:55:36 PDT
<
rdar://problem/99041207
>
Karl Dubost
Comment 2
2022-08-24 00:50:59 PDT
according to the PR
https://github.com/whatwg/html/pull/8213
> The current implementations on Safari and Firefox align the angle with CSS. Chrome's implementation and the current spec doesn't. An example of the problem is described here with this code.
So Safari and Firefox behaves correctly and Chrome is being changed.
https://bugs.chromium.org/p/chromium/issues/detail?id=1355539
Is there something to fix on WebKit?
Karl Dubost
Comment 3
2022-08-24 01:15:25 PDT
Never mind. A but has been opened on Firefox and WebKit to encourage them to change.
https://github.com/whatwg/html/pull/8213#issuecomment-1223436129
Myles C. Maxfield
Comment 4
2022-08-27 20:27:04 PDT
Will this be a breaking change?
Vitor Roriz
Comment 5
2022-08-29 14:56:08 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/3784
Vitor Roriz
Comment 6
2022-08-29 15:00:20 PDT
> This means that the angle on ConicGradient needs to be +PI/4 to match the rest of the Canvas API.
I believe this is a typo and it should be 90 deg (+pi/2), right?
Fernando Serboncini
Comment 7
2022-08-29 15:02:24 PDT
yes, yes, sorry for that. You are correct, pi/2.
Vitor Roriz
Comment 8
2022-08-29 15:19:51 PDT
I can't yet update our expected files for the related WPT tests (
https://wpt.fyi/results/html/canvas/element/fill-and-stroke-styles?label=master&label=experimental&aligned&view=subtest&q=canvas%20conic
) because they are using pixel assertion without any tolerance. A tolerance of 1 would be enough, since we diverge in some assertions in +-1 for some channels. However, the divergence is not related to this bug so we need to create a new one investigate and update the tests, and/or create an issue in WPT for allowing tolerance.
Fernando Serboncini
Comment 9
2022-08-31 08:04:55 PDT
Hey, I've just updated the WPT tests to include some tolerance:
https://github.com/web-platform-tests/wpt/pull/35716
please let me know if this works for you.
Vitor Roriz
Comment 10
2022-09-01 05:24:28 PDT
That's great, I've imported them now and add to the PR. Thank you!
EWS
Comment 11
2022-09-01 06:34:01 PDT
Committed
254038@main
(cf0a117f4760): <
https://commits.webkit.org/254038@main
> Reviewed commits have been landed. Closing PR #3784 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug