Jacek Caban : mshtml: Added IHTMLObjectElement::get_width implementation.

Alexandre Julliard julliard at winehq.org
Thu Aug 16 15:26:14 CDT 2012


Module: wine
Branch: master
Commit: 500985bc19a23d29c845460bffb32d75645e9bac
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=500985bc19a23d29c845460bffb32d75645e9bac

Author: Jacek Caban <jacek at 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)




More information about the wine-cvs mailing list