Closed Bug 67899 Opened 24 years ago Closed 22 years ago

NOSCRIPT element not rendered in XHTML

Categories

(Core :: XML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.2alpha

People

(Reporter: chrispetersen, Assigned: john)

References

Details

(Keywords: xhtml, Whiteboard: [bae:20011129])

Attachments

(3 files)

Build: 2001020608 Platform: All Expected result: With JS off in browser, the noscript element should be rendered. What I got: The noscript content is missing Steps to reproduce: 1) Turn off JS support in Advanced section of preferences. 2) Load the sample test case. 3) The page is empty. 4) Instead of a empty, the contents of the NOSCRIPT element should appear (Scripting is disabled so you will see this text).
Adding xhtml keyword
Keywords: xhtml
Summary: NOSCRIPT element not rendered in XHTML → NOSCRIPT element not rendered in XHTML
for me this is the same case as bug 68193. <noscript> is no block element. the only error here is that mozilla renders transitional as strict where it would be okay.
Attached file working example
Keywords: nsbeta1
Harish, you know noscript better than I do so maybe you could take a look...
Really reassigning...
Assignee: heikki → harishd
Target Milestone: --- → mozilla0.9
CCing Mark since I may need help from him.
Status: NEW → ASSIGNED
Mark: You have the weapons to kill this one. So, handing over to you ;)
Assignee: harishd → attinasi
Status: ASSIGNED → NEW
the NOSCRIPT { display: whatever; } rule needs to be in the pref stylesheet, and change from display:none to display:block when JS is disabled. Another option would be to make a rule like NOSCRIPT { display:-moz-noscript-pref;} and have that property value evaluate according to the state of the JS pref. This option is a lot more work... So, is this really required for mozilla 0.9?
Status: NEW → ASSIGNED
I would like to see it in 0.9 or 0.9.1, doesn't matter which. Or do you know of an obvious or simple workaround?
Are there other cases besides when JS is disabled via a pref that we need to handle? I spoke with Harish about this before but I cannot remember... If it is just the pref, then this is pretty easy. If there are othere cases not related to the pref, then it gets a bit more difficult. Moving to 0.9.1 because I have too many 0.9 bugs right now.
Target Milestone: mozilla0.9 → mozilla0.9.1
hmm... the current behavior has nothing to do with <noscript> and by the way mozilla should not handle <noscript> as a block element. for me <noscript> was always a way to display html constructs if javascript was disabled. when comparing both testcases you'll see in the second example <noscript> is surrounded by <p> in this case when javascript is disabled the text will be displayed. the problem with both testcases is that doctype is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> mozilla renders or parses (?) both testcases like <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> and here lies the problem: when XHTML 1.0 Strict is used following html construct should not display anything. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <body> Should not be displayed </body> another example where it also should not be displayed(javascript disabled): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <body> <noscript>Should not be displayed</noscript> </body> in XHTML 1.0 Strict it must be surrounded by a block element !! otherwise it should not be displayed. mozilla does not handle the doctype correct !! it renders Transitional as Strict. something like this construct should display the text: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <body> Should be displayed </body> ***
oops sorry, <noscript> is a block element, and it should be rendered in strict and transitional when parent element is <body>.
Currently we do not create a NOSCRIPT frame at all, because it is display-none. It looks like the content sink checks to see if JS is disabled, and if it is, then it ignores the NOSCRIPT (eg. avoids opening a container for it) and just processes the content of the NOSCRIPT normally. If JS is enabled, however, then the container is opened and the CSS style rules for NOSCRIPT (display:none) kick in to prevent the contents from being displayed. The only problems I can see here are: 1) handling of the transitional XHTML doctype results in strict layout mode 2) NOSCRIPT is not being treated as a block when JS is off I have been told that (1) is already represented by a bug, and I think (2) should be opened. This bug can then be closed (or it could be updated to become 2). Incidentally, if NOSCRIPT is to be treated as a block when JS is OFF, then the content sink will need to start creating the NOSCRIPT container, and the frame construction code wil need to start processing it. Also, we will need to toggle the display value for NOSCRIPT (I think). Comments?
Since I realize that N6 handles all xml document as strict, I have updated the original test case to resolve this problem. A P element has been placed inside the noscript element.
Here's the bug related to XHTML Transitional being rendered as strict: http://bugzilla.mozilla.org/show_bug.cgi?id=76912
Bug 77296 opened for the NOSCRIPT not treated as block problem. Closing this as INVALID.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
OK, the testcase works when it has the (html) extension, but not the (xml) extension, even though the doctype indicates XHTML... Reopening...
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Updating milestone, priority and severity (and re-accepting)
Severity: major → normal
Status: REOPENED → ASSIGNED
Priority: -- → P2
Target Milestone: mozilla0.9.1 → mozilla1.0
Blocks: 104166
Target Milestone: mozilla1.0 → mozilla1.2
leaving in 1.2
Whiteboard: [bae:20011129]
QA Contact: petersen → ian
Will be fixed with bug 77296
Assignee: attinasi → jkeiser
Status: ASSIGNED → NEW
Depends on: 77296
*** Bug 199921 has been marked as a duplicate of this bug. ***
Fixed with bug 77296.
Status: NEW → RESOLVED
Closed: 24 years ago22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: