[Webkit-unassigned] [Bug 77835] [GObject bindings] Make EventTarget interface introspectable

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 23 16:33:57 PDT 2013


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


Gustavo Noronha (kov) <gns at gnome.org> changed:

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




--- Comment #67 from Gustavo Noronha (kov) <gns at gnome.org>  2013-10-23 16:32:39 PST ---
(From update of attachment 214942)
LGTM!

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

>> Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp:49
>> -void webkit_dom_event_target_dispatch_event(WebKitDOMEventTarget* target, WebKitDOMEvent* event, GError** error)
>> +gboolean webkit_dom_event_target_dispatch_event(WebKitDOMEventTarget* target, WebKitDOMEvent* event, GError** error)
> 
> webkit_dom_event_target_dispatch_event is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]

Can you add exceptions for these checks along with this patch? It should be pretty straight-forward, just add it alongside WebKitDOMCustom in Tools/Scripts/webkitpy/style/checker.py, I believe.

> Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp:65
> +    GRefPtr<GClosure> closure = adoptGRef(g_cclosure_new(handler, userData, 0));
> +    return WEBKIT_DOM_EVENT_TARGET_GET_IFACE(target)->add_event_listener(target, eventName, closure.get(), useCapture);

I keep wondering if we should ditch GRefPtr here and do the adoption of the reference for the closure in the GObjectListener constructor. Feels like unnecessary churn but at the same time makes things more straight-forward and obvious I guess…

>> Source/WebCore/bindings/gobject/WebKitDOMEventTarget.h:64
>> +WEBKIT_API gboolean  webkit_dom_event_target_dispatch_event(WebKitDOMEventTarget *target,
> 
> The parameter name "target" adds no information, so it should be removed.  [readability/parameter_name] [5]

API break, but ABI stable, no sweat from my side =P

-- 
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