RESOLVED FIXED Bug 28769
The type of HTMLInputElement::list should follow the standard
https://bugs.webkit.org/show_bug.cgi?id=28769
Summary The type of HTMLInputElement::list should follow the standard
Kent Tamura
Reported 2009-08-27 02:38:31 PDT
In bug#27756, Sam wrote: | > +#if defined(ENABLE_DATALIST) && ENABLE_DATALIST | > + // The type of the list is HTMLElement according to the standard. | > + // We intentionally use HTMLDataListElement for it because our implementation | > + // always returns an HTMLDataListElement instance. | > + readonly attribute HTMLDataListElement list; | > +#endif | | It is not clear to me why the spec has this returning an Element, but I would | rather we match it. Except for extended attributes, I would really like to | keep these IDLs as close to the specs word as possible.
Attachments
Proposed patch (3.34 KB, patch)
2009-08-27 03:19 PDT, Kent Tamura
eric: review-
Proposed patch (rev.2) (3.46 KB, patch)
2009-08-30 19:03 PDT, Kent Tamura
no flags
Proposed patch (rev.3) (3.52 KB, patch)
2009-08-30 19:10 PDT, Kent Tamura
no flags
Kent Tamura
Comment 1 2009-08-27 03:19:45 PDT
Created attachment 38664 [details] Proposed patch
Darin Adler
Comment 2 2009-08-27 10:09:14 PDT
Comment on attachment 38664 [details] Proposed patch It seems OK to change the .idl file, but do we really have to change the .h and .cpp files? Having a more-specific type can allow simpler and slightly more efficient code internally, and should do no harm. Let me put it differently. What visible change does this make. If it has no visible effect on web pages or WebKit clients, then I think we should minimize the change.
Eric Seidel (no email)
Comment 3 2009-08-27 10:40:08 PDT
Comment on attachment 38664 [details] Proposed patch I agree with Darin. This "bug" occurred because I asked Kent in original review comments to change the type from HTMLElement* to HTMLDataListElement* to make internal clients easier. I don't really care one way or the other re: the idl, but if we'd like to be sure to match the spec exactly, that's fine too. Basically, keep the idl change, revert the rest would be my recommendation.
Kent Tamura
Comment 4 2009-08-27 17:15:33 PDT
Ok. But how to resolve the following build errors in that case? DOMHTMLInputElement.mm: In function ‘DOMHTMLElement* -[DOMHTMLInputElement list](DOMHTMLInputElement*, objc_selector*)’: DOMHTMLInputElement.mm:175: error: no matching function for call to ‘kit(WebCore::HTMLDataListElement*)’ JSHTMLInputElement.cpp: In function ‘JSC::JSValue WebCore::jsHTMLInputElementList(JSC::ExecState*, const JSC::Identifier&, const JSC::PropertySlot&)’: JSHTMLInputElement.cpp:297: error: no matching function for call to ‘toJS(JSC::ExecState*&, WebCore::JSDOMGlobalObject*, WebCore::HTMLDataListElement*)’
Kent Tamura
Comment 5 2009-08-30 19:03:16 PDT
Created attachment 38797 [details] Proposed patch (rev.2) - add HTMLInputElement::dataList() - make datalist-related methods const
Kent Tamura
Comment 6 2009-08-30 19:10:41 PDT
Created attachment 38798 [details] Proposed patch (rev.3) - Update ChangeLog
Eric Seidel (no email)
Comment 7 2009-08-31 03:40:39 PDT
Comment on attachment 38798 [details] Proposed patch (rev.3) LGTM.
Eric Seidel (no email)
Comment 8 2009-08-31 03:55:57 PDT
Comment on attachment 38798 [details] Proposed patch (rev.3) Clearing flags on attachment: 38798 Committed r47889: <http://trac.webkit.org/changeset/47889>
Eric Seidel (no email)
Comment 9 2009-08-31 03:56:01 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.