Commit 6bf1250b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Don't use fire_event to dispatch contextmenu event.

parent 62e76f18
......@@ -1486,8 +1486,9 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
UINT32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode)
{
NSContainer *This = impl_from_nsIContextMenuListener(iface);
nsIDOMMouseEvent *event;
nsIDOMMouseEvent *mouse_event;
HTMLDOMNode *node;
DOMEvent *event;
POINT pt;
DWORD dwID = CONTEXT_MENU_DEFAULT;
nsresult nsres;
......@@ -1499,14 +1500,18 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
if(FAILED(hres))
return NS_ERROR_FAILURE;
fire_event(This->doc->basedoc.doc_node /* FIXME */, EVENTID_CONTEXTMENU, TRUE, &node->event_target, aEvent);
hres = create_event_from_nsevent(aEvent, &event);
if(SUCCEEDED(hres)) {
fire_event_obj(&node->event_target, event);
IDOMEvent_Release(&event->IDOMEvent_iface);
}
nsres = nsIDOMEvent_QueryInterface(aEvent, &IID_nsIDOMMouseEvent, (void**)&event);
nsres = nsIDOMEvent_QueryInterface(aEvent, &IID_nsIDOMMouseEvent, (void**)&mouse_event);
assert(NS_SUCCEEDED(nsres));
nsIDOMMouseEvent_GetScreenX(event, &pt.x);
nsIDOMMouseEvent_GetScreenY(event, &pt.y);
nsIDOMMouseEvent_Release(event);
nsIDOMMouseEvent_GetScreenX(mouse_event, &pt.x);
nsIDOMMouseEvent_GetScreenY(mouse_event, &pt.y);
nsIDOMMouseEvent_Release(mouse_event);
switch(aContextFlags) {
case CONTEXT_NONE:
......
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