mshtml: Added IHTMLElement::get_offsetHeight implementation.
This commit is contained in:
parent
5e0384ab6a
commit
e273bf1f43
|
@ -745,8 +745,27 @@ static HRESULT WINAPI HTMLElement_get_offsetWidth(IHTMLElement *iface, long *p)
|
||||||
static HRESULT WINAPI HTMLElement_get_offsetHeight(IHTMLElement *iface, long *p)
|
static HRESULT WINAPI HTMLElement_get_offsetHeight(IHTMLElement *iface, long *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = HTMLELEM_THIS(iface);
|
HTMLElement *This = HTMLELEM_THIS(iface);
|
||||||
FIXME("(%p)->(%p)\n", This, p);
|
nsIDOMNSHTMLElement *nselem;
|
||||||
return E_NOTIMPL;
|
PRInt32 offset = 0;
|
||||||
|
nsresult nsres;
|
||||||
|
|
||||||
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
|
||||||
|
if(NS_FAILED(nsres)) {
|
||||||
|
ERR("Could not get nsIDOMNSHTMLElement: %08x\n", nsres);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
nsres = nsIDOMNSHTMLElement_GetOffsetHeight(nselem, &offset);
|
||||||
|
nsIDOMNSHTMLElement_Release(nselem);
|
||||||
|
if(NS_FAILED(nsres)) {
|
||||||
|
ERR("GetOffsetHeight failed: %08x\n", nsres);
|
||||||
|
return E_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
*p = offset;
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLElement_get_offsetParent(IHTMLElement *iface, IHTMLElement **p)
|
static HRESULT WINAPI HTMLElement_get_offsetParent(IHTMLElement *iface, IHTMLElement **p)
|
||||||
|
|
|
@ -496,6 +496,9 @@ static void _test_elem_offset(unsigned line, IUnknown *unk)
|
||||||
hres = IHTMLElement_get_offsetTop(elem, &l);
|
hres = IHTMLElement_get_offsetTop(elem, &l);
|
||||||
ok_(__FILE__,line) (hres == S_OK, "get_offsetTop failed: %08x\n", hres);
|
ok_(__FILE__,line) (hres == S_OK, "get_offsetTop failed: %08x\n", hres);
|
||||||
|
|
||||||
|
hres = IHTMLElement_get_offsetHeight(elem, &l);
|
||||||
|
ok_(__FILE__,line) (hres == S_OK, "get_offsetHeight failed: %08x\n", hres);
|
||||||
|
|
||||||
IHTMLElement_Release(elem);
|
IHTMLElement_Release(elem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue