Closed Bug 302566 Opened 19 years ago Closed 12 years ago

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

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: grantwohl+mozbug, Assigned: bzbarsky)

References

Details

(Keywords: dev-doc-complete, testcase)

Attachments

(3 files)

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.
Attached file Testcase
Keywords: regression, testcase
That's true; see no canvas element with JavaScript disabled.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Not a regression; AFAIK we never implemented fallback.
Keywords: regression
(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. :-)
Blocks: 290392
Flags: blocking1.8b5?
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-
Attached file sun_earth_moon.html
test case with an image as fallback content
Priority: -- → P5
Component: Canvas: 2D → Layout
OS: Windows XP → All
Priority: P5 → P3
QA Contact: canvas.2d → layout
Hardware: x86 → All
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
Closed: 12 years ago
Resolution: --- → FIXED
This behaviour might be worth to be documented
Keywords: dev-doc-needed
Depends on: 734406
Depends on: 739004
Documentation updated:

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

And mentioned on Firefox 12 for developers.
You need to log in before you can comment on or make changes to this bug.