Closed
Bug 1377792
Opened 7 years ago
Closed 3 years ago
2D context clip() ignored when shadow properties are assigned
Categories
(Core :: Graphics: Canvas2D, defect, P3)
Tracking
()
RESOLVED
DUPLICATE
of bug 1758968
Tracking | Status | |
---|---|---|
firefox57 | --- | fix-optional |
People
(Reporter: bplu4t2f, Unassigned)
Details
(Whiteboard: [gfx-noted])
Attachments
(1 file)
(deleted),
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170628075643
Steps to reproduce:
On this example page:
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_canvas_clip
Add
ctx.shadowColor = "rgba(0, 0, 0, 0.6)";
ctx.shadowBlur = 10;
Immediately after "var ctx = ..." in the "with clip()" example to produce the following script:
var c = document.getElementById("myCanvas2");
var ctx = c.getContext("2d");
ctx.shadowColor = "rgba(0, 0, 0, 0.6)";
ctx.shadowBlur = 10;
ctx.rect(50, 20, 200, 120);
ctx.stroke();
ctx.clip();
// Draw red rectangle after clip()
ctx.fillStyle = "red";
ctx.fillRect(0, 0, 150, 100);
Interestingly, the bug doesn't happen when you move the shadow property assignments between stroke() and clip(), or after clip().
Even more interestingly, adding these lines before the very last fillRect() call will cause the bug to go away:
ctx.shadowBlur = 0;
ctx.fillRect(0, 0, 0, 0);
ctx.shadowBlur = 10;
Actual results:
The bug will cause the clip() call to have no effect on the subsequent fillRect() call.
Expected results:
clip() should be unaffected by previous shadow settings.
Updated•7 years ago
|
Component: Untriaged → Canvas: 2D
Product: Firefox → Core
Comment 1•7 years ago
|
||
I was not able to reproduce this on Arch Linux, but I was able to on Windows.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [gfx-noted]
Comment 2•7 years ago
|
||
I ran mozregression to get a regression window:
3:14.47 INFO: Last good revision: 688f821edcd4 (2014-11-12)
3:14.48 INFO: First bad revision: ab137ddd3746 (2014-11-13)
3:14.48 INFO: Pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=688f821edcd4&tochange=ab137ddd3746
...
6:16.18 INFO: There are no build artifacts on inbound for these changesets (they are probably too old).
Updated•7 years ago
|
Priority: -- → P3
Updated•7 years ago
|
status-firefox57:
--- → fix-optional
Version: 54 Branch → 36 Branch
Updated•3 years ago
|
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•