[Webkit-unassigned] [Bug 72099] [WK2] Keyboard menu key should show context menu

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 17 02:00:09 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=72099

--- Comment #32 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 290201
  --> https://bugs.webkit.org/attachment.cgi?id=290201
Fix the build on Mac

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

I think this should be testable. It would be better if you split the patch in two, one for the webcore only changes with a layout test that checks that the context menu is shown when triggered by the keyboard, checking all the cases: focused node, selected content, no focused element, etc. This test should probably be skipped initially for GTK+ until the other patch lands. And another patch for the GTK+ specific part.

> Source/WebCore/ChangeLog:27
> +        Correctly send the mouse event that used for showing the context menu.
> +        Previously the event was immediately dispatched as it is, but this was
> +        only the right way if some element was focused on the page. If there
> +        was no focused element or non-empty text range then the event lacked
> +        the right node, where it was supposed to be shown. The correct node
> +        is determined and added to the event in the sendContextMenuEvent() so
> +        we have to use this function to send the event.

So the thing is, are we sure we also want to do all other things done by sendContextMenuEvent() in the keyboard case?

> Source/WebCore/page/EventHandler.cpp:2823
> +        // FIXME On WebKit2 this returns quite a bigger rectangle than the element

Is this really a problem specific to WebKit2? Use : after FIXME.

> Source/WebCore/page/EventHandler.cpp:2859
> -    return !dispatchMouseEvent(eventNames().contextmenuEvent, targetNode, true, 0, platformMouseEvent, false);
> +    return sendContextMenuEvent(platformMouseEvent);

My guess is that what we really need here is calling Document::prepareMouseEvent() so maybe we can do that here instead of reusing sendContextMenuEvent(), because I'm not sure we want to do all other tings done there.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161017/61e2e784/attachment.html>


More information about the webkit-unassigned mailing list