<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - [WK2] Keyboard menu key should show context menu"
href="https://bugs.webkit.org/show_bug.cgi?id=72099#c33">Comment # 33</a>
on <a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - [WK2] Keyboard menu key should show context menu"
href="https://bugs.webkit.org/show_bug.cgi?id=72099">bug 72099</a>
from <span class="vcard"><a class="email" href="mailto:tpopela@redhat.com" title="Tomas Popela <tpopela@redhat.com>"> <span class="fn">Tomas Popela</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=72099#c32">comment #32</a>)
<span class="quote">> 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.</span >
Sounds good, I will create it.
<span class="quote">> > 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.</span >
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() - <a href="https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/input/EventHandler.cpp?rcl=f3a4c639191b2bd7b43581550b970e50d0f188d0&l=1906">https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/input/EventHandler.cpp?rcl=f3a4c639191b2bd7b43581550b970e50d0f188d0&l=1906</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>