mshtml: Added IHTMLDocument2::clear implementation.
This commit is contained in:
parent
95ded555e0
commit
3d0d27820f
|
@ -889,8 +889,25 @@ static HRESULT WINAPI HTMLDocument_close(IHTMLDocument2 *iface)
|
|||
static HRESULT WINAPI HTMLDocument_clear(IHTMLDocument2 *iface)
|
||||
{
|
||||
HTMLDocument *This = HTMLDOC_THIS(iface);
|
||||
FIXME("(%p)\n", This);
|
||||
return E_NOTIMPL;
|
||||
nsIDOMNSHTMLDocument *nsdoc;
|
||||
nsresult nsres;
|
||||
|
||||
TRACE("(%p)\n", This);
|
||||
|
||||
nsres = nsIDOMHTMLDocument_QueryInterface(This->doc_node->nsdoc, &IID_nsIDOMNSHTMLDocument, (void**)&nsdoc);
|
||||
if(NS_FAILED(nsres)) {
|
||||
ERR("Could not get nsIDOMNSHTMLDocument iface: %08x\n", nsres);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
nsres = nsIDOMNSHTMLDocument_Clear(nsdoc);
|
||||
nsIDOMNSHTMLDocument_Release(nsdoc);
|
||||
if(NS_FAILED(nsres)) {
|
||||
ERR("Clear failed: %08x\n", nsres);
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI HTMLDocument_queryCommandSupported(IHTMLDocument2 *iface, BSTR cmdID,
|
||||
|
|
|
@ -3405,6 +3405,14 @@ static void test_put_href(IHTMLDocument2 *doc)
|
|||
test_download(DWL_VERBDONE);
|
||||
}
|
||||
|
||||
static void test_clear(IHTMLDocument2 *doc)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
hres = IHTMLDocument2_clear(doc);
|
||||
ok(hres == S_OK, "clear failed: %08x\n", hres);
|
||||
}
|
||||
|
||||
static const OLECMDF expect_cmds[OLECMDID_GETPRINTTEMPLATE+1] = {
|
||||
0,
|
||||
OLECMDF_SUPPORTED, /* OLECMDID_OPEN */
|
||||
|
@ -4566,6 +4574,8 @@ static void test_HTMLDocument_hlink(void)
|
|||
test_Close(doc, FALSE);
|
||||
test_IsDirty(doc, S_FALSE);
|
||||
test_GetCurMoniker((IUnknown*)doc, &Moniker, NULL);
|
||||
test_clear(doc);
|
||||
test_GetCurMoniker((IUnknown*)doc, &Moniker, NULL);
|
||||
|
||||
if(view)
|
||||
IOleDocumentView_Release(view);
|
||||
|
|
Loading…
Reference in New Issue