canvas fillText doesn't work inside an iframe

RESOLVED INVALID

Status

()

RESOLVED INVALID
3 years ago
3 years ago

People

(Reporter: maxime.euziere, Unassigned)

Tracking

44 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8714067 [details]
ffbug.png

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160123151951

Steps to reproduce:

I tried to draw text on a canvas inside an iframe.

Here's the HTML code I tried to feed into the iframe via <iframe srcdoc="..."> or with a regular <iframe src="file.html">:

<canvas id=c></canvas>
<script>
    c=c.getContext("2d");
    c.fillStyle="red";
    c.strokeStyle="blue";
    c.fillRect(20,20,20,20); // works
    c.fillText("yo...",60,60); // fails
    c.strokeText("yo!",80,80); // works
</script>

demo: http://codepen.io/xem/pen/bEKKvR

Thanks!


Actual results:

no text is drawn on the canvas


Expected results:

some red text should appear on the canvas
(Reporter)

Comment 1

3 years ago
nevermind, all works fine since I closed and reopened my browser.
Thanks
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.