Canvas shadowBlur broken for fillText in Firefox 49

RESOLVED DUPLICATE of bug 1304539

Status

()

defect
RESOLVED DUPLICATE of bug 1304539
3 years ago
3 years ago

People

(Reporter: dylanwenzlau, Unassigned)

Tracking

({regression})

49 Branch
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox49 wontfix, firefox-esr45 unaffected, firefox50- fixed, firefox51- fixed, firefox52- fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

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

Steps to reproduce:

tried to use imgflip.com/memegenerator with the "use font shadow" option checked, which normally produces a nice shadow behind the white Impact font. The option uses context.shadowBlur and context.shadowColor as defined in the latest canvas spec on mozilla's website (aka it's not a deprecated or weird usage).


Actual results:

Shadow stopped working on the font (which is added with context.fillText) when Firefox was upgraded to version 49. It still works on Chrome and other browsers.


Expected results:

Font renders with standard shadow applied
(Reporter)

Comment 1

3 years ago
The bug can be trivially reproduced here: https://codepen.io/anon/pen/NRgxZA

Then put this little snippet into the textarea:

ctx.shadowColor = "black";
ctx.shadowBlur = '10px';
ctx.fillStyle = "red";
ctx.font = '20px arial';
ctx.fillText('Derp', 20, 20);
related to bug 1304539 perhaps

Comment 3

3 years ago
Regression Window:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=15359139459812abed51ce740a819624f1d8de2d&tochange=51b1f2343ad9544921e68859dfbe9d3c79b00951

Regressed by: 	8465a41d5bff	Jonathan Kew — Bug 1274936 - When <canvas> fillText is using a simple color, draw via the gfxTextRun::Draw code path to get support for COLR and SVG-in-OT fonts. r=bas

Comment 4

3 years ago
[Tracking Requested - why for this release]:
Blocks: 1274936
Status: UNCONFIRMED → NEW
Component: Untriaged → Canvas: 2D
Ever confirmed: true
Flags: needinfo?(jfkthame)
Keywords: regression
(In reply to Robert Longson from comment #2)
> related to bug 1304539 perhaps

Sounds likely. There's an r+'d patch there which should be landing soon; let's see if that helps.

Marking as "depends" to keep track of it for now, though I suspect we may be able to just resolve it as a dupe, after testing.
Depends on: 1304539
Flags: needinfo?(jfkthame)

Comment 6

3 years ago
I have encountered the same issue, I brought it up on Bug 1173545.
Here is an example of my use case https://jsfiddle.net/ishmael_readingplus/hag1tc99/.
The behavior is consistent in IE 10+, Chrome, Safari, and FF < 49.

Comment 7

3 years ago
It's not just shadow blur, no shadow is drawn for fillText what so ever. See: http://karellodewijk.github.io/canvas-webgl/test/canvas_bug.html. It's a pretty major regression bug if you ask me.
Tracking 52+ for this regression.
This is fixed (by bug 1304539), according to my testing. Please re-open if it still reproduces on current builds.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1304539
(Reporter)

Comment 10

3 years ago
I'm very curious about the fact that this was marked as "wontfix" for Firefox 49. I'm not familiar with the Firefox development process, but to me personally as a developer, this is the type of core bug that I would wake up in the middle of the night while on vacation and patch immediately. It's a core part of the browser that is just straight up broken.
This was fixed pretty quickly (within a matter of days) after being reported. It's "wontfix" for Firefox 49 because Fx49 has already shipped, and while this is clearly a bug, it's not such a critical issue that it justifies rushing a patch out to a few hundred million users, entirely short-circuiting the normal testing and release process.

The fix for this is on track to ship in Firefox 50, which is due to go out to users in a few weeks (or you should be able to get it through the Beta channel, https://www.mozilla.org/en-US/firefox/channel/#beta -- I'd guess sometime this week, though I don't know the exact schedule there).
You need to log in before you can comment on or make changes to this bug.