Closed
Bug 171713
Opened 23 years ago
Closed 21 years ago
[FIX]<input> should imply missing/misplaced </select>
Categories
(Core :: DOM: HTML Parser, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha2
People
(Reporter: martin, Assigned: bzbarsky)
References
()
Details
(Keywords: compat)
Attachments
(1 file)
|
8.32 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
This is a bug for an enhancement to quirks mode. With the following
(admittedly, invalid and evil and wrong) html, one gets a form that can be
submitted when using i.e. or even when using lynx. However, mozilla fails to
render the submit button:
<FORM ACTION='http://www.furious-george.net' METHOD='POST'>
<SELECT SIZE=1 NAME='stops'>
<OPTION VALUE='1' NAME='stops'>1
<OPTION VALUE='2' NAME='stops'>2
<OPTION VALUE='3' NAME='stops'>3
<OPTION VALUE='4' NAME='stops'>4
<OPTION VALUE='5' NAME='stops'>5
<P><INPUT TYPE='submit' VALUE='Move'></SELECT></FORM>
Quirks mode should consider either the <P> tag or the <INPUT> tag as implicitly
closing the <SELECT>; it appears visually that i.e. ignores the <P> tag. A
snippet of lynx -trace output (shown below) shows that lynx also ignores the <P>
but considers the <INPUT> to end the enclosing <SELECT>:
========snip==========
SGML: Start <OPTION>
Entering HText_setLastOptionValue: value:4
, checked:off
HText_setLastOptionValue: value=4 val_cs=0 "iso-8859-1"
(submit_val_cs 0 "iso-8859-1") submit_value=4
HTML:begin_element[4]: adding style to stack - Normal (OPTION)
SGML: End </OPTION> <- supplied, start <P>
SGML: Still open SELECT <- ***invalid start <P>
SGML: Still open SELECT <- ***ignoring start <P>
SGML: End </SELECT> <- ***forced by start <INPUT>
Entering HText_setLastOptionValue: value:5
, checked:off
HText_setLastOptionValue: LAST_ORDER value=5 val_cs=0 "iso-8859-1"
(submit_val_cs 0 "iso-8859-1") submit_value=5
SGML: Start <INPUT>
Ok, we're trying type=[submit]
2.Ok, we're trying type=[submit] (present=0xa0435f9)
3.Ok, we're trying type=[submit]
normal field type: submit
4.Ok, we're trying type=[submit]
GridText: Entering HText_beginInput
Input link: name=
value=Move
size=4
Input link: name_cs=0 "iso-8859-1" (from 0 "iso-8859-1")
value_cs=0 "iso-8859-1" (from 0 "iso-8859-1")
I.submit have 4 chars, or something
I.submit, 1
SGML: Still open FORM, ***no open SELECT for </SELECT>
SGML: End </FORM>
========snip==========
| Assignee | ||
Comment 1•23 years ago
|
||
To parser.
Assignee: jkeiser → harishd
Status: UNCONFIRMED → NEW
Component: HTML Form Controls → Parser
Ever confirmed: true
QA Contact: tpreston → moied
| Assignee | ||
Comment 2•21 years ago
|
||
This may actually be reasonable to do.... Should be a tweak to
nsElementTable.cpp, but there are four totally undocumented fields in the table
that have to do with autoclosing behavior... :(
Comment 3•21 years ago
|
||
This wouldn't be a quirks-mode only thing. Remove "quirk" from summary.
Summary: Quirks mode should ignore missing/misplaced </select> → <input> should imply missing/misplaced </select>
| Assignee | ||
Comment 4•21 years ago
|
||
We could probably do this by removing the exclgroup for <select>, but that's
scary....
Alternately, we could allow <input> as a special child of select but make it
autoclose the select? (evil and counterintuitive, but it works, and is much
less invasive!)
I wish this code were somewhat documented.
| Assignee | ||
Comment 5•21 years ago
|
||
*** Bug 244469 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 6•21 years ago
|
||
Assignee: harishd → bzbarsky
Status: NEW → ASSIGNED
| Assignee | ||
Comment 7•21 years ago
|
||
Comment on attachment 149607 [details] [diff] [review]
Patch
peterv, could you review? The long comment should explain what's going on, I
think.... This patch gives us something close to IE compat on this sort of
markup (fixes this bug and the bugs it blocks).
Attachment #149607 -
Flags: superreview?(peterv)
Attachment #149607 -
Flags: review?(peterv)
| Assignee | ||
Updated•21 years ago
|
Severity: minor → normal
Priority: -- → P1
Summary: <input> should imply missing/misplaced </select> → [FIX]<input> should imply missing/misplaced </select>
Target Milestone: --- → mozilla1.8alpha2
Updated•21 years ago
|
Attachment #149607 -
Flags: superreview?(peterv)
Attachment #149607 -
Flags: superreview+
Attachment #149607 -
Flags: review?(peterv)
Attachment #149607 -
Flags: review+
| Assignee | ||
Comment 8•21 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 9•21 years ago
|
||
*** Bug 245047 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•