From: Santino Mazza smazza@codeweavers.com
--- dlls/mshtml/htmldoc.c | 8 ++++++++ dlls/mshtml/tests/dom.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index ac471e9e1a8..fda47690ddb 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -538,6 +538,14 @@ static HRESULT WINAPI HTMLDocument_get_body(IHTMLDocument2 *iface, IHTMLElement return E_UNEXPECTED; } } + else if(This->node.nsnode) { + nsAString nsnode_name; + + nsAString_Init(&nsnode_name, L"BODY"); + nsIDOMDocumentFragment_QuerySelector((nsIDOMDocumentFragment*)This->node.nsnode, + &nsnode_name, (nsIDOMElement**)&nsbody); + nsAString_Finish(&nsnode_name); + }
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);