El mar, 22-10-2013 a las 10:40 +0200, Carlos Garcia Campos escribió: > While working on bug #77835, to make add/remove_event_listener > introspectable, I've noticed there are several issues with the way we > expose the EventTarget interface. > > It's defined as: > > void addEventListener(DOMString type, > EventListener listener, > optional boolean useCapture); > void removeEventListener(DOMString type, > EventListener listener, > optional boolean useCapture); > [RaisesException] boolean dispatchEvent(Event event); > > And we are doing several things differently: > > 1) Our add/remove_event_listener methods return gboolean. > 2) Our dispatch_event returns void > 3) But, we are also exposing dispatch_event in objects implementing > EventTarget as a public API returning gboolean > 4) As C Anthony pointed out in the bug, we have a bubble boolean > argument in add/remove_event_listener instead of capture
I've just noticed that we are actually using capture, but using the wrong name. The boolean argument we are receiving from the API is what we are passing to WebCore, see: http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/gobject/WebKitDOMEventTarget.cpp#L68 http://trac.webkit.org/browser/trunk/Source/WebCore/bindings/gobject/GObjectEventListener.h#L38 So, we can simply rename the argument as use_capture. -- Carlos Garcia Campos http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
signature.asc
Description: This is a digitally signed message part
_______________________________________________ webkit-gtk mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-gtk
