Closed Bug 558640 Opened 14 years ago Closed 14 years ago

Inconsistent/misleading behavior with misplaced FORM tag in TABLE

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: grahamj42, Unassigned)

References

Details

(Keywords: testcase, Whiteboard: [fixed by the HTML5 parser])

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729)

It seems not uncommon to find pages where <FORM...> is inserted between <TR> and <TD> in a table, contrary to the standards.
Firefox (in common with other browsers) renders the form correctly in this situation when the page is loaded.
If the table and form are added to the DOM by assignment to innerHTML, the form is not rendered and no error or warning is issued (Firebug confirms that the form is loaded).

Reproducible: Always

Steps to Reproduce:
Load test page dummyloader.html (supplied)
 Or load test page dummyform.html using XMLHttpRequest() and assign it to a div etc.

Actual Results:  
Page (dummyform.html) renders correctly when loaded normally.
Same HTML is silently ignored when assigned to innerHTML (see dummyloader.html).

Expected Results:  
Either:

(a) The same behaviour is exhibited by assignment to innerHTML as when the page is loaded (this is the behaviour exhibited by Internet Explorer).

(b) The fact that the form is not rendered is signalled by an exception, error or warning.

As noted, the expected behaviour is exhibited by Internet Explorer. I do not consider it acceptable that the form is not rendered without warning. This problem was reported by another user in June 2008 under bug 439950 but has not been progressed.
Thanks for the testcases! I can reproduce this on a trunk build, but this works fine with the HTML5 parser <http://hsivonen.iki.fi/test-html5-parsing/>
Component: General → HTML: Parser
Depends on: html5-parsing
Keywords: testcase
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → parser
Hardware: x86 → All
Whiteboard: [fixed by the HTML5 parser]
Version: unspecified → Trunk
Marking FIXED per comment 4.
Status: UNCONFIRMED → RESOLVED
Closed: 14 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: