Closed Bug 1240357 Opened 8 years ago Closed 8 months ago

Support crossOrigin attribute on image and feImage elements


(Core :: SVG, enhancement)




114 Branch
Tracking Status
firefox114 --- fixed


(Reporter: longsonr, Assigned: longsonr)


(Blocks 1 open bug, Regressed 1 open bug)


(Keywords: dev-doc-complete)


(1 file, 3 obsolete files)

      No description provided.
Assignee: nobody → longsonr
Attached patch WIP (obsolete) — Splinter Review
Cam, is the SVG specification right? It says 

attribute DOMString crossOrigin;

but the html DOM in gecko (and my WIP patch) has

attribute DOMString? crossOrigin;
Flags: needinfo?(cam)
Checking the HTML spec, it looks like it should indeed be "DOMString?".  I've updated the spec:
Flags: needinfo?(cam)
(In fact the HTML spec changed underneath us.)
Attached patch working patch (obsolete) — Splinter Review
Attachment #8708824 - Attachment is obsolete: true
This seems to work but I don't know how to write an automated test for it. Any suggestions?
Flags: needinfo?(dholbert)
I imagine the tricky part of the automated test is the cross-origin part, right?
That's explained a bit here:

I'd expect you want to write a mochitest which...
 * ...uses SVG in an iframe and snapshotWindow to see whether stuff rendered or not, like this test:

 * ...uses an <image> & <feImage> that point to '', which the mochitest web server will recognize and map to your source tree, like in these tests:

A few other thoughts:
 * Promises make the iframe load callbacks a bit easier to follow.  If you're not too familiar with promises, feel free to crib from my test_use_with_hsts.html test and ping me with questions. Or, traditional async callbacks shouldn't be too complex either.
 * For robustness, your SVG file (or SVG files) should include both elements (<feImage> & <image>), with the crossOrigin attribute present & not-present.
Flags: needinfo?(dholbert)
Blocks: svg2
Attached patch 1240357.txt (obsolete) — Splinter Review
Attachment #8709662 - Attachment is obsolete: true

Sorry, there was a problem with the detection of inactive users. I'm reverting the change.

Assignee: nobody → longsonr
Severity: normal → S3
Attachment #9073146 - Attachment is obsolete: true
Pushed by
Support crossOrigin attribute on image and feImage elements r=emilio
Created web-platform-tests PR for changes under testing/web-platform/tests
Upstream PR was closed without merging
Pushed by
Support crossOrigin attribute on image and feImage elements r=emilio
Flags: needinfo?(longsonr)
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
Upstream PR merged by moz-wptsync-bot
Regressions: 1827515

Documentation changes can be tracked in the following GitHub issue:

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