Open Bug 1615138 Opened 4 years ago Updated 2 years ago

canvas + no alpha + object-fit causes paint corruption

Categories

(Core :: Graphics: Canvas2D, defect, P2)

Desktop
macOS
defect

Tracking

()

People

(Reporter: jaffathecake, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36

Steps to reproduce:

https://static-misc-2.glitch.me/moz-canvas-bug/

Scroll down the page (past the canvas).

Spotted in stable and nightly.

Actual results:

Visual corruption.

Expected results:

Other browsers seem to treat the area within the canvas element that isn't paintable (due to scaling) as transparent.

I agree it's a little confusing given alpha: false, but it seems to be the most sensible thing to do.

It doesn't feel like a security issue - I can't access the corrupted pixel data.

Fwiw I can't recreate this on Android. It happens on Mac. Not tested other platforms.

Can you attach your about:support and a screenshot of what you see in Firefox vs what you expected to see in Chrome? Thanks!

Flags: needinfo?(jaffathecake)
Attached file about:support
Video of bug https://youtu.be/ykHWKadFE1A.

about:support

I feel like there is an old existing bug on a similar problem but I can't find it.

I was unable to reproduce on Windows/Linux, WR/non-WR. I guess it is Mac specific. If you disable hardware acceleration, does it go away?

Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Unspecified → macOS
Hardware: Unspecified → Desktop

Also, if you force enable WebRender via the gfx.webrender.all pref, can you still reproduce? Thanks!

If I disable hardware acceleration, the scrolling bug disappears, although the there's a small glitch with the initial render. https://youtu.be/g_ONAx1RvDk

With gfx.webrender.all set to true, the bug goes away entirely (it behaves the same as Chrome).

Flags: needinfo?(jaffathecake)
Priority: -- → P2

Regressed by bug 1574538 but that's probably just because we weren't drawing into these pixels all along and Core Animation made that appear worse.

Regressed by: 1574538
Has Regression Range: --- → yes
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: