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

Kentaro Hara
Reported 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.
Attachments
Patch (20.03 KB, patch)
2013-02-14 01:33 PST, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2013-02-14 01:33:08 PST
Joseph Pecoraro
Comment 2 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?
Kentaro Hara
Comment 3 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".
Adam Barth
Comment 4 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.
WebKit Review Bot
Comment 5 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>
WebKit Review Bot
Comment 6 2013-02-14 16:27:01 PST
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.