The svg+xml image is not drawing in the Canvas(DrawImage())
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
People
(Reporter: rajnahom, Unassigned)
Details
Attachments
(1 file)
693.28 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
Steps to reproduce:
- Run the provided sample in Firefox browser
2.Then click on Draw Image button, You can see the image is not drawn in the canvas.
Actual results:
The image is not drawn in the canvas and also no script error occurred.
Expected results:
The image should be drawn correctly in the canvas.
Note: It works fine in chrome and edge, It occurs only in Firefox browser.
![]() |
||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
incorrect |
I wonder if there is something about the data uri that gets us confused, I get:
WARNING: 'NS_FAILED(rv)', file netwerk/base/nsSimpleURI.cpp:618
Comment 2•3 years ago
|
||
No, that wasn't it. The svg in the data uri does not have a width or height, if I give it a width and height then it draws. This sounds familar, Daniel do you know which bug this is? svg needs a width/height to work with drawImage
Comment 3•3 years ago
|
||
Looks like it's bug 700533.
Comment 4•3 years ago
|
||
Indeed. We should probably get around to fixing that.
Comment 5•3 years ago
|
||
I believe this closed bug is also related to the topic, but not directly linked beyond comment there: https://bugzilla.mozilla.org/show_bug.cgi?id=1328124
Description
•