mshtml: Added IDOMEvent::view property implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ab210dd7a4
commit
2e91bf3212
|
@ -1175,8 +1175,25 @@ static HRESULT WINAPI DOMUIEvent_Invoke(IDOMUIEvent *iface, DISPID dispIdMember,
|
|||
static HRESULT WINAPI DOMUIEvent_get_view(IDOMUIEvent *iface, IHTMLWindow2 **p)
|
||||
{
|
||||
DOMEvent *This = impl_from_IDOMUIEvent(iface);
|
||||
FIXME("(%p)->(%p)\n", This, p);
|
||||
return E_NOTIMPL;
|
||||
mozIDOMWindowProxy *moz_window;
|
||||
HTMLOuterWindow *view = NULL;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)->(%p)\n", This, p);
|
||||
|
||||
nsres = nsIDOMUIEvent_GetView(This->ui_event, &moz_window);
|
||||
if(NS_FAILED(nsres))
|
||||
return E_FAIL;
|
||||
|
||||
if(moz_window) {
|
||||
view = mozwindow_to_window(moz_window);
|
||||
mozIDOMWindowProxy_Release(moz_window);
|
||||
}
|
||||
if(view)
|
||||
IHTMLWindow2_AddRef((*p = &view->base.inner_window->base.IHTMLWindow2_iface));
|
||||
else
|
||||
*p = NULL;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI DOMUIEvent_get_detail(IDOMUIEvent *iface, LONG *p)
|
||||
|
@ -1210,6 +1227,9 @@ static HRESULT WINAPI DOMUIEvent_initUIEvent(IDOMUIEvent *iface, BSTR type, VARI
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
if(view)
|
||||
FIXME("view argument is not supported\n");
|
||||
|
||||
hres = IDOMEvent_initEvent(&This->IDOMEvent_iface, type, can_bubble, cancelable);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
@ -1463,6 +1483,9 @@ static HRESULT WINAPI DOMMouseEvent_initMouseEvent(IDOMMouseEvent *iface, BSTR t
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
if(view)
|
||||
FIXME("view argument is not supported\n");
|
||||
|
||||
hres = IDOMEvent_initEvent(&This->IDOMEvent_iface, type, can_bubble, cancelable);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
|
|
@ -3175,7 +3175,7 @@ interface nsIDOMUIEvent : nsISupports
|
|||
nsresult GetView(mozIDOMWindowProxy **aView);
|
||||
nsresult GetDetail(int32_t *aDetail);
|
||||
nsresult InitUIEvent(const nsAString *typeArg, bool canBubbleArg, bool cancelableArg,
|
||||
mozIDOMWindowProxy *viewArg, int32_t detailArg);
|
||||
mozIDOMWindow *viewArg, int32_t detailArg);
|
||||
nsresult GetLayerX(int32_t *aLayerX);
|
||||
nsresult GetLayerY(int32_t *aLayerY);
|
||||
nsresult GetPageX(int32_t *aPageX);
|
||||
|
|
|
@ -631,6 +631,8 @@ function test_mouse_event() {
|
|||
ok(e.cancelable === true, "cancelable = " + e.cancelable);
|
||||
ok(e.bubbles === true, "bubbles = " + e.bubbles);
|
||||
ok(e.detail === 1, "detail = " + e.detail);
|
||||
todo_wine.
|
||||
ok(e.view === window, "view != window");
|
||||
ok(e.screenX === 2, "screenX = " + e.screenX);
|
||||
ok(e.screenY === 3, "screenY = " + e.screenY);
|
||||
ok(e.clientX === 4, "clientX = " + e.clientX);
|
||||
|
@ -700,6 +702,8 @@ function test_ui_event() {
|
|||
ok(e.cancelable === true, "cancelable = " + e.cancelable);
|
||||
ok(e.bubbles === true, "bubbles = " + e.bubbles);
|
||||
ok(e.detail === 3, "detail = " + e.detail);
|
||||
todo_wine.
|
||||
ok(e.view === window, "view != window");
|
||||
|
||||
next_test();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue