Closed Bug 1097856 Opened 11 years ago Closed 2 years ago

feImage requires SVG images to have non-percentage width and height attributes

Categories

(Core :: SVG, defect)

35 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
relnote-firefox --- 123+
firefox123 --- fixed

People

(Reporter: zeorin, Assigned: longsonr)

Details

Attachments

(4 files, 1 obsolete file)

Attached image blend-svg.svg (obsolete) —
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 Build ID: 20141110194511 Steps to reproduce: User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 Created a filter which multiplies one image with another. One image is the SourceGraphic, which is an image element that xlinks an external JPG. The other is an feImage which xlinks to an external SVG file (just an orange rectangle). NB: possibly related to bug 598204 (although this has nothing to do with document fragments) and probably not related to bug 455986 (the SVG test case in that bug works just fine for me). NB: In the attached example I've used mode="multiply" but changing this mode does not affect the result, which is that the filter is not applied. NB: I also tried this with using the SVG file xlinked in the feImage as base64 data-URI (no difference in result), and using relative, base-relative, and absolute URLs (no difference in result). NB: When using a PNG image xlinked in the feImage, the expected behaviour works just fine. Actual results: Nothing. The filter was not applied. Expected results: The filter should have been applied. Works in Google Chrome 38 (current stable version at this time), and Internet Explorer 11 (current stable version at this time).
Attached image blend-png.svg
When using a PNG xlinked in the feImage instead, it works fine, as this attachment shows.
Correction, the other bugs mentioned should have been as follows: NB: possibly related to bug 455986 (although this has nothing to do with document fragments) and probably not related to bug 598204 (the SVG test case in that bug works just fine for me).
Summary: SVG feBlend doesn't work with an SVG feImage → feImage requires SVG images to have width and height attributes
Similar to bug 700533. Quite possibly the same underlying reason.
Status: UNCONFIRMED → NEW
Ever confirmed: true
The testcase is no longer functional because width and height attributes have been added to the referenced image.
Attached image referenced image
Attachment #8522520 - Attachment mime type: text/plain → image/svg+xml
Attached image testcase
Attachment #8522521 - Attachment mime type: text/plain → image/svg+xml
Attachment #8521557 - Attachment is obsolete: true
Summary: feImage requires SVG images to have width and height attributes → feImage requires SVG images to have non-percentage width and height attributes
Severity: normal → S3
Assignee: nobody → longsonr
Status: NEW → ASSIGNED
Pushed by longsonr@gmail.com: https://hg.mozilla.org/integration/autoland/rev/be0bfc7f9065 use fallback values if width/height cannot be resolved for feImage r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/43826 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
Upstream PR merged by moz-wptsync-bot

Release Note Request (optional, but appreciated)
[Why is this notable]:
Removes one of the restrictions on feImage elements that frequently catches people out.
[Affects Firefox for Android]:
Yes
[Suggested wording]:
Previously SVG feImage elements that pointed to SVG content required the SVG document to have a root element that had non-percentage width and height values. Since SVG root elements default to width and height of 100%, people frequently found that feImage didn't work on Firefox and didn't know why. Such content will now fall back to use the default replaced element values of 300px width and 150px height and the feImage will no longer fail to render.
[Links (documentation, blog post, etc)]:
The following Stack Overflow question shows someone being caught out by this restriction.
https://stackoverflow.com/questions/57750604/cross-browser-svg-animation-with-filter-chrome-works-not-firefox-safari

relnote-firefox: --- → ?
Flags: in-testsuite+

Note added to 123 nightly release notes in the Web Platform section.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: