Open Bug 595543 Opened 14 years ago Updated 2 years ago

Be able to distinguish form associated elements with form listed elements from nsIFormControl or nsGenericHTMLFormElement

Categories

(Core :: DOM: Forms, defect, P5)

defect

Tracking

()

People

(Reporter: mounir, Unassigned)

Details

IOW, HTMLLabelElement is not a listed form control. It's like HTMLOptionElement, HTMLLegendElement or HTMLOptGroupElement: related to forms but not a form control. We should make it inherits from nsGenericHTMLElement instead of nsGenericHTMLFormElement and remove NS_FORM_LABEL.

With this fixed, an element will have nsIFormControl implemented iif it is a listed form control.
My bad, HTMLLabelElement isn't like HTMLOptionElement, HTMLLegendElement and HTMLOptGroupElement. It is kind of special (actually like HTMLProgressElement and HTMLMeterElement but they are not implemented yet).

HTMLLabelElement is a form associated element that means it has .form and @form but it's not a form listed element (that means, it should not be returned by form.elemnets or fieldset.elements). It goes without saying that HTMLLabelElement (like HTMLMeterElement and HTMLProgressElement) ore not submittable nor resettable.

So, we could have a simple way to do that: adds IsListedElement in nsIFormControl. We could also have different interfaces/classes for the various kind of form elements but I've the feeling that adding interfaces isn't what we currently want.
Anyway, that's not for Firefox 4.
Assignee: mounir.lamouri → nobody
Status: ASSIGNED → NEW
Summary: HTMLLabelElement should not inherit from NsGenericHTMLFormElement → Be able to distinguish form associated elements with form listed elements from nsIFormControl or nsGenericHTMLFormElement
No longer blocks: 595449
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven't been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM: Core & HTML → DOM: Forms
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.