Bug 117531

Summary: Rename [CallWith] to [ConstructorCallWith] for IDL interfaces
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: BindingsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, haraken, laszlo.gombos
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2013-06-11 23:13:14 PDT
[CallWith] is used for methods and interfaces with slightly different meaning. When specified on an interface, [CallWith] only applies to the constructor. We should therefore rename it to [ConstructorCallWith] to increase readability.
Comment 1 Kentaro Hara 2013-06-11 23:15:05 PDT
BTW, I'm happy to accept these changes to Blink to keep IDLs consistent between WebKit and Blink.
Comment 2 Chris Dumez 2013-06-11 23:37:49 PDT
Created attachment 204416 [details]
Patch
Comment 3 Chris Dumez 2013-06-11 23:39:15 PDT
(In reply to comment #1)
> BTW, I'm happy to accept these changes to Blink to keep IDLs consistent between WebKit and Blink.

Great, consistency at IDL level would be nice indeed. Thanks.
Comment 4 Kentaro Hara 2013-06-11 23:40:47 PDT
Comment on attachment 204416 [details]
Patch

What constructors do not need ConstructorCallWith=ScriptExecutionContext?

If almost all constructors need it, we might want to make the ScriptExecutionContext parameter by default.
Comment 5 Chris Dumez 2013-06-11 23:57:48 PDT
Created attachment 204417 [details]
Patch

- Removed [ConstructorCallWith] statement from interface with custom constructors as this has no effect.

I looked into how many interfaces need the ScriptExecutionContext for their constructor.
There are 30 interfaces with non-custom constructors. 14 of those require the ScriptExecutionContext for their constructor.
Comment 6 Kentaro Hara 2013-06-12 00:00:58 PDT
Comment on attachment 204417 [details]
Patch

> There are 30 interfaces with non-custom constructors. 14 of those require the ScriptExecutionContext for their constructor.

Thanks, then it would make sense to have the IDL attribute.
Comment 7 WebKit Commit Bot 2013-06-12 05:25:49 PDT
Comment on attachment 204417 [details]
Patch

Clearing flags on attachment: 204417

Committed r151495: <http://trac.webkit.org/changeset/151495>
Comment 8 WebKit Commit Bot 2013-06-12 05:25:51 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Chris Dumez 2013-06-12 05:45:44 PDT
Updated wiki accordingly in http://trac.webkit.org/wiki/WebKitIDL?action=diff&version=126&old_version=125