<rdar://problem/
5395928> Need to be able to handle context menu item selection by index
Reviewed by Beth.
WebCore:
* platform/ContextMenu.h: Added method to retrieve context menu item by index
* platform/win/ContextMenuWin.cpp:
(WebCore::ContextMenu::ContextMenu): call setPlatformDescription() since that will handle
adding the MNS_NOTIFYBYPOS style to the context menu.
(WebCore::contextMenuItemByIdOrPosition): helper method so we don't have to duplicate code
between itemWithAction() and itemAtIndex().
(WebCore::ContextMenu::itemWithAction):
(WebCore::ContextMenu::itemAtIndex):
(WebCore::ContextMenu::setPlatformDescription): add MNS_NOTIFYBYPOS style to the context menu
so we will get notified by menu position through WM_MENUCOMMAND when the item is selected.
WebKit/win:
* WebView.cpp:
(WebView::performContextMenuAction): performContextMenuAction() can now handle context menu
item selection via WM_MENUCOMMAND (by specifying byPosition to be true). In that case, we
get the ContextMenuItem by position rather than by action id.
(WebViewWndProc): handle WM_MENUCOMMAND
* WebView.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25426
268f45cc-cd09-0410-ab3c-
d52691b4dbfc