From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlattr.c | 8 ++++++-- dlls/mshtml/tests/dom.c | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index b41d84083c5..965aa68c7b8 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -285,8 +285,12 @@ static HRESULT WINAPI HTMLDOMAttribute2_insertBefore(IHTMLDOMAttribute2 *iface, VARIANT refChild, IHTMLDOMNode **node) { HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute2(iface); - FIXME("(%p)->(%p %s %p)\n", This, newChild, debugstr_variant(&refChild), node); - return E_NOTIMPL; + + TRACE("(%p)->(%p %s %p)\n", This, newChild, debugstr_variant(&refChild), node); + + /* mostly a stub, doesn't really insert anything on native either */ + *node = NULL; + return S_OK; }
static HRESULT WINAPI HTMLDOMAttribute2_replaceChild(IHTMLDOMAttribute2 *iface, IHTMLDOMNode *newChild, diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index b562ca85143..5b043ff4b93 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -10015,6 +10015,11 @@ static void test_attr_node(IHTMLDOMAttribute *test_attr, IHTMLDocument2 *doc) ok(hres == S_OK, "appendChild failed: %08lx\n", hres); ok(!node, "appended child != NULL\n");
+ V_VT(&v) = VT_NULL; + hres = IHTMLDOMAttribute2_insertBefore(attr, elem_node, v, &node); + ok(hres == S_OK, "insertBefore failed: %08lx\n", hres); + ok(!node, "inserted node != NULL\n"); + IHTMLDOMNode_Release(elem_node); IHTMLDOMAttribute2_Release(attr); }