when JavaScript is disabled, alternate content provided within the canvas element is not rendered and the canvas element still is rendered

RESOLVED FIXED in mozilla12

Status

()

Core
Layout
P3
major
RESOLVED FIXED
12 years ago
5 years ago

People

(Reporter: Grant Wohl, Assigned: bz)

Tracking

({dev-doc-complete, testcase})

Trunk
mozilla12
dev-doc-complete, testcase
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.8b5 -
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

12 years ago
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.
(Reporter)

Comment 1

12 years ago
Created attachment 190899 [details]
Testcase
(Reporter)

Updated

12 years ago
Keywords: regression, testcase
That's true; see no canvas element with JavaScript disabled.

Updated

12 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Not a regression; AFAIK we never implemented fallback.
Keywords: regression
(Reporter)

Comment 4

12 years ago
(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. :-)
(Reporter)

Updated

12 years ago
Blocks: 290392
(Reporter)

Updated

12 years ago
Flags: blocking1.8b5?

Comment 5

12 years ago
minusing. too late for the 1.5 train and no patch in hand. I'm also basing this
on Vlad's comment. 
Flags: blocking1.8b5? → blocking1.8b5-

Comment 6

11 years ago
Created attachment 246575 [details]
sun_earth_moon.html

test case with an image as fallback content
Priority: -- → P5

Updated

10 years ago
Duplicate of this bug: 427400
Duplicate of this bug: 493707
Duplicate of this bug: 707806
Component: Canvas: 2D → Layout
OS: Windows XP → All
Priority: P5 → P3
QA Contact: canvas.2d → layout
Hardware: x86 → All
Created attachment 582269 [details] [diff] [review]
Show canvas fallback content when script is disabled.
Attachment #582269 - Flags: review?(tnikkel)
Assignee: nobody → bzbarsky
Whiteboard: [need review]
Attachment #582269 - Flags: review?(tnikkel) → review+
Whiteboard: [need review] → [need landing]
https://hg.mozilla.org/integration/mozilla-inbound/rev/70af9bf2a4dc
Flags: in-testsuite?
Whiteboard: [need landing]
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/70af9bf2a4dc
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 13

6 years ago
This behaviour might be worth to be documented
Keywords: dev-doc-needed

Updated

6 years ago
Depends on: 734406
Depends on: 739004
Documentation updated:

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

And mentioned on Firefox 12 for developers.
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.