Last clearRect region is used when setting width and height
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr128 | --- | unaffected |
firefox137 | --- | wontfix |
firefox138 | --- | fixed |
firefox139 | --- | fixed |
People
(Reporter: caleb, Assigned: lsalzman)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15
Steps to reproduce:
https://jsfiddle.net/w5e89aLm/
Steps:
- canvas.width = canvas.width; canvas.height = canvas.height;
- Translate to some negative offset in both x and y
- ctx.clearRect(0, 0, canvas.width, canvas.height)
- Draw something into the main canvas area that negates the offset.
- Repeat several (3?) times, moving the thing being drawn in the negative directions so you can see if anything is leftover on the right (meaning it used the clearRect region from 2).
I couldn't reduce it any further. It seems this specific sequence has to happen a few times before it kicks in.
This used to work. I know for a fact Firefox 130 passes the test.
Actual results:
I should never see artifacts from the last paint after I set canvas.width and canvas.height. Safari and Chrome pass the test.
Expected results:
Saw pixels leftover from the last paint.
Comment 1•6 months 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•6 months ago
|
||
If it used to work would you mind using https://mozilla.github.io/mozregression/ to get a regression range?
Updated•6 months ago
|
Comment 4•6 months ago
|
||
:lsalzman, since you are the author of the regressor, bug 1950596, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Assignee | ||
Updated•6 months ago
|
Assignee | ||
Comment 5•6 months ago
|
||
CurrentState().transform is only reliably set for save/restore ops, so isn't save to
check for evaluating coverage in EnsureTarget. This change uses GetCurrentTransform
instead which will always give the correct, most up-to-date transform to use.
Updated•6 months ago
|
Comment 6•6 months ago
|
||
Set release status flags based on info from the regressing bug 1950596
Comment 8•6 months ago
|
||
bugherder |
Assignee | ||
Comment 9•6 months ago
|
||
Comment on attachment 9478486 [details]
Bug 1959815 - Use most up-to-date transform for evaluating target coverage. r?aosmond
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: Incorrect Canvas2D drawing.
- 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):
- String changes made/needed:
- Is Android affected?: Yes
Comment 10•6 months ago
|
||
Comment on attachment 9478486 [details]
Bug 1959815 - Use most up-to-date transform for evaluating target coverage. r?aosmond
Approved for 138.0b7
Comment 11•6 months ago
|
||
uplift |
Updated•6 months ago
|
Updated•6 months ago
|
Description
•