Last Comment Bug 302566 - when JavaScript is disabled, alternate content provided within the canvas element is not rendered and the canvas element still is rendered
: when JavaScript is disabled, alternate content provided within the canvas ele...
Status: RESOLVED FIXED
: dev-doc-complete, testcase
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: All All
: P3 major with 3 votes (vote)
: mozilla12
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
: 427400 493707 707806 (view as bug list)
Depends on: 734406 739004
Blocks: 290392
  Show dependency treegraph
 
Reported: 2005-07-28 16:06 PDT by Grant Wohl
Modified: 2012-04-24 05:10 PDT (History)
14 users (show)
mscott: blocking1.8b5-
bzbarsky: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Testcase (575 bytes, text/html)
2005-07-28 16:07 PDT, Grant Wohl
no flags Details
sun_earth_moon.html (3.53 KB, text/html)
2006-11-25 16:58 PST, Biju
no flags Details
Show canvas fallback content when script is disabled. (3.63 KB, patch)
2011-12-16 07:26 PST, Boris Zbarsky [:bz]
tnikkel: review+
Details | Diff | Review

Description Grant Wohl 2005-07-28 16:06:10 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050728 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050728 Firefox/1.0+

When JavaScript is disabled, alternate content provided within the canvas
element is not rendered. The canvas element itself is rendered. HTML5 says:
“When authors use the canvas element, they should also provide content that,
when presented to the user, conveys essentially the same function or purpose as
the bitmap canvas. This content may be placed as content of the canvas element.”
And:
“In non-visual media, and in visual media with scripting disabled, the canvas
element should be treated as an ordinary block-level element and the fallback
content should therefore be used instead.”

Reproducible: Always

Steps to Reproduce:
1.Turn off JavaScript.
2.View the testcase.
Actual Results:  
An empty canvas element was displayed.

Expected Results:  
The content within the canvas element should have been displayed.
Comment 1 Grant Wohl 2005-07-28 16:07:07 PDT
Created attachment 190899 [details]
Testcase
Comment 2 Ria Klaassen (not reading all bugmail) 2005-07-29 02:23:52 PDT
That's true; see no canvas element with JavaScript disabled.
Comment 3 Vladimir Vukicevic [:vlad] [:vladv] 2005-07-30 02:38:16 PDT
Not a regression; AFAIK we never implemented fallback.
Comment 4 Grant Wohl 2005-07-30 06:49:37 PDT
(In reply to comment #3)
> Not a regression; AFAIK we never implemented fallback.
You're right about fallback, but before canvas was implemented, it behaved as
expected. :-)
Comment 5 Scott MacGregor 2005-09-13 10:16:19 PDT
minusing. too late for the 1.5 train and no patch in hand. I'm also basing this
on Vlad's comment. 
Comment 6 Biju 2006-11-25 16:58:10 PST
Created attachment 246575 [details]
sun_earth_moon.html

test case with an image as fallback content
Comment 7 Aiko 2008-04-06 11:04:06 PDT
*** Bug 427400 has been marked as a duplicate of this bug. ***
Comment 8 Matthias Versen [:Matti] 2009-05-19 07:05:47 PDT
*** Bug 493707 has been marked as a duplicate of this bug. ***
Comment 9 David Baron :dbaron: ⌚️UTC-7 (review requests must explain patch) 2011-12-15 22:20:38 PST
*** Bug 707806 has been marked as a duplicate of this bug. ***
Comment 10 Boris Zbarsky [:bz] 2011-12-16 07:26:06 PST
Created attachment 582269 [details] [diff] [review]
Show canvas fallback content when script is disabled.
Comment 12 Ed Morley [:emorley] 2011-12-22 03:50:35 PST
https://hg.mozilla.org/mozilla-central/rev/70af9bf2a4dc
Comment 13 j.j. 2011-12-22 18:48:09 PST
This behaviour might be worth to be documented
Comment 14 Eric Shepherd [:sheppy] 2012-04-24 05:10:52 PDT
Documentation updated:

https://developer.mozilla.org/en/HTML/Element/canvas

And mentioned on Firefox 12 for developers.

Note You need to log in before you can comment on or make changes to this bug.