Module: wine Branch: master Commit: 500985bc19a23d29c845460bffb32d75645e9bac URL: http://source.winehq.org/git/wine.git/?a=commit;h=500985bc19a23d29c845460bff...
Author: Jacek Caban jacek@codeweavers.com Date: Thu Aug 16 15:42:20 2012 +0200
mshtml: Added IHTMLObjectElement::get_width implementation.
---
dlls/mshtml/htmlobject.c | 24 ++++++++++++++++++++++-- 1 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c index 6c21814..6859749 100644 --- a/dlls/mshtml/htmlobject.c +++ b/dlls/mshtml/htmlobject.c @@ -278,8 +278,28 @@ static HRESULT WINAPI HTMLObjectElement_put_width(IHTMLObjectElement *iface, VAR static HRESULT WINAPI HTMLObjectElement_get_width(IHTMLObjectElement *iface, VARIANT *p) { HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString width_str; + nsresult nsres; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&width_str, NULL); + nsres = nsIDOMHTMLObjectElement_GetWidth(This->nsobject, &width_str); + if(NS_SUCCEEDED(nsres)) { + const PRUnichar *width; + + nsAString_GetData(&width_str, &width); + V_VT(p) = VT_BSTR; + V_BSTR(p) = SysAllocString(width); + hres = V_BSTR(p) ? S_OK : E_OUTOFMEMORY; + }else { + ERR("GetWidth failed: %08x\n", nsres); + hres = E_FAIL; + } + + nsAString_Finish(&width_str); + return hres; }
static HRESULT WINAPI HTMLObjectElement_put_height(IHTMLObjectElement *iface, VARIANT v)