Commit f5ef66a3 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Pass the IDispatch interface of the element right-clicked on to…

mshtml: Pass the IDispatch interface of the element right-clicked on to IDocHostUIHandler_ShowContextMenu if applicable instead of always the document's one. Found by Rob Shearman.
parent 42349000
...@@ -362,7 +362,7 @@ NSContainer *NSContainer_Create(HTMLDocument*,NSContainer*); ...@@ -362,7 +362,7 @@ NSContainer *NSContainer_Create(HTMLDocument*,NSContainer*);
void NSContainer_Release(NSContainer*); void NSContainer_Release(NSContainer*);
void HTMLDocument_LockContainer(HTMLDocument*,BOOL); void HTMLDocument_LockContainer(HTMLDocument*,BOOL);
void show_context_menu(HTMLDocument*,DWORD,POINT*); void show_context_menu(HTMLDocument*,DWORD,POINT*,IDispatch*);
void notif_focus(HTMLDocument*); void notif_focus(HTMLDocument*);
void show_tooltip(HTMLDocument*,DWORD,DWORD,LPCWSTR); void show_tooltip(HTMLDocument*,DWORD,DWORD,LPCWSTR);
......
...@@ -997,7 +997,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList ...@@ -997,7 +997,7 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
FIXME("aContextFlags=%08x\n", aContextFlags); FIXME("aContextFlags=%08x\n", aContextFlags);
}; };
show_context_menu(This->doc, dwID, &pt); show_context_menu(This->doc, dwID, &pt, (IDispatch*)HTMLDOMNODE(get_node(This->doc, aNode)));
return NS_OK; return NS_OK;
} }
......
...@@ -852,14 +852,14 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = { ...@@ -852,14 +852,14 @@ static const IOleCommandTargetVtbl OleCommandTargetVtbl = {
OleCommandTarget_Exec OleCommandTarget_Exec
}; };
void show_context_menu(HTMLDocument *This, DWORD dwID, POINT *ppt) void show_context_menu(HTMLDocument *This, DWORD dwID, POINT *ppt, IDispatch *elem)
{ {
HMENU menu_res, menu; HMENU menu_res, menu;
DWORD cmdid; DWORD cmdid;
HRESULT hres; HRESULT hres;
hres = IDocHostUIHandler_ShowContextMenu(This->hostui, dwID, ppt, hres = IDocHostUIHandler_ShowContextMenu(This->hostui, dwID, ppt,
(IUnknown*)CMDTARGET(This), (IDispatch*)HTMLDOC(This)); (IUnknown*)CMDTARGET(This), elem);
if(hres == S_OK) if(hres == S_OK)
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment