mshtml: Don't use PRInt32 in htmlelem*.
This commit is contained in:
parent
fa5f513eed
commit
c55b777c7c
|
@ -846,72 +846,64 @@ static HRESULT WINAPI HTMLElement_get_lang(IHTMLElement *iface, BSTR *p)
|
||||||
static HRESULT WINAPI HTMLElement_get_offsetLeft(IHTMLElement *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement_get_offsetLeft(IHTMLElement *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement(iface);
|
HTMLElement *This = impl_from_IHTMLElement(iface);
|
||||||
PRInt32 off_left = 0;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_GetOffsetLeft(This->nselem, &off_left);
|
nsres = nsIDOMHTMLElement_GetOffsetLeft(This->nselem, p);
|
||||||
if(NS_FAILED(nsres)) {
|
if(NS_FAILED(nsres)) {
|
||||||
ERR("GetOffsetLeft failed: %08x\n", nsres);
|
ERR("GetOffsetLeft failed: %08x\n", nsres);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*p = off_left;
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLElement_get_offsetTop(IHTMLElement *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement_get_offsetTop(IHTMLElement *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement(iface);
|
HTMLElement *This = impl_from_IHTMLElement(iface);
|
||||||
PRInt32 top = 0;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_GetOffsetTop(This->nselem, &top);
|
nsres = nsIDOMHTMLElement_GetOffsetTop(This->nselem, p);
|
||||||
if(NS_FAILED(nsres)) {
|
if(NS_FAILED(nsres)) {
|
||||||
ERR("GetOffsetTop failed: %08x\n", nsres);
|
ERR("GetOffsetTop failed: %08x\n", nsres);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*p = top;
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLElement_get_offsetWidth(IHTMLElement *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement_get_offsetWidth(IHTMLElement *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement(iface);
|
HTMLElement *This = impl_from_IHTMLElement(iface);
|
||||||
PRInt32 offset = 0;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_GetOffsetWidth(This->nselem, &offset);
|
nsres = nsIDOMHTMLElement_GetOffsetWidth(This->nselem, p);
|
||||||
if(NS_FAILED(nsres)) {
|
if(NS_FAILED(nsres)) {
|
||||||
ERR("GetOffsetWidth failed: %08x\n", nsres);
|
ERR("GetOffsetWidth failed: %08x\n", nsres);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*p = offset;
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLElement_get_offsetHeight(IHTMLElement *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement_get_offsetHeight(IHTMLElement *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement(iface);
|
HTMLElement *This = impl_from_IHTMLElement(iface);
|
||||||
PRInt32 offset = 0;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_GetOffsetHeight(This->nselem, &offset);
|
nsres = nsIDOMHTMLElement_GetOffsetHeight(This->nselem, p);
|
||||||
if(NS_FAILED(nsres)) {
|
if(NS_FAILED(nsres)) {
|
||||||
ERR("GetOffsetHeight failed: %08x\n", nsres);
|
ERR("GetOffsetHeight failed: %08x\n", nsres);
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*p = offset;
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <assert.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
|
@ -674,7 +675,7 @@ static HRESULT WINAPI HTMLElement2_put_tabIndex(IHTMLElement2 *iface, short v)
|
||||||
static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
|
static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
PRInt32 index = 0;
|
LONG index;
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
@ -807,42 +808,37 @@ static HRESULT WINAPI HTMLElement2_removeFilter(IHTMLElement2 *iface, IUnknown *
|
||||||
static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement2_get_clientHeight(IHTMLElement2 *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
PRInt32 height=0;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsIDOMHTMLElement_GetClientHeight(This->nselem, &height);
|
nsres = nsIDOMHTMLElement_GetClientHeight(This->nselem, p);
|
||||||
|
assert(nsres == NS_OK);
|
||||||
*p = height;
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement2_get_clientWidth(IHTMLElement2 *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
PRInt32 width=0;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsIDOMHTMLElement_GetClientWidth(This->nselem, &width);
|
nsres = nsIDOMHTMLElement_GetClientWidth(This->nselem, p);
|
||||||
|
assert(nsres == NS_OK);
|
||||||
*p = width;
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
PRInt32 client_top = 0;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_GetClientTop(This->nselem, &client_top);
|
nsres = nsIDOMHTMLElement_GetClientTop(This->nselem, p);
|
||||||
if(NS_FAILED(nsres))
|
assert(nsres == NS_OK);
|
||||||
ERR("GetScrollHeight failed: %08x\n", nsres);
|
|
||||||
|
|
||||||
*p = client_top;
|
|
||||||
TRACE("*p = %d\n", *p);
|
TRACE("*p = %d\n", *p);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -850,16 +846,13 @@ static HRESULT WINAPI HTMLElement2_get_clientTop(IHTMLElement2 *iface, LONG *p)
|
||||||
static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement2_get_clientLeft(IHTMLElement2 *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
PRInt32 client_left = 0;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_GetClientLeft(This->nselem, &client_left);
|
nsres = nsIDOMHTMLElement_GetClientLeft(This->nselem, p);
|
||||||
if(NS_FAILED(nsres))
|
assert(nsres == NS_OK);
|
||||||
ERR("GetScrollHeight failed: %08x\n", nsres);
|
|
||||||
|
|
||||||
*p = client_left;
|
|
||||||
TRACE("*p = %d\n", *p);
|
TRACE("*p = %d\n", *p);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -1003,16 +996,13 @@ static HRESULT WINAPI HTMLElement2_createControlRange(IHTMLElement2 *iface, IDis
|
||||||
static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
PRInt32 height = 0;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_GetScrollHeight(This->nselem, &height);
|
nsres = nsIDOMHTMLElement_GetScrollHeight(This->nselem, p);
|
||||||
if(NS_FAILED(nsres))
|
assert(nsres == NS_OK);
|
||||||
ERR("GetScrollHeight failed: %08x\n", nsres);
|
|
||||||
|
|
||||||
*p = height;
|
|
||||||
TRACE("*p = %d\n", *p);
|
TRACE("*p = %d\n", *p);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -1020,16 +1010,13 @@ static HRESULT WINAPI HTMLElement2_get_scrollHeight(IHTMLElement2 *iface, LONG *
|
||||||
static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement2_get_scrollWidth(IHTMLElement2 *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
PRInt32 width = 0;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_GetScrollWidth(This->nselem, &width);
|
nsres = nsIDOMHTMLElement_GetScrollWidth(This->nselem, p);
|
||||||
if(NS_FAILED(nsres))
|
assert(nsres == NS_OK);
|
||||||
ERR("GetScrollWidth failed: %08x\n", nsres);
|
|
||||||
|
|
||||||
*p = width;
|
|
||||||
TRACE("*p = %d\n", *p);
|
TRACE("*p = %d\n", *p);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -1052,16 +1039,13 @@ static HRESULT WINAPI HTMLElement2_put_scrollTop(IHTMLElement2 *iface, LONG v)
|
||||||
static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement2_get_scrollTop(IHTMLElement2 *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
PRInt32 top = 0;
|
|
||||||
nsresult nsres;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
nsres = nsIDOMHTMLElement_GetScrollTop(This->nselem, &top);
|
nsres = nsIDOMHTMLElement_GetScrollTop(This->nselem, p);
|
||||||
if(NS_FAILED(nsres))
|
assert(nsres == NS_OK);
|
||||||
ERR("GetScrollTop failed: %08x\n", nsres);
|
|
||||||
|
|
||||||
*p = top;
|
|
||||||
TRACE("*p = %d\n", *p);
|
TRACE("*p = %d\n", *p);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
@ -1084,7 +1068,7 @@ static HRESULT WINAPI HTMLElement2_put_scrollLeft(IHTMLElement2 *iface, LONG v)
|
||||||
static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, LONG *p)
|
static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, LONG *p)
|
||||||
{
|
{
|
||||||
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
HTMLElement *This = impl_from_IHTMLElement2(iface);
|
||||||
PRInt32 left = 0;
|
nsresult nsres;
|
||||||
|
|
||||||
TRACE("(%p)->(%p)\n", This, p);
|
TRACE("(%p)->(%p)\n", This, p);
|
||||||
|
|
||||||
|
@ -1097,9 +1081,9 @@ static HRESULT WINAPI HTMLElement2_get_scrollLeft(IHTMLElement2 *iface, LONG *p)
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIDOMHTMLElement_GetScrollLeft(This->nselem, &left);
|
nsres = nsIDOMHTMLElement_GetScrollLeft(This->nselem, p);
|
||||||
|
assert(nsres == NS_OK);
|
||||||
|
|
||||||
*p = left;
|
|
||||||
TRACE("*p = %d\n", *p);
|
TRACE("*p = %d\n", *p);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue