[Webkit-unassigned] [Bug 83107] [X11][WebKit2][Plugins] wrong changing return-value for DefaultHandled
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 16 02:38:46 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=83107
--- Comment #2 from Simon Hausmann <hausmann at webkit.org> 2012-04-16 02:38:46 PST ---
(From update of attachment 135489)
View in context: https://bugs.webkit.org/attachment.cgi?id=135489&action=review
> Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:-447
> - return !NPP_HandleEvent(&xEvent);
In WebKit1 the code (PluginViewQt.cpp at least) reads like this:
bool dispatchNPEvent(...) {
...
bool accepted = !m_plugin->pluginFuncs()->event(m_instance, &event);
...
return accepted;
}
and then the caller uses
if (dispatchNPEvent(...))
event->setDefaultHandled();
It appears the code in WebKit2 is similar, where WebProcess/Plugins/PluginView.cpp uses a pattern like this:
bool didHandleEvent = false;
...
didHandleEvent = m_plugin->handleMouseEvent(...);
...
if (didHandleEvent)
event->setDefaultHandled();
The return value of platformHandleMouseEvent seems to be passed through and with using !NPP_HandleEvent(...)
I see the same transformation / interpretation of the return value from the plugin.
Either I am missing something, the code in WebKit1 is wrong, or your patch is incorrect :). In order to get this logic correct I think it would be worthwhile to have a layout tests for this, especially since we have the infrastructure in place with a test netscape plugin.
--
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