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.
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.
(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!
Created attachment 124690 [details] Patch
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.
Committed r109750: <http://trac.webkit.org/changeset/109750>