Summary: | HTMLFormElement.elements doesn't include fieldsets | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ms2ger (he/him; ⌚ UTC+1/+2) <Ms2ger> | ||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap, yael | ||||
Priority: | P3 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
URL: | http://www.whatwg.org/html/#category-listed | ||||||
Attachments: |
|
Description
Ms2ger (he/him; ⌚ UTC+1/+2)
2010-10-23 13:30:24 PDT
In particular, the test should log "[object HTMLFieldSetElement]" or some such, rather than "undefined". Created attachment 75054 [details]
Patch.
Added filedset and keygen to HTMLFormElement.elements by making them enumeratable.
object element should be listed as well and I will file a separate bug for that.
Comment on attachment 75054 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=75054&action=review > WebCore/html/HTMLKeygenElement.h:39 > - virtual bool isEnumeratable() const { return false; } > + virtual bool isEnumeratable() const { return true; } You should instead just remove this member function entirely. The function inherited from HTMLSelectElement already returns true, there is no need to override. > LayoutTests/fast/forms/script-tests/form-collection-elements.js:2 > +debug("This test does not add object element as a listed element. Separate bug will be filed for that."); I don’t think “separate bug will be filed” makes sense in a comment in the test. Maybe you mean we’ll test that with a separate test? Do the test results match Firefox and/or IE exactly? (In reply to comment #4) > Do the test results match Firefox and/or IE exactly? Firefox and Opera do list keygen, fieldset and object. I am still testing on IE. Will have the results before committing this patch. Firefox does not list output element though. (In reply to comment #3) > (From update of attachment 75054 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=75054&action=review > > > WebCore/html/HTMLKeygenElement.h:39 > > - virtual bool isEnumeratable() const { return false; } > > + virtual bool isEnumeratable() const { return true; } > > You should instead just remove this member function entirely. The function inherited from HTMLSelectElement already returns true, there is no need to override. > > > LayoutTests/fast/forms/script-tests/form-collection-elements.js:2 > > +debug("This test does not add object element as a listed element. Separate bug will be filed for that."); > > I don’t think “separate bug will be filed” makes sense in a comment in the test. Maybe you mean we’ll test that with a separate test? Thank you for the review. I will make the adjustments before committing. Since object elemnt is not as straightforward as keygen and fieldset, I filed https://bugs.webkit.org/show_bug.cgi?id=50179 to fix that. (In reply to comment #4) > Do the test results match Firefox and/or IE exactly? IE9 Beta does not support keygen element, but it does list fieldset in HTMLFormElement.elements . Committed r72835: <http://trac.webkit.org/changeset/72835> |