Closed Bug 707806 Opened 9 years ago Closed 9 years ago

Canvas fallback content is unavailable when JavaScript is disabled

Categories

(Core :: Layout, defect)

7 Branch
x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 302566

People

(Reporter: mat, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2

Steps to reproduce:

Create an empty <canvas> element that contains an <img> tag as fallback content; view with JavaScript disabled.


Actual results:

A blank canvas element is rendered and fallback content is not displayed.


Expected results:

Per the HTML5 spec: “In non-visual media, and in visual media if scripting is disabled for the canvas element or if support for canvas elements has been disabled, the canvas element represents its fallback content instead.”

http://dev.w3.org/html5/spec/Overview.html#the-canvas-element
I can confirm in Aurora 10.0a2 (2011-12-05). Setting javascript.enabled to false and visiting http://scottjehl.com/imgwithfallback.html in Aurora results in a blank page. I get the fallback content when I visit in Opera with JS disabled.
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general
This actually seems like a layout issue.  We just want to skip creating the canvasframe and fall back to constructing by display type when JS is disabled, right?
Component: DOM: Core & HTML → Layout
QA Contact: general → layout
Yeah, per the quote from http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#the-canvas-element in comment 0:

  # In non-visual media, and in visual media if scripting is disabled for the canvas element or
  # if support for canvas elements has been disabled, the canvas element represents its fallback
  # content instead.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 302566
You need to log in before you can comment on or make changes to this bug.