Bug 35976 - On Window, dwItemData from a custom context menu item cannot be retrieved when that item is selected.
Summary: On Window, dwItemData from a custom context menu item cannot be retrieved whe...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Ada Chan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-10 10:19 PST by Ada Chan
Modified: 2010-03-10 11:07 PST (History)
0 users

See Also:


Attachments
Patch (1.09 KB, patch)
2010-03-10 10:24 PST, Ada Chan
aroben: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ada Chan 2010-03-10 10:19:21 PST
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.
Comment 1 Ada Chan 2010-03-10 10:24:07 PST
Created attachment 50413 [details]
Patch
Comment 2 Adam Roben (:aroben) 2010-03-10 10:34:14 PST
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
Comment 3 Ada Chan 2010-03-10 11:07:47 PST
Fixed in r55787.