[webkit-gtk] Looks like a bug to me...

Bob Murphy bobert at lavitanuova.com
Mon Sep 12 21:25:46 PDT 2011


I was digging around in the 1.4.2 sources with intention of writing some documentation on undocumented APIs, and ran across something puzzling.

In WebKitDomNode.cpp, the function webkit_dom_node_add_event_listener() accepts a "bubble" argument, and passes it unchanged to WebCore::GObjectEventListener::addEventListener().

However, the implementation of addEventListener(), in GObjectEventListener.h, has a "useCapture" argument at that same position. And digging past that, it does appear that argument means whether to fire the handler during the capture phase.

So it looks to me like the meaning of that argument gets flipped, so that if you attach a listener expecting it to be called during the bubble phase, it will be called during the capture phase, and vice versa.

Am I misunderstanding something here? Or should I file a bug and a patch?

Thanks,
Bob



More information about the webkit-gtk mailing list