Bug 70636 - Event.h has too many virtual isMumbleEvent() functions
Summary: Event.h has too many virtual isMumbleEvent() functions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-21 13:11 PDT by Adam Barth
Modified: 2011-10-24 01:50 PDT (History)
8 users (show)

See Also:


Attachments
Patch (33.74 KB, patch)
2011-10-21 13:12 PDT, Adam Barth
no flags Details | Formatted Diff | Diff
Patch (30.15 KB, patch)
2011-10-21 13:38 PDT, Adam Barth
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2011-10-21 13:11:23 PDT
Event.h has too many virtual isMumbleEvent() functions
Comment 1 Adam Barth 2011-10-21 13:12:32 PDT
Created attachment 112006 [details]
Patch
Comment 2 Dimitri Glazkov (Google) 2011-10-21 13:16:50 PDT
Comment on attachment 112006 [details]
Patch

Whoa, this is freakishly cool.
Comment 3 Adam Barth 2011-10-21 13:17:25 PDT
It doesn't quite compile yet, but soon.
Comment 4 Adam Barth 2011-10-21 13:38:51 PDT
Created attachment 112012 [details]
Patch
Comment 5 Eric Seidel (no email) 2011-10-21 13:41:44 PDT
Comment on attachment 112006 [details]
Patch

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

> Source/WebCore/bindings/js/JSErrorHandler.cpp:56
> +    if (event->interfaceName() != eventNames().interfaceForErrorEvent)

I think you want a .hasInterfaceName() instead.

> Source/WebCore/bindings/objc/DOMEvents.mm:70
> +    if (desiredInterface == eventNames().interfaceForMessageEvent)

soooooo verbose.
Comment 6 Adam Barth 2011-10-21 13:42:29 PDT
(In reply to comment #5)
> (From update of attachment 112006 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=112006&action=review
> 
> > Source/WebCore/bindings/objc/DOMEvents.mm:70
> > +    if (desiredInterface == eventNames().interfaceForMessageEvent)
> 
> soooooo verbose.

Yes.  The actually-maintained bindings have this code autogenerated.
Comment 7 Adam Barth 2011-10-21 13:45:25 PDT
> I think you want a .hasInterfaceName() instead.

I'm happy to add that, but I'd like to do that in a follow up patch.
Comment 8 Adam Barth 2011-10-21 14:06:13 PDT
Committed r98146: <http://trac.webkit.org/changeset/98146>