Closed
Bug 1500768
Opened 6 years ago
Closed 6 years ago
Implement SVG image support for createImageBitmap
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
12.46 KB,
patch
|
jwatt
:
review+
|
Details | Diff | Splinter Review |
5.89 KB,
patch
|
jwatt
:
review+
|
Details | Diff | Splinter Review |
CanvasImageSource should compose, together with Blob and ImageData, the ImageBitmapSource typedef: https://html.spec.whatwg.org/multipage/canvas.html#canvasimagesource https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#imagebitmapsource But we don't support SVGImageElement as input for CreateImageBitmap yet.
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Comment 1•6 years ago
|
||
Assignee: nobody → amarchesini
Attachment #9019952 -
Flags: review?(jwatt)
Assignee | ||
Comment 2•6 years ago
|
||
Attachment #9019958 -
Flags: review?(jwatt)
Comment 3•6 years ago
|
||
Comment on attachment 9019952 [details] [diff] [review] svg.patch Review of attachment 9019952 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/canvas/ImageBitmap.cpp @@ +500,2 @@ > static bool > +HasRasterImage(ElementType& aImageEl) As noted on IRC, this should go away. @@ +892,5 @@ > return ret.forget(); > } > > /* static */ already_AddRefed<ImageBitmap> > +ImageBitmap::CreateInternal(nsIGlobalObject* aGlobal, SVGImageElement& aImageEl, It would be nice to share some of this code, but I guess it's likely to diverge as you fix more of the web-platform-tests.
Attachment #9019952 -
Flags: review?(jwatt) → review+
Comment 4•6 years ago
|
||
Comment on attachment 9019958 [details] [diff] [review] svg2.patch Review of attachment 9019958 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/canvas/ImageBitmap.cpp @@ -497,5 @@ > - * raster image. > - */ > -template<class ElementType> > -static bool > -HasRasterImage(ElementType& aImageEl) Ah, good. :)
Attachment #9019958 -
Flags: review?(jwatt) → review+
Comment 5•6 years ago
|
||
I'm guessing that there aren't WPT tests for the steps under 'SVG image' in items 6 at: https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-createimagebitmap Could you look into that, and perhaps add them? I expect we have some failures there.
Assignee | ||
Comment 6•6 years ago
|
||
Yes we have tests. And "SVG image" section is shared with "img" aka HTMLImageElement. The reason why I moved the origin check is because it should be executed after 1, 2 and 3.
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/e81ad7034716 Implement SVGImageElement support for createImageBitmap, r=jwatt https://hg.mozilla.org/integration/mozilla-inbound/rev/2e9cdd9ff7b6 Support SVG images in HTMLImageElements, r=jwatt
Assignee | ||
Updated•6 years ago
|
Keywords: dev-doc-needed
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e81ad7034716 https://hg.mozilla.org/mozilla-central/rev/2e9cdd9ff7b6
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment 9•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e81ad7034716 https://hg.mozilla.org/mozilla-central/rev/2e9cdd9ff7b6
Comment 10•5 years ago
|
||
I've added a note to the Fx65 rel notes: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/65#APIs Apart from that, I just needed to update the compat data. I've submitted a PR to do that: https://github.com/mdn/browser-compat-data/pull/3230 Let me know if this all looks ok!
Keywords: dev-doc-needed → dev-doc-complete
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•