Bug 21432 - Auto-generate the DOMEventTarget protocol implementation for DOMNode and DOMSVGElementInstance
: Auto-generate the DOMEventTarget protocol implementation for DOMNode and DOMS...
Status: RESOLVED FIXED
: WebKit
WebKit API
: 528+ (Nightly build)
: Macintosh Mac OS X 10.5
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-10-07 10:21 PST by
Modified: 2008-10-07 14:49 PST (History)


Attachments
Proposed patch (30.38 KB, patch)
2008-10-07 10:21 PST, Timothy Hatcher
darin: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-10-07 10:21:31 PST
We should auto-generate these protocol implementations.
------- Comment #1 From 2008-10-07 10:21:59 PST -------
Created an attachment (id=24149) [details]
Proposed patch
------- Comment #2 From 2008-10-07 10:30:58 PST -------
(From update of attachment 24149 [details])
+ #if defined(LANGUAGE_OBJECTIVE_C)
+         : Object, EventTarget
+ #endif /* defined(LANGUAGE_OBJECTIVE_C) */

What's "Object" here and why is it needed? Why does this need to be ObjC-specific?
------- Comment #3 From 2008-10-07 10:50:21 PST -------
(In reply to comment #2)
> (From update of attachment 24149 [details] [edit])
> + #if defined(LANGUAGE_OBJECTIVE_C)
> +         : Object, EventTarget
> + #endif /* defined(LANGUAGE_OBJECTIVE_C) */
> 
> What's "Object" here and why is it needed? Why does this need to be
> ObjC-specific?
> 

Object will turn into DOMObject. This is needed to take the code generator down the right path of multiple super-classes as protocols.

It is ObjC only for legacy reasons. The event target methods are normally on NodeEventTarget, a subclass of Node. But the ObjC API has never has this sub-class and  they are on DOMNode.

I will add this info to the ChangeLog.
------- Comment #4 From 2008-10-07 14:49:55 PST -------
Landed in r37395.