In the event handler methods of NetscapePlugin we return with the return value of NPP_HandleEvent. It has been copied from the Mac implementation. This is wrong since on X11 the plugin return with 0 if it handled the event so we need to revert it. The result of this bug is that we immediately remove the focus from the plugin element just after it has been given to it.
Created attachment 98329 [details] Patch
Current result (without the patch): CONSOLE MESSAGE: line 0: PLUGIN: getFocusEvent CONSOLE MESSAGE: line 0: PLUGIN: mouseDown at (50, 50) CONSOLE MESSAGE: line 0: PLUGIN: loseFocusEvent CONSOLE MESSAGE: line 0: PLUGIN: mouseUp at (50, 50) CONSOLE MESSAGE: line 0: PLUGIN: getFocusEvent CONSOLE MESSAGE: line 0: PLUGIN: mouseDown at (60, 60) CONSOLE MESSAGE: line 0: PLUGIN: loseFocusEvent CONSOLE MESSAGE: line 0: PLUGIN: mouseUp at (70, 60) Tests for widget positions being correctly updated after scrolling. rdar://problem/7559069 Expected result: CONSOLE MESSAGE: line 0: PLUGIN: getFocusEvent CONSOLE MESSAGE: line 0: PLUGIN: mouseDown at (50, 50) CONSOLE MESSAGE: line 0: PLUGIN: mouseUp at (50, 50) CONSOLE MESSAGE: line 0: PLUGIN: mouseDown at (60, 60) CONSOLE MESSAGE: line 0: PLUGIN: mouseUp at (70, 60) Tests for widget positions being correctly updated after scrolling. rdar://problem/7559069
Comment on attachment 98329 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=98329&action=review I find it suspicious that the return value convention is in violation of https://developer.mozilla.org/en/NPP_HandleEvent but it's indeed what we already do in WebKit1. > Source/WebKit2/ChangeLog:9 > + Revert the return value of NPP_HandleEvent because the plugin function Revert -> Invert
Committed r90231: <http://trac.webkit.org/changeset/90231>