A WebKit client can add a custom context menu item to the context menu via the IWebUIDelegate::contextMenuItemsForElement(). That custom context menu item (the MENUITEMINFO object) can have a non-null dwItemData. If that context menu item is selected, IWebUIDelegate::contextMenuItemSelected() is called, but the MENUITEMINFO no longer has the dwItemData. That's because in contextMenuItemByIdOrPosition() in ContextMenuWin.cpp, we didn't specify MIIM_DATA in the fMask when copying over the menu item information.
Created attachment 50413 [details] Patch
Comment on attachment 50413 [details] Patch > Index: WebCore/ChangeLog > =================================================================== > --- WebCore/ChangeLog (revision 55785) > +++ WebCore/ChangeLog (working copy) > @@ -1,3 +1,13 @@ > +2010-03-10 Ada Chan <adachan@apple.com> > + > + Reviewed by NOBODY (OOPS!). > + > + https://bugs.webkit.org/show_bug.cgi?id=35976 > + > + Retrieve any dwItemData that's set on the context menu item in contextMenuItemByIdOrPosition(). I think you should mention that this is useful for WebKit clients who store data in this member for their custom menu items. r=me -Adam
Fixed in r55787.