Bug 109793

Summary: Replace 'DOMObject' with 'any' in WebKit IDL
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: WebCore JavaScriptAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, graouts, japhet, joepeck, ojan.autocc, sam, timothy, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Kentaro Hara 2013-02-14 01:31:30 PST
In the Web IDL spec, there is no type named 'DOMObject'. It should be 'any'. We should replace all 'DOMObject's in WebKit IDLs with 'any's.
Comment 1 Kentaro Hara 2013-02-14 01:33:08 PST
Created attachment 188283 [details]
Patch
Comment 2 Joseph Pecoraro 2013-02-14 16:07:54 PST
When it was DOMObject it sounded like "this needs to be some kind of object".
Now "any" sounds like "hey this could be anything. A number. An object. A string. Anything!".

To me this hurts clarity / readability. Unless "any" really does mean any type, including primitives like numbers?
Comment 3 Kentaro Hara 2013-02-14 16:13:02 PST
(In reply to comment #2)
> When it was DOMObject it sounded like "this needs to be some kind of object".
> Now "any" sounds like "hey this could be anything. A number. An object. A string. Anything!".

The Web IDL spec says that we should call it "any": http://www.w3.org/TR/WebIDL/#idl-types

> Unless "any" really does mean any type, including primitives like numbers?

"any" does mean any type. Internally it is implemented as a ScriptValue, which can store any JavaScript value.

In the WebKit IDL files, "any" and "DOMObject" have been used interchangeably. Given that it can handle any type, "any" would be a better name than "DOMObject".
Comment 4 Adam Barth 2013-02-14 16:21:57 PST
@joepeck: Our trajectory here is to to match WebIDL.  If you have comments about the readability of WebIDL, you might want to bring that up with the WebApps working group.
Comment 5 WebKit Review Bot 2013-02-14 16:26:57 PST
Comment on attachment 188283 [details]
Patch

Clearing flags on attachment: 188283

Committed r142935: <http://trac.webkit.org/changeset/142935>
Comment 6 WebKit Review Bot 2013-02-14 16:27:01 PST
All reviewed patches have been landed.  Closing bug.