Closed
Bug 1399942
Opened 8 years ago
Closed 8 years ago
Paul Irish's SVG avatar is missing plaid on his shirt (drawn using feTurbulence filter)
Categories
(Core :: SVG, defect, P3)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla57
People
(Reporter: dholbert, Assigned: longsonr)
References
()
Details
(Keywords: regression, testcase)
Attachments
(4 files, 2 obsolete files)
STR:
1. Visit https://perfmattersconf.com/
2. Look at the rightmost of the three little avatar people (Paul Irish)
EXPECTED RESULTS:
His shirt should be plaid.
ACTUAL RESULTS:
His shirt is just plain gray.
Chrome 63 dev, inkskape, and Emacs both give "expected results".
Firefox gives "actual results".
Partially reduced testcase attached.
| Reporter | ||
Comment 1•8 years ago
|
||
| Reporter | ||
Updated•8 years ago
|
Attachment #8908219 -
Attachment description: test.svg → testcase 1
| Reporter | ||
Updated•8 years ago
|
Attachment #8908223 -
Attachment description: testcase 2 → testcase 2 (expecting a gray blur overlay)
| Reporter | ||
Comment 2•8 years ago
|
||
Sorry, I'll spin comment 1's testcase off as a separate bug. It's an unrelated issue that I stumbled into while minimizing the original testcase (we seem to reject filter chains if there's an unrecognized source ID)
| Reporter | ||
Comment 3•8 years ago
|
||
Attachment #8908223 -
Attachment is obsolete: true
| Reporter | ||
Updated•8 years ago
|
Attachment #8908223 -
Attachment description: testcase 2 (expecting a gray blur overlay) → (disregard; testcase showing unrelated issue)
| Reporter | ||
Updated•8 years ago
|
Priority: -- → P3
| Reporter | ||
Updated•8 years ago
|
Summary: Paul Irish's SVG avatar is missing plaid on his shirt (drawn using filters) → Paul Irish's SVG avatar is missing plaid on his shirt (drawn using feTurbulence filter)
| Reporter | ||
Comment 4•8 years ago
|
||
So the testcase uses this turbulence filter:
<feTurbulence baseFrequency="0 0.19"/>
I think the issue is with the "0" value there. If I replace that with some nonzero value (say, 0.1), then the filter actually shows up (with blobs rather than lines).
Here's the spec text on that attribute:
https://www.w3.org/TR/SVG11/filters.html#feTurbulenceBaseFrequencyAttribute
0 values are valid, and in this case (with 2 values), it represents the frequency in the "X" direction, and I think it means there's no variability on that axis, hence there being horizontal lines (same color for all x values) in browsers where this works:
| Reporter | ||
Comment 5•8 years ago
|
||
| Reporter | ||
Comment 6•8 years ago
|
||
This is a regression, albeit an old-ish one. A 2013-01-01 nightly gives expected results. Based on blame on the "SVGTurbulenceRenderer" class, I wonder if this regressed from bug 924102?
Keywords: regression
| Reporter | ||
Comment 7•8 years ago
|
||
Yup -- regression range:
Last good revision: 6ecf0c4dfcbe (2013-11-27)
First bad revision: 3c44c1f43a67 (2013-11-28)
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6ecf0c4dfcbe&tochange=3c44c1f43a67
Regression from bug 924102 (Firefox 28 era).
Blocks: 924102
status-firefox55:
--- → affected
status-firefox56:
--- → affected
status-firefox-esr52:
--- → affected
| Assignee | ||
Comment 8•8 years ago
|
||
Assignee: nobody → longsonr
Attachment #8908339 -
Flags: review?(dholbert)
| Reporter | ||
Comment 9•8 years ago
|
||
Comment on attachment 8908339 [details] [diff] [review]
patch
Wow, is it really this simple? :D Nice!
Could you include a reftest? Perhaps a "!= foo.svg about:blank" reftest, if it's too hard to make a reference case. (My attached testcases 2 and 3 render blank in affected Firefox versions, I think, aside from the explicit un-filtered yellow div or <text> -- so !=about:blank should work at catching the bug.)
| Assignee | ||
Comment 10•8 years ago
|
||
Attachment #8908339 -
Attachment is obsolete: true
Attachment #8908339 -
Flags: review?(dholbert)
Attachment #8908344 -
Flags: review?(dholbert)
| Reporter | ||
Comment 11•8 years ago
|
||
Comment on attachment 8908344 [details] [diff] [review]
patch with reftest
Review of attachment 8908344 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks! r=me
Attachment #8908344 -
Flags: review?(dholbert) → review+
Updated•8 years ago
|
| Assignee | ||
Comment 12•8 years ago
|
||
Comment 13•8 years ago
|
||
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/830a612d662c
feTurbulence filter should only do nothing if baseFreq is zero in dx and dy r=dholbert
| Assignee | ||
Updated•8 years ago
|
Flags: in-testsuite+
Comment 14•8 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Updated•8 years ago
|
Comment 15•8 years ago
|
||
This patch causes us to divide by zero, just after the if {}:
gfxRect firstPeriodInUserSpace(0, 0, 1 / fX, 1 / fY);
gfxRect firstPeriodInFilterSpace = aInstance->UserSpaceToFilterSpace(firstPeriodInUserSpace);
Size frequencyInFilterSpace(1 / firstPeriodInFilterSpace.width,
1 / firstPeriodInFilterSpace.height);
Was this intentional? It seems to work out the way we need to, but it would be nice to find a solution that does not rely on dividing by zero and dividing by infinity.
Flags: needinfo?(longsonr)
Comment 16•8 years ago
|
||
I have a fix in mind and will put it up for review in a new bug.
Flags: needinfo?(longsonr)
You need to log in
before you can comment on or make changes to this bug.
Description
•