Arc with setLineDash sometimes draws thick, solid line
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | wontfix |
| firefox133 | --- | wontfix |
| firefox134 | --- | fixed |
| firefox135 | --- | fixed |
People
(Reporter: joelspadin, Assigned: lsalzman)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
|
20.73 KB,
image/png
|
Details | |
|
1.46 KB,
text/html
|
Details | |
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Steps to reproduce:
When ctx.setLineDash() is followed by ctx.arc(), and when using specific values of radius and line width, the arc draws incorrectly. It is significantly thicker than requested, and the values given to setLineDash() affect what is drawn in seemingly unpredictable ways.
See this reproduction: https://jsbin.com/levibaseyi/2/edit?js,output
This reproduction code is based on the Konva library, where I first discovered the issue (https://github.com/konvajs/konva/issues/1864). I found this through a bug report on an application that uses Konva (https://github.com/joelspadin/xivplan/issues/35).
Actual results:
Firefox draws an arc with a much thicker line than requested, and which has a dash pattern that does not match the requested sizes.
Expected results:
Firefox draws a circle with a thin, dashed line.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
|
||
Comment 3•1 year ago
|
||
Can repro. Repros only on gpu-canvas (works correctly with skia-canvas and d2d-canvas).
Suspect: Bug 1829026
Comment 4•1 year ago
|
||
Set release status flags based on info from the regressing bug 1829026
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
When drawing arcs or similar constructs that may have a path transform to implement
scaling, this scaling may inadvertently alter stroke options such as line width or
dashes. We need to ensure that we don't apply this scaling from the path transform
to stroke options.
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Comment 8•1 year ago
|
||
Might be a good dot release ride-along candidate.
| Assignee | ||
Comment 9•1 year ago
|
||
Comment on attachment 9444484 [details]
Bug 1937929 - Avoid applying path transform to stroke options.
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: Buggy arc rendering in Accelerated Canvas2D.
- Is this code covered by automated tests?: Unknown
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Just a simple one line bug workaround.
- String changes made/needed:
- Is Android affected?: Yes
Comment 10•1 year ago
|
||
Comment on attachment 9444484 [details]
Bug 1937929 - Avoid applying path transform to stroke options.
Approved for 134 RC1.
Updated•1 year ago
|
Comment 11•1 year ago
|
||
| uplift | ||
Description
•