[Webkit-unassigned] [Bug 49649] [GTK] On-demand event-listeners for DOM event signals

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 18 10:10:41 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=49649


Martin Robinson <mrobinson at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #86173|review?                     |review+
               Flag|                            |




--- Comment #12 from Martin Robinson <mrobinson at webkit.org>  2011-03-18 10:10:42 PST ---
(From update of attachment 86173)
View in context: https://bugs.webkit.org/attachment.cgi?id=86173&action=review

Nice!

> Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp:87
> +    WebKitDOMEventTargetIface* iface;
> +
> +    g_return_val_if_fail(WEBKIT_DOM_IS_EVENT_TARGET(target), FALSE);
> +    g_return_val_if_fail(eventName, FALSE);
> +
> +    iface = WEBKIT_DOM_EVENT_TARGET_GET_IFACE(target);

You'd save a few lines by moving the the declaration of iface to where you first use it.

> Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp:102
> +    WebKitDOMEventTargetIface* iface;
> +
> +    g_return_val_if_fail(WEBKIT_DOM_IS_EVENT_TARGET(target), FALSE);
> +    g_return_val_if_fail(eventName, FALSE);
> +
> +    iface = WEBKIT_DOM_EVENT_TARGET_GET_IFACE(target);

Ditto.

> Source/WebCore/bindings/gobject/WebKitDOMEventTarget.h:52
> +
> +    gboolean      (* add_event_listener)(WebKitDOMEventTarget* target,
> +                                         const char          * eventName,
> +                                         GCallback             handler,
> +                                         gboolean              bubble,
> +                                         gpointer              userData);
> +    gboolean      (* remove_event_listener)(WebKitDOMEventTarget* target,
> +                                            const char          * eventName,
> +                                            GCallback             handler,
> +                                            gboolean              bubble);

The asterisk placement seems inconsistent here.

> Source/WebCore/bindings/gobject/WebKitDOMEventTarget.h:72
> +WEBKIT_API gboolean  webkit_dom_event_target_add_event_listener(WebKitDOMEventTarget *target,
> +                                                                const char           *eventName,
> +                                                                GCallback             handler,
> +                                                                gboolean              bubble,
> +                                                                gpointer              userData);
> +
> +WEBKIT_API gboolean  webkit_dom_event_target_remove_event_listener(WebKitDOMEventTarget *target,
> +                                                                   const char           *eventName,
> +                                                                   GCallback             handler,
> +                                                                   gboolean              bubble);
> +

And here as well.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list