Commit 7594b653 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added beginning support for oncontextmenu event.

parent 3d0d2782
......@@ -308,15 +308,19 @@ static HRESULT WINAPI HTMLDocument3_get_dir(IHTMLDocument3 *iface, BSTR *p)
static HRESULT WINAPI HTMLDocument3_put_oncontextmenu(IHTMLDocument3 *iface, VARIANT v)
{
HTMLDocument *This = HTMLDOC3_THIS(iface);
FIXME("(%p)->()\n", This);
return E_NOTIMPL;
TRACE("(%p)->()\n", This);
return set_doc_event(This, EVENTID_CONTEXTMENU, &v);
}
static HRESULT WINAPI HTMLDocument3_get_oncontextmenu(IHTMLDocument3 *iface, VARIANT *p)
{
HTMLDocument *This = HTMLDOC3_THIS(iface);
FIXME("(%p)->(%p)\n", This, p);
return E_NOTIMPL;
TRACE("(%p)->(%p)\n", This, p);
return get_doc_event(This, EVENTID_CONTEXTMENU, p);
}
static HRESULT WINAPI HTMLDocument3_put_onstop(IHTMLDocument3 *iface, VARIANT v)
......
......@@ -56,6 +56,9 @@ static const WCHAR onchangeW[] = {'o','n','c','h','a','n','g','e',0};
static const WCHAR clickW[] = {'c','l','i','c','k',0};
static const WCHAR onclickW[] = {'o','n','c','l','i','c','k',0};
static const WCHAR contextmenuW[] = {'c','o','n','t','e','x','t','m','e','n','u',0};
static const WCHAR oncontextmenuW[] = {'o','n','c','o','n','t','e','x','t','m','e','n','u',0};
static const WCHAR dblclickW[] = {'d','b','l','c','l','i','c','k',0};
static const WCHAR ondblclickW[] = {'o','n','d','b','l','c','l','i','c','k',0};
......@@ -141,6 +144,8 @@ static const event_info_t event_info[] = {
EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
{clickW, onclickW, EVENTT_MOUSE, DISPID_EVMETH_ONCLICK,
EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
{contextmenuW, oncontextmenuW, EVENTT_MOUSE, DISPID_EVMETH_ONCONTEXTMENU,
EVENT_BUBBLE},
{dblclickW, ondblclickW, EVENTT_MOUSE, DISPID_EVMETH_ONDBLCLICK,
EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
{dragW, ondragW, EVENTT_MOUSE, DISPID_EVMETH_ONDRAG,
......
......@@ -21,6 +21,7 @@ typedef enum {
EVENTID_BLUR,
EVENTID_CHANGE,
EVENTID_CLICK,
EVENTID_CONTEXTMENU,
EVENTID_DBLCLICK,
EVENTID_DRAG,
EVENTID_DRAGSTART,
......
......@@ -32,6 +32,7 @@
#include "wine/unicode.h"
#include "mshtml_private.h"
#include "htmlevent.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
WINE_DECLARE_DEBUG_CHANNEL(gecko);
......@@ -1007,6 +1008,8 @@ static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuList
TRACE("(%p)->(%08x %p %p)\n", This, aContextFlags, aEvent, aNode);
fire_event(This->doc->basedoc.doc_node /* FIXME */, EVENTID_CONTEXTMENU, TRUE, aNode, aEvent);
nsres = nsIDOMEvent_QueryInterface(aEvent, &IID_nsIDOMMouseEvent, (void**)&event);
if(NS_FAILED(nsres)) {
ERR("Could not get nsIDOMMouseEvent interface: %08x\n", nsres);
......
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