canvas2d clearRect ignores clipping region




2 years ago
5 months ago


(Reporter: neil.morrison44, Unassigned)


({regression, testcase})

44 Branch
Mac OS X
regression, testcase

Firefox Tracking Flags

(firefox44- wontfix, firefox45- wontfix, firefox46 fixed, firefox-esr38 unaffected)


(Whiteboard: gfx-noted)



2 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36

Steps to reproduce:

within a canvas 2d context, begin a path, draw an arc, then clip(), clearRect an area containing the clipped region.

FireFox 44.0.2 on OSX El Capitan version 10.11.3

Actual results:

The entirety of the canvas will be cleared, not just the rect defined in clearRect.

Expected results:

The cleared area should have been limited to the clipped region.
(as happens in Chrome, Safari, IE etc)


2 years ago
Component: Untriaged → Canvas: 2D
Keywords: testcase
Product: Firefox → Core


2 years ago
Version: 44 Branch → unspecified
Possibly same issue as bug 1248525.

it's already fixed in firefox 46, but firefox 44 and 45 are affected.

Regression range:

and fixed by bug 1082598:
status-firefox44: --- → affected
status-firefox45: --- → affected
status-firefox46: --- → fixed
status-firefox-esr38: --- → unaffected
Component: Canvas: 2D → Graphics
Keywords: regression
OS: Unspecified → Mac OS X
[Tracking Requested - why for this release]: regression from enabling SkiaGL on Mac OS X (bug 1150944) and fixed with a Skia update in Firefox 46. As highlighted in bug 1248525 this is probably too risky to uplift and the alternative is turning off SkiaGL in Beta/Release. The work around is to simply use Developer Edition.
Blocks: 1150944
tracking-firefox44: --- → ?
tracking-firefox45: --- → ?
Whiteboard: gfx-noted
Version: unspecified → 44 Branch
Ever confirmed: true
Same as in bug 1248525
status-firefox44: affected → wontfix
status-firefox45: affected → wontfix
tracking-firefox44: ? → -
tracking-firefox45: ? → -
(In reply to Sylvestre Ledru [:sylvestre] from comment #3)
> Same as in bug 1248525

Noting here as well that I had looked into this. I could not manage to isolat ea simple fix to backport for this one from the Skia update. So I agree on waiting for 46 for the fix to come in.

Comment 5

2 years ago
I have seen this in Firefox 44 and 45 with this simple use case: It should show a red square with two overlapping white squares in the top left corner. But in firefox on two macs it just shows a white square. (but not on my linux machine).

the user agents and graphics cards for the machines I saw it on are below:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Firefox/45.0
AMD Radeon HD 6750M 512 MB

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:44.0) Gecko/20100101 Firefox/44.0
Intel HD Graphics 5000 (1536 MB VRAM)

Comment 6

2 years ago
A workaround that worked for me, is using globalCompositeOperation = 'destination-out' and using fillRect instead of clearRect.
Priority: -- → P3
Fixed since long ago in 46 with Skia update, and older branches than that are wontfix, so just closing this out.
Last Resolved: 5 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.