[PATCH] Implement IHTMLElement get_document

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Thu Oct 30 05:38:23 CDT 2008


---
 dlls/mshtml/htmlelem.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c
index 4e7b747..243d8ef 100644
--- a/dlls/mshtml/htmlelem.c
+++ b/dlls/mshtml/htmlelem.c
@@ -579,8 +579,19 @@ static HRESULT WINAPI HTMLElement_get_onmouseup(IHTMLElement *iface, VARIANT *p)
 static HRESULT WINAPI HTMLElement_get_document(IHTMLElement *iface, IDispatch **p)
 {
     HTMLElement *This = HTMLELEM_THIS(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    IHTMLDocument *pDoc;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    if(!p)
+        return E_POINTER;
+
+    *p = NULL;
+
+    pDoc = (IHTMLDocument*)This->node.doc;
+    IHTMLDocument_AddRef(pDoc);
+
+    return hr;
 }
 
 static HRESULT WINAPI HTMLElement_put_title(IHTMLElement *iface, BSTR v)
-- 
1.5.4.3


--------------080804000100080507040103--



More information about the wine-patches mailing list