<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&#64;redhat.com" title="Tomas Popela &lt;tpopela&#64;redhat.com&gt;"> <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">&gt; I think this should be testable. It would be better if you split the patch
&gt; in two, one for the webcore only changes with a layout test that checks that
&gt; the context menu is shown when triggered by the keyboard, checking all the
&gt; cases: focused node, selected content, no focused element, etc. This test
&gt; should probably be skipped initially for GTK+ until the other patch lands.
&gt; And another patch for the GTK+ specific part.</span >

Sounds good, I will create it.

<span class="quote">&gt; &gt; Source/WebCore/ChangeLog:27
&gt; &gt; +        Correctly send the mouse event that used for showing the context menu.
&gt; &gt; +        Previously the event was immediately dispatched as it is, but this was
&gt; &gt; +        only the right way if some element was focused on the page. If there
&gt; &gt; +        was no focused element or non-empty text range then the event lacked
&gt; &gt; +        the right node, where it was supposed to be shown. The correct node
&gt; &gt; +        is determined and added to the event in the sendContextMenuEvent() so
&gt; &gt; +        we have to use this function to send the event.
&gt; 
&gt; So the thing is, are we sure we also want to do all other things done by
&gt; sendContextMenuEvent() in the keyboard case?
&gt; 
&gt; &gt; Source/WebCore/page/EventHandler.cpp:2859
&gt; &gt; -    return !dispatchMouseEvent(eventNames().contextmenuEvent, targetNode, true, 0, platformMouseEvent, false);
&gt; &gt; +    return sendContextMenuEvent(platformMouseEvent);
&gt; 
&gt; My guess is that what we really need here is calling
&gt; Document::prepareMouseEvent() so maybe we can do that here instead of
&gt; reusing sendContextMenuEvent(), because I'm not sure we want to do all other
&gt; 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&amp;l=1906">https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/input/EventHandler.cpp?rcl=f3a4c639191b2bd7b43581550b970e50d0f188d0&amp;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>