Source/WebKit/chromium/src/WebViewImpl.cpp
bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
{
    // The contextMenuController() holds onto the last context menu that was
    // popped up on the page until a new one is created. We need to clear
    // this menu before propagating the event through the DOM so that we can
    // detect if we create a new menu for this event, since we won't create
    // a new menu if the DOM swallows the event and the defaultEventHandler does
    // not run.
    page()->contextMenuController()->clearContextMenu();

    m_contextMenuAllowed = true;
    Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();
    bool handled = focusedFrame->eventHandler()->sendContextMenuEventForKey();
    m_contextMenuAllowed = false;
    return handled;
}
// Mac has no way to open a context menu based on a keyboard event.
Mac has no way to open a context menu based on a keyboard event.
Mac has no way to open a context menu based on a keyboard event .
bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
{
    page()->contextMenuController()->clearContextMenu();
    m_contextMenuAllowed = true;
    Frame* focusedFrame = page()->focusController()->focusedOrMainFrame();
    bool handled = focusedFrame->eventHandler()->sendContextMenuEventForKey();
    m_contextMenuAllowed = false;
    return handled;
}
bool WebViewImpl :: sendContextMenuEvent ( const WebKeyboardEvent & event ) { page ( ) -> contextMenuController ( ) -> clearContextMenu ( ) ; m_contextMenuAllowed = true ; Frame * focusedFrame = page ( ) -> focusController ( ) -> focusedOrMainFrame ( ) ; bool handled = focusedFrame -> eventHandler ( ) -> sendContextMenuEventForKey ( ) ; m_contextMenuAllowed = false ; return handled ; }
Mac has no way to open a context menu based on a keyboard event.
Mac has no way to open a context menu based on a keyboard event .
// The contextMenuController() holds onto the last context menu that was // popped up on the page until a new one is created. We need to clear // this menu before propagating the event through the DOM so that we can // detect if we create a new menu for this event, since we won't create // a new menu if the DOM swallows the event and the defaultEventHandler does // not run.