From: Santino Mazza smazza@codeweavers.com
--- dlls/mshtml/htmldoc.c | 16 ++++++++++++++-- dlls/mshtml/tests/htmldoc.c | 22 +++++++++++----------- 2 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 118f4706f37..c34fe804720 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -5260,8 +5260,20 @@ static HRESULT WINAPI MarkupServices_CreateMarkupPointer(IMarkupServices *iface, static HRESULT WINAPI MarkupServices_CreateMarkupContainer(IMarkupServices *iface, IMarkupContainer **ppMarkupContainer) { HTMLDocumentNode *This = impl_from_IMarkupServices(iface); - FIXME("(%p)->(%p)\n", This, ppMarkupContainer); - return E_NOTIMPL; + IHTMLDocument2 *frag; + HRESULT hres; + TRACE("(%p)->(%p)\n", This, ppMarkupContainer); + + hres = IHTMLDocument3_createDocumentFragment(&This->IHTMLDocument3_iface, &frag); + if(hres != S_OK) + return hres; + + hres = IHTMLDocument2_QueryInterface(frag, &IID_IMarkupContainer, (void**)ppMarkupContainer); + if(hres != S_OK) + return hres; + + IHTMLDocument2_Release(frag); + return S_OK; }
static HRESULT WINAPI MarkupServices_CreateElement(IMarkupServices *iface, diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 1f382b23523..412dc5bb8bb 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -8361,35 +8361,35 @@ static void test_MarkupContainer(IMarkupServices *markup_services) HRESULT hres;
hres = IMarkupServices_CreateMarkupContainer(markup_services, &container); - todo_wine ok(hres == S_OK, "got 0x%08lx\n", hres); - todo_wine ok(container != NULL, "MarkupContainer is null.\n"); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(container != NULL, "MarkupContainer is null.\n"); if (!container) return;
hres = IMarkupContainer_QueryInterface(container, &IID_IHTMLDocument2, (void**)&markup_container_doc); - todo_wine ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(hres == S_OK, "got 0x%08lx\n", hres);
hres = IHTMLDocument2_get_location(markup_container_doc, &location); - todo_wine ok(hres == E_UNEXPECTED, "expected E_UNEXPECTED, got 0x%08lx\n", hres); - todo_wine ok(location == NULL, "expected null location\n"); + ok(hres == E_UNEXPECTED, "expected E_UNEXPECTED, got 0x%08lx\n", hres); + ok(location == NULL, "expected null location\n");
hres = IHTMLDocument2_get_body(markup_container_doc, &body); - todo_wine ok(hres == S_OK, "got 0x%08lx\n", hres); - todo_wine ok(body == NULL, "expected null body\n"); + ok(hres == S_OK, "got 0x%08lx\n", hres); + ok(body == NULL, "expected null body\n");
elements_count = get_document_elements_count(markup_container_doc); - todo_wine ok(elements_count == 0, "expected document to not have elements\n"); + ok(elements_count == 0, "expected document to not have elements\n");
hres = IMarkupContainer_QueryInterface(container, &IID_IHTMLDOMNode, (void**)&doc_node); todo_wine ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres);
hres = IHTMLDocument2_QueryInterface(markup_container_doc, &IID_IInternetSecurityManager, (void**)&sec_manager); - todo_wine ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres); + ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres);
hres = IHTMLDocument2_QueryInterface(markup_container_doc, &IID_ITargetContainer, (void**)&target_container_doc); - todo_wine ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres); + ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres);
hres = IHTMLDocument2_QueryInterface(markup_container_doc, &IID_ICustomDoc, (void**)&custom_doc); - todo_wine ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres); + ok(hres == E_NOINTERFACE, "expected to fail with E_NOINTERFACE got 0x%08lx\n", hres);
IHTMLDocument2_Release(markup_container_doc); IMarkupContainer_Release(container);