Bug 63239 - [X11][WK2] plugins/mouse-evets-fixedpos.html is failing because of broken event propagation
Summary: [X11][WK2] plugins/mouse-evets-fixedpos.html is failing because of broken eve...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Balazs Kelemen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-23 02:38 PDT by Balazs Kelemen
Modified: 2011-07-01 09:17 PDT (History)
0 users

See Also:


Attachments
Patch (4.33 KB, patch)
2011-06-23 03:07 PDT, Balazs Kelemen
kling: review+
kling: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2011-06-23 02:38:48 PDT
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.
Comment 1 Balazs Kelemen 2011-06-23 03:07:33 PDT
Created attachment 98329 [details]
Patch
Comment 2 Balazs Kelemen 2011-06-23 03:51:19 PDT
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 3 Andreas Kling 2011-07-01 08:41:42 PDT
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
Comment 4 Balazs Kelemen 2011-07-01 09:17:59 PDT
Committed r90231: <http://trac.webkit.org/changeset/90231>