Bug 77208 - [WK2] WKPageGetContextMenuFromProposedContextMenuCallback should pass a HitTestResult
Summary: [WK2] WKPageGetContextMenuFromProposedContextMenuCallback should pass a HitTe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 05:38 PST by Carlos Garcia Campos
Modified: 2012-03-05 08:34 PST (History)
3 users (show)

See Also:


Attachments
Patch (26.01 KB, patch)
2012-01-31 02:32 PST, Carlos Garcia Campos
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2012-01-27 05:38:46 PST
The context menu client user might need more information about the element affected by the context menu. We are currently passing the image URL and link URL (this info isn't passed to the callback either, though) to use them  in context menu actions. Now that we have WebHitTestResultData in the C API, we could pass the HitTestResult and get rid of ContextMenuState. It would be passed in the ShowContextMenu message instead of the ContextMenuState and then to getContextMenuFromProposedMenu() in the UI process, like we currently do for the injected bundle context menu client.
What do you think? I'll make the patch if you think it's a good idea.
Comment 1 Anders Carlsson 2012-01-30 10:01:38 PST
Sounds good to me. Just keep in mind that we can't break the WebKit2 C API/ABI so you probably have to add a new callback.
Comment 2 Carlos Garcia Campos 2012-01-30 10:06:35 PST
(In reply to comment #1)
> Sounds good to me. Just keep in mind that we can't break the WebKit2 C API/ABI so you probably have to add a new callback.

Yes, sure. I'll write a patch then, thanks!
Comment 3 Carlos Garcia Campos 2012-01-31 02:32:14 PST
Created attachment 124690 [details]
Patch
Comment 4 WebKit Review Bot 2012-01-31 02:35:36 PST
Attachment 124690 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/update-webkit']" exit_code: 9

Updating OpenSource
First, rewinding head to replay your work on top of it...
Applying: Fix compilation errors on build-webkit --debug --no-workers on mac.
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging LayoutTests/ChangeLog
CONFLICT (content): Merge conflict in LayoutTests/ChangeLog
Auto-merging LayoutTests/platform/qt/Skipped
CONFLICT (content): Merge conflict in LayoutTests/platform/qt/Skipped
Auto-merging Source/WebCore/ChangeLog
CONFLICT (content): Merge conflict in Source/WebCore/ChangeLog
Failed to merge in the changes.
Patch failed at 0001 Fix compilation errors on build-webkit --debug --no-workers on mac.

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".

rebase refs/remotes/origin/master: command returned error: 1

Died at Tools/Scripts/update-webkit line 164.


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Carlos Garcia Campos 2012-03-05 08:34:49 PST
Committed r109750: <http://trac.webkit.org/changeset/109750>