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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 21 06:57:13 PST 2017


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

--- Comment #33 from Tomas Popela <tpopela at redhat.com> ---
(In reply to comment #32)
> 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.

Sounds good, I will create it.

> > 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: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.

I'm not sure about this one, but I would trust the Chromium devs (that actually wrote that WebKit code) and they are using sendContextMenuEvent() - https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/input/EventHandler.cpp?rcl=f3a4c639191b2bd7b43581550b970e50d0f188d0&l=1906

-- 
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/20170221/d59149ab/attachment.html>


More information about the webkit-unassigned mailing list