Bug 76421 - Add proper offset to position right click to simulate a context menu invocation.
Summary: Add proper offset to position right click to simulate a context menu invocation.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Marc-André Decoste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-16 19:38 PST by Marc-André Decoste
Modified: 2012-01-20 13:05 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.79 KB, patch)
2012-01-17 07:31 PST, Marc-André Decoste
no flags Details | Formatted Diff | Diff
Patch (3.17 KB, patch)
2012-01-19 15:35 PST, Marc-André Decoste
no flags Details | Formatted Diff | Diff
Patch (3.35 KB, patch)
2012-01-19 15:51 PST, Marc-André Decoste
no flags Details | Formatted Diff | Diff
Patch (3.39 KB, patch)
2012-01-20 12:20 PST, Marc-André Decoste
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Decoste 2012-01-16 19:38:24 PST
Add proper offset to position right click to simulate a context menu invokatioon.
Comment 1 Marc-André Decoste 2012-01-17 07:31:05 PST
Created attachment 122767 [details]
Patch
Comment 2 Erik Arvidsson 2012-01-17 11:03:18 PST
Comment on attachment 122767 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=122767&action=review

> Source/WebCore/page/EventHandler.cpp:2337
> +        // In a multiline edit, firstRect.maxY() would endup on the next line, so -1.
> +        int y = firstRect.maxY() ? firstRect.maxY() - 1 : 0;

I find this strange. Why does this only happen for multiline edit and not for other cases?
Comment 3 Marc-André Decoste 2012-01-17 11:31:51 PST
For the same reason that it currently works if you are on the last line of a multiline textarea, there is no other line underneath it and you endup sending the click in the border/gap area which you can try with right clicks and you will notice the difference...
Comment 4 Ojan Vafai 2012-01-19 12:34:22 PST
Comment on attachment 122767 [details]
Patch

Patch looks fine. Can you make a manual test in the ManualTests directory?
Comment 5 Marc-André Decoste 2012-01-19 15:35:24 PST
Created attachment 123211 [details]
Patch
Comment 6 Marc-André Decoste 2012-01-19 15:36:05 PST
Comment on attachment 123211 [details]
Patch

How about this for the manual test?

Thanks!

BYE
MAD
Comment 7 Marc-André Decoste 2012-01-19 15:40:10 PST
No, wait, I just realized I was in the wrong manual test folder...

And I also noticed that there are already ManualTests for the context menu, so I'll piggyback on those...

Another patch is coming...

Sorry...
Comment 8 Marc-André Decoste 2012-01-19 15:51:59 PST
Created attachment 123214 [details]
Patch
Comment 9 Marc-André Decoste 2012-01-19 15:53:12 PST
Comment on attachment 123214 [details]
Patch

OK, how about this now?
Comment 10 WebKit Review Bot 2012-01-20 11:47:28 PST
Comment on attachment 123214 [details]
Patch

Rejecting attachment 123214 [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:
t/git/webkit-commit-queue/Source/WebKit/chromium/v8 --revision 10408 --non-interactive --force --accept theirs-conflict --ignore-externals' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
46>At revision 10408.

________ running '/usr/bin/python tools/clang/scripts/update.py --mac-only' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'

________ running '/usr/bin/python gyp_webkit' in '/mnt/git/webkit-commit-queue/Source/WebKit/chromium'
Updating webkit projects from gyp files...

Full output: http://queues.webkit.org/results/11311163
Comment 11 Ojan Vafai 2012-01-20 12:02:33 PST
Comment on attachment 123214 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=123214&action=review

> Source/WebCore/ChangeLog:8
> +        No new tests. (OOPS!)

This line is what killed the commit queue. You can just delete it since you've added a manual test.
Comment 12 Marc-André Decoste 2012-01-20 12:20:06 PST
Created attachment 123356 [details]
Patch
Comment 13 Marc-André Decoste 2012-01-20 12:22:06 PST
Comment on attachment 123356 [details]
Patch

All good now?

Thanks!
Comment 14 WebKit Review Bot 2012-01-20 13:05:27 PST
Comment on attachment 123356 [details]
Patch

Clearing flags on attachment: 123356

Committed r105538: <http://trac.webkit.org/changeset/105538>
Comment 15 WebKit Review Bot 2012-01-20 13:05:32 PST
All reviewed patches have been landed.  Closing bug.