From: Santino Mazza smazza@codeweavers.com
--- dlls/mshtml/htmldoc.c | 10 ++++++++++ dlls/mshtml/tests/dom.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index ac471e9e1a8..e6555fbc3fc 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -538,6 +538,16 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement return E_UNEXPECTED; } } + else { + nsAString nsnode_name; + nsIDOMDocumentFragment *frag; + + nsIDOMNode_QueryInterface(This->node.nsnode, &IID_nsIDOMDocumentFragment, (void**)&frag); + nsAString_InitDepend(&nsnode_name, L"BODY"); + nsIDOMDocumentFragment_QuerySelector(frag, &nsnode_name, (nsIDOMElement**)&nsbody); + nsAString_Finish(&nsnode_name); + nsIDOMDocumentFragment_Release(frag); + }
if(!nsbody) { *p = NULL; 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);