From: Santino Mazza smazza@codeweavers.com
--- dlls/mshtml/htmldoc.c | 11 +++++++++++ dlls/mshtml/tests/dom.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index ac471e9e1a8..38feb2839f1 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -537,6 +537,17 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement TRACE("Could not get body: %08lx\n", nsres); return E_UNEXPECTED; } + }else { + nsAString nsnode_name; + nsIDOMDocumentFragment *frag; + + hres = nsIDOMNode_QueryInterface(This->node.nsnode, &IID_nsIDOMDocumentFragment, (void**)&frag); + if(hres == S_OK) { + nsAString_InitDepend(&nsnode_name, L"BODY"); + nsIDOMDocumentFragment_QuerySelector(frag, &nsnode_name, (nsIDOMElement **) &nsbody); + nsAString_Finish(&nsnode_name); + nsIDOMDocumentFragment_Release(frag); + } }
if(!nsbody) { diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index a726801a43e..eea3dbe7126 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -11063,7 +11063,7 @@ static void test_docfrag(IHTMLDocument2 *doc)
hres = IHTMLDocument2_get_body(frag, &body); ok(hres == S_OK, "get_body failed: %08lx\n", hres); - todo_wine ok(body != NULL, "body == NULL\n"); + ok(body != NULL, "body == NULL\n"); if (body) IHTMLElement_Release(body);