Closed Bug 1775108 Opened 3 years ago Closed 3 years ago

context.drawImage is not causing svg image to appear when width, height attributes are percentages

Categories

(Core :: SVG, defect)

Firefox 91
defect

Tracking

()

RESOLVED DUPLICATE of bug 700533

People

(Reporter: mark.gregory, Unassigned)

Details

Attachments

(1 file)

Attached file test.html

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

I set up the attached test page. This loads some simple svg into an image and then attempts to draw it in a canvas element. This works in Chrome but not Firefox. I used the load event for the image to cause it to be drawn. I tested both a live site and just opening the file in the browser. Tested on Firefox 91.10.0esr 32 bit on Windows 10 and Firefox 101.0.1 64-bit on Windows 2008R2.

Actual results:

The image does not appear in the canvas element.
The error function is not called.

Expected results:

The image should have appeared, or the error function should have been called with useful information.
This SVG has percentages in the width and height element. This should be acceptable.

The Bugbug bot thinks this bug should belong to the 'Core::SVG' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → SVG
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: