Bug 77350 - All mouse events after a right click are ignored when they came from WebkitTestRunner
Summary: All mouse events after a right click are ignored when they came from WebkitTe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-30 12:04 PST by Hugo Parente Lima
Modified: 2012-02-28 16:37 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.36 KB, patch)
2012-01-30 12:15 PST, Hugo Parente Lima
no flags Details | Formatted Diff | Diff
Patch (2.99 KB, patch)
2012-02-24 05:43 PST, Hugo Parente Lima
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Parente Lima 2012-01-30 12:04:38 PST
When a right click comes to WebCore and it realize that a context menu should pop up to the user it sends back a event telling the UI process to show the context menu, but as described in bug#58406, a mouse release event may already be in the CoreIPC pipeline because the UI sent it before receiving the "show context menu" event from WebProcess. To solve this issue the patch from bug#58406 added a flag to tell WebPage if it should ignore the mouse release event (or any other mouse events).

WebKitTestRunner send events synchronized, so the issue reported on bug#58406 doesn't affect WebKitTestRunner, besides due to the sync nature of WebKitTestRunner it will only receive the showContextMenu (that was sent async) after it already sent all events, so all events sent after the right click event will be ignored by webcore.

The proposed patch removes the check when using synchronized events making some tests that are Skipped on many webkit2 ports pass. Another possible approach would send the showContextMenu/contextMenuHidden events sync, but contextMenuHidden is only used to fix bug#58406.

Please correct me if any assumptions I made are wrong.

Test now passing:
fast/events/mouse-click-events.html

Found on following skip lists:
qt-wk2/Skipped:57
efl/Skipped:1523
gtk/Skipped:839
mac-wk2/Skipped:146
win-wk2/Skipped:224

The patch only removes the test from qt-wk2 skip list, but it probably would make this test pass on other wk2 ports.
Comment 1 Hugo Parente Lima 2012-01-30 12:15:15 PST
Created attachment 124580 [details]
Patch
Comment 2 Chang Shu 2012-02-13 02:00:42 PST
Nice, have you tried to run all the tests to avoid regressions?
Comment 3 Hugo Parente Lima 2012-02-15 08:35:54 PST
I did it at the time I uploaded the patch, the results must be the same nowadays.
Comment 4 WebKit Review Bot 2012-02-15 11:22:20 PST
Comment on attachment 124580 [details]
Patch

Rejecting attachment 124580 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
ing file Source/WebKit2/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Hunk #1 succeeded at 1297 (offset 15 lines).
patching file LayoutTests/platform/qt-wk2/Skipped
Hunk #1 FAILED at 54.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/platform/qt-wk2/Skipped.rej

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Chang Shu']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue/

Full output: http://queues.webkit.org/results/11530252
Comment 5 Hugo Parente Lima 2012-02-16 20:29:01 PST
This reviewbot messge means I should rebase the patch myself and re-upload it?
Comment 6 Chang Shu 2012-02-17 00:55:41 PST
yes,simply replace oops with reviewer's name and cq+
Comment 7 Hugo Parente Lima 2012-02-24 05:43:50 PST
Created attachment 128720 [details]
Patch
Comment 8 Hugo Parente Lima 2012-02-24 05:46:03 PST
Patch finally rebased.
Comment 9 WebKit Review Bot 2012-02-28 16:35:11 PST
The commit-queue encountered the following flaky tests while processing attachment 128720 [details]:

css3/filters/effect-hue-rotate-hw.html bug 79845 (author: cmarrin@apple.com)
The commit-queue is continuing to process your patch.
Comment 10 WebKit Review Bot 2012-02-28 16:37:21 PST
Comment on attachment 128720 [details]
Patch

Clearing flags on attachment: 128720

Committed r109169: <http://trac.webkit.org/changeset/109169>
Comment 11 WebKit Review Bot 2012-02-28 16:37:28 PST
All reviewed patches have been landed.  Closing bug.