RESOLVED FIXED 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 Thursday, August 27, 2009 10:38:31 AM UTC
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 Thursday, August 27, 2009 11:19:45 AM UTC
Created attachment 38664 [details] Proposed patch
Darin Adler
Comment 2 Thursday, August 27, 2009 6:09:14 PM UTC
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 Thursday, August 27, 2009 6:40:08 PM UTC
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 Friday, August 28, 2009 1:15:33 AM UTC
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 Monday, August 31, 2009 3:03:16 AM UTC
Created attachment 38797 [details] Proposed patch (rev.2) - add HTMLInputElement::dataList() - make datalist-related methods const
Kent Tamura
Comment 6 Monday, August 31, 2009 3:10:41 AM UTC
Created attachment 38798 [details] Proposed patch (rev.3) - Update ChangeLog
Eric Seidel (no email)
Comment 7 Monday, August 31, 2009 11:40:39 AM UTC
Comment on attachment 38798 [details] Proposed patch (rev.3) LGTM.
Eric Seidel (no email)
Comment 8 Monday, August 31, 2009 11:55:57 AM UTC
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 Monday, August 31, 2009 11:56:01 AM UTC
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.