Closed Bug 2082 Opened 26 years ago Closed 25 years ago

form elements not treated as form's children

Categories

(Core :: DOM: Core & HTML, defect, P2)

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: martin.honnen, Assigned: vidur)

References

()

Details

Attachments

(1 file)

When examining something like <BODY> <FORM NAME="gui"> <INPUT TYPE="text" NAME="field" VALUE="some value"> </FORM> I find that document.getElementById("gui").hasChildNodes() evals to false and that the INPUT element is a child of the BODY. Vidur's statement on that: Currently, we're treating form elements as leaf elements. You can get at their containing form controls using the "elements" property, but they have no direct children. Our original rationale for this was the common usage scenario where FORM elements are used as delimiters rather than containers and are not nested correctly (i.e. the resultant document is not well-formed). For example, we've seen cases where a FORM element starts in one table cell and ends in another - and Navigator has traditionally accepted those cases. In some cases, no fixups could actually both preserve the old behavior and create a well-formed document. The only option that made sense was to treat FORM elements as leaf elements and not containers. Of course, in the well-formed case this should not be done and that's where the bug lies.
Status: NEW → ASSIGNED
Setting all current Open/Normal to M4.
per leger, assigning QA contacts to all open bugs without QA contacts according to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
Target Milestone: M4 → M5
Do either of you guys want to take this one? It could be simple, but I suspect that there are some latent layout complexities.
QA Contact: 4015 → 4078
Target Milestone: M5 → M6
Chris and Eric, we need to decide which of us owns this one.
Target Milestone: M6 → M7
*** Bug 3123 has been marked as a duplicate of this bug. ***
Assignee: vidur → rickg
Status: ASSIGNED → NEW
This will require changes to the parser and content sink so I'm reassigning to Rick. The changes that need to be made in the form code are not trivial. The table code may even have to change depending on what Rick does in the parser. If we get the parser issues straightened out, then Eric or I should get the parser changes before they are checked in and work out the layout issues.
Assignee: rickg → karnaze
Chris -- I'm handing this back to you so that you can construct a plan for the parser to implement. You need to tell me what you want.
Rick, I don't have a clear plan. There are all sorts of pages with tables that will break if we simply make forms containers (see example below). On the frame side we can have multiple child lists so the form could share children with the nsTableCellFrames (I guess). But on the content side, it will be a problem, since the DOM only supports trees. <form> <table> <tr> <td> <input ...> <td> <input ...> </table> </form>
Assignee: karnaze → vidur
I'll hold on to the bug. It's one of my three big tasks for M7. Rick, I'll talk to you about it over the phone.
Status: NEW → ASSIGNED
Target Milestone: M7 → M9
It didn't happen for M7. Since I have content sink refactoring on my list for M8 and I expect it to be a bear, I'm going to move this one to M9. It is possible, though that I might need to do this as part of the content sink refactoring.
*** Bug 2478 has been marked as a duplicate of this bug. ***
*** Bug 1094 has been marked as a duplicate of this bug. ***
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed on 7/22/1999. Forms are now content containers if the document is well-formed and if the form is not a child of a TABLE, TBODY, TFOOT, THEAD, TR, COL or COLGROUP.
adding testcase to URL field.
Attached file same testcase as above (deleted) —
Status: RESOLVED → VERIFIED
so, just load the url. it will say 'test passed' or 'test failed', depending on if it is fixed. looks good to me. marking verified on 1999-07-26-14 RedHat Linux 5.2 (GNOME/enlightenment) 1999-07-26-08 WinNT 4.0 sp4 1999-07-21-08 MacOS 8.51
RCS file: /cvsroot/mozilla/testing/mochitest/tests/test_bug2082.html,v done Checking in tests/test_bug2082.html; /cvsroot/mozilla/testing/mochitest/tests/test_bug2082.html,v <-- test_bug2082.html initial revision: 1.1 done
Flags: in-testsuite+
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: