Jacek Caban : mshtml: Added IHTMLElement2::focus implementation.

Alexandre Julliard julliard at winehq.org
Thu Jun 19 06:38:28 CDT 2008


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Jun 18 17:04:54 2008 -0500

mshtml: Added IHTMLElement2::focus implementation.

---

 dlls/mshtml/htmlelem2.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlelem2.c b/dlls/mshtml/htmlelem2.c
index 4430703..6ef3098 100644
--- a/dlls/mshtml/htmlelem2.c
+++ b/dlls/mshtml/htmlelem2.c
@@ -397,8 +397,20 @@ static HRESULT WINAPI HTMLElement2_get_tabIndex(IHTMLElement2 *iface, short *p)
 static HRESULT WINAPI HTMLElement2_focus(IHTMLElement2 *iface)
 {
     HTMLElement *This = HTMLELEM2_THIS(iface);
-    FIXME("(%p)\n", This);
-    return E_NOTIMPL;
+    nsIDOMNSHTMLElement *nselem;
+    nsresult nsres;
+
+    TRACE("(%p)\n", This);
+
+    nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem);
+    if(NS_SUCCEEDED(nsres)) {
+        nsIDOMNSHTMLElement_focus(nselem);
+        nsIDOMNSHTMLElement_Release(nselem);
+    }else {
+        ERR("Could not get nsIDOMHTMLNSElement: %08x\n", nsres);
+    }
+
+    return S_OK;
 }
 
 static HRESULT WINAPI HTMLElement2_put_accessKey(IHTMLElement2 *iface, BSTR v)




More information about the wine-cvs mailing list