Bug 47812 - V8 binding for DOMSettableTokenList
Summary: V8 binding for DOMSettableTokenList
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 29363
  Show dependency treegraph
 
Reported: 2010-10-18 04:28 PDT by Kenichi Ishibashi
Modified: 2010-11-02 00:42 PDT (History)
3 users (show)

See Also:


Attachments
Patch V0 (1.62 KB, patch)
2010-10-31 17:46 PDT, Kenichi Ishibashi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenichi Ishibashi 2010-10-18 04:28:36 PDT
Implement V8 binding for DOMSettableTokenList. This issue is a part of implementing the <output> element. See https://bugs.webkit.org/show_bug.cgi?id=29363 for more details.
Comment 1 Kenichi Ishibashi 2010-10-31 17:46:53 PDT
Created attachment 72479 [details]
Patch V0
Comment 2 WebKit Commit Bot 2010-10-31 19:54:42 PDT
Comment on attachment 72479 [details]
Patch V0

Clearing flags on attachment: 72479

Committed r71007: <http://trac.webkit.org/changeset/71007>
Comment 3 WebKit Commit Bot 2010-10-31 19:54:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Erik Arvidsson 2010-11-01 11:12:38 PDT
Comment on attachment 72479 [details]
Patch V0

View in context: https://bugs.webkit.org/attachment.cgi?id=72479&action=review

Also, why do we need custom indexedPropertyGetter? It wasn't needed for classList. The codegen knows how to generate this.

> WebCore/bindings/v8/custom/V8DOMSettableTokenListCustom.cpp:39
> +    return v8String(list->item(index));

This does not look right since we should return null when index is out of bounds. ([ConvertNullStringTo=Null]  in the idl)
Comment 5 Kenichi Ishibashi 2010-11-02 00:42:18 PDT
Hi Erik,

Thank you for your comment.

(In reply to comment #4)
> Also, why do we need custom indexedPropertyGetter? It wasn't needed for classList. The codegen knows how to generate this.

It looks like that the codegen for V8 bindings does not consider the inheritance of the interface and doesn't generate indexedPropertyGetter automatically. On the other hand, the codegen for JSC consider the inheritance of the interface and generate getter function automatically. To manage these two case, we need to custom function.

> > WebCore/bindings/v8/custom/V8DOMSettableTokenListCustom.cpp:39
> > +    return v8String(list->item(index));
> 
> This does not look right since we should return null when index is out of bounds. ([ConvertNullStringTo=Null]  in the idl)

Yes, I've made a mistake and I'll fix it in the patch for https://bugs.webkit.org/show_bug.cgi?id=29363. Thank you for correcting.