Jacek Caban : mshtml: Added semi-stub IHTMLSelectElement:: add implementation.

Alexandre Julliard julliard at winehq.org
Mon Jan 25 11:21:08 CST 2010


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Sun Jan 24 21:38:20 2010 +0100

mshtml: Added semi-stub IHTMLSelectElement::add implementation.

---

 dlls/mshtml/htmlselect.c |   22 ++++++++++++++++++++--
 1 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/htmlselect.c b/dlls/mshtml/htmlselect.c
index f9b7182..fccc912 100644
--- a/dlls/mshtml/htmlselect.c
+++ b/dlls/mshtml/htmlselect.c
@@ -332,8 +332,26 @@ static HRESULT WINAPI HTMLSelectElement_add(IHTMLSelectElement *iface, IHTMLElem
                                             VARIANT before)
 {
     HTMLSelectElement *This = HTMLSELECT_THIS(iface);
-    FIXME("(%p)->(%p v)\n", This, element);
-    return E_NOTIMPL;
+    IHTMLDOMNode *node, *tmp;
+    HRESULT hres;
+
+    FIXME("(%p)->(%p %s): semi-stub\n", This, element, debugstr_variant(&before));
+
+    if(V_VT(&before) != VT_EMPTY) {
+        FIXME("unhandled before %s\n", debugstr_variant(&before));
+        return E_NOTIMPL;
+    }
+
+    hres = IHTMLElement_QueryInterface(element, &IID_IHTMLDOMNode, (void**)&node);
+    if(FAILED(hres))
+        return hres;
+
+    hres = IHTMLDOMNode_appendChild(HTMLDOMNODE(&This->element.node), node, &tmp);
+    IHTMLDOMNode_Release(node);
+    if(SUCCEEDED(hres) && tmp)
+        IHTMLDOMNode_Release(tmp);
+
+    return hres;
 }
 
 static HRESULT WINAPI HTMLSelectElement_remove(IHTMLSelectElement *iface, LONG index)




More information about the wine-cvs mailing list