Closed
Bug 268442
Opened 20 years ago
Closed 15 years ago
quirks mode used for popup if XHTML strict doctype and XML prolog are written with separete document.write commands
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
People
(Reporter: bugzilla, Unassigned)
References
()
Details
(Whiteboard: [fixed by the HTML5 parser])
User-Agent: Opera/7.54 (X11; Linux i686; U) [en]
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2
If the contents of a popup are dynamically written, and the XHTML strict doctype
tag and XML prolog are written with separate document.write commands, Mozilla/
Firefox/Gecko will use Quirks mode to render the popup contents even though it
should use standards compliant mode. Checking the source of the popup correctly
shows that it was all written correctly, but it still uses the wrong mode.
Reproducible: Always
Steps to Reproduce:
1. open a popup
2. use document.write to write its contents, using separate document.write
commands for the XHTML strict doctype tag and the XML prolog
3. Mozilla/Firefox/Gecko will use the wrong rendering mode
Actual Results:
Quirks mode is used for rendering popup contents
Expected Results:
Standards compliant mode should have been used to render popup contents
Comment 1•20 years ago
|
||
Confirming. I'm not entirely certain when we sniff for a doctype in the parser,
but I have a suspicion that we only check on the first nsParser::Parse(nsString
..., ...) so the two document.write()s throw us off, or something like that.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•20 years ago
|
||
That's correct. We only look for the doctype in the first chunk of data the
parser gets; the behavior noted in this bug can be reproduced with network
packets too (simply by having a few kilobytes of whitespace between the XML decl
and the doctype).
We can't simply assume anything starting with an XML prolog is standards mode,
though... if nothing else, some of it needs to be almost standards.
Comment 3•19 years ago
|
||
(In reply to comment #2)
> the behavior noted in this bug can be reproduced with network
> packets too (simply by having a few kilobytes of whitespace between the XML decl
> and the doctype).
Bug 261892 describes such a situation.
Updated•15 years ago
|
Assignee: parser → nobody
QA Contact: mrbkap → parser
Depends on: html5-parsing
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [fixed by the HTML5 parser]
You need to log in
before you can comment on or make changes to this bug.
Description
•