mshtml: Added ISupportErrorInfo for IHTMLDocument.
This commit is contained in:
parent
e985ca06cf
commit
bf2e1f08d3
|
@ -129,6 +129,9 @@ static HRESULT WINAPI HTMLDocument_QueryInterface(IHTMLDocument2 *iface, REFIID
|
||||||
}else if(IsEqualGUID(&DIID_DispHTMLDocument, riid)) {
|
}else if(IsEqualGUID(&DIID_DispHTMLDocument, riid)) {
|
||||||
TRACE("(%p)->(DIID_DispHTMLDocument %p)\n", This, ppvObject);
|
TRACE("(%p)->(DIID_DispHTMLDocument %p)\n", This, ppvObject);
|
||||||
*ppvObject = HTMLDOC(This);
|
*ppvObject = HTMLDOC(This);
|
||||||
|
}else if(IsEqualGUID(&IID_ISupportErrorInfo, riid)) {
|
||||||
|
TRACE("(%p)->(IID_ISupportErrorInfo %p)\n", This, ppvObject);
|
||||||
|
*ppvObject = SUPPERRINFO(This);
|
||||||
}else if(IsEqualGUID(&CLSID_CMarkup, riid)) {
|
}else if(IsEqualGUID(&CLSID_CMarkup, riid)) {
|
||||||
FIXME("(%p)->(CLSID_CMarkup %p)\n", This, ppvObject);
|
FIXME("(%p)->(CLSID_CMarkup %p)\n", This, ppvObject);
|
||||||
return E_NOINTERFACE;
|
return E_NOINTERFACE;
|
||||||
|
@ -1572,6 +1575,39 @@ static const IHTMLDocument2Vtbl HTMLDocumentVtbl = {
|
||||||
HTMLDocument_createStyleSheet
|
HTMLDocument_createStyleSheet
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define SUPPINFO_THIS(iface) DEFINE_THIS(HTMLDocument, SupportErrorInfo, iface)
|
||||||
|
|
||||||
|
static HRESULT WINAPI SupportErrorInfo_QueryInterface(ISupportErrorInfo *iface, REFIID riid, void **ppv)
|
||||||
|
{
|
||||||
|
HTMLDocument *This = SUPPINFO_THIS(iface);
|
||||||
|
return IHTMLDocument_QueryInterface(HTMLDOC(This), riid, ppv);
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI SupportErrorInfo_AddRef(ISupportErrorInfo *iface)
|
||||||
|
{
|
||||||
|
HTMLDocument *This = SUPPINFO_THIS(iface);
|
||||||
|
return IHTMLDocument_AddRef(HTMLDOC(This));
|
||||||
|
}
|
||||||
|
|
||||||
|
static ULONG WINAPI SupportErrorInfo_Release(ISupportErrorInfo *iface)
|
||||||
|
{
|
||||||
|
HTMLDocument *This = SUPPINFO_THIS(iface);
|
||||||
|
return IHTMLDocument_Release(HTMLDOC(This));
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT WINAPI SupportErrorInfo_InterfaceSupportsErrorInfo(ISupportErrorInfo *iface, REFIID riid)
|
||||||
|
{
|
||||||
|
FIXME("(%p)->(%s)\n", iface, debugstr_guid(riid));
|
||||||
|
return S_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const ISupportErrorInfoVtbl SupportErrorInfoVtbl = {
|
||||||
|
SupportErrorInfo_QueryInterface,
|
||||||
|
SupportErrorInfo_AddRef,
|
||||||
|
SupportErrorInfo_Release,
|
||||||
|
SupportErrorInfo_InterfaceSupportsErrorInfo
|
||||||
|
};
|
||||||
|
|
||||||
#define DISPEX_THIS(iface) DEFINE_THIS(HTMLDocument, IDispatchEx, iface)
|
#define DISPEX_THIS(iface) DEFINE_THIS(HTMLDocument, IDispatchEx, iface)
|
||||||
|
|
||||||
static HRESULT WINAPI DocDispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
|
static HRESULT WINAPI DocDispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid, void **ppv)
|
||||||
|
@ -1742,6 +1778,7 @@ static HRESULT alloc_doc(HTMLDocument **ret)
|
||||||
doc = heap_alloc_zero(sizeof(HTMLDocument));
|
doc = heap_alloc_zero(sizeof(HTMLDocument));
|
||||||
doc->lpHTMLDocument2Vtbl = &HTMLDocumentVtbl;
|
doc->lpHTMLDocument2Vtbl = &HTMLDocumentVtbl;
|
||||||
doc->lpIDispatchExVtbl = &DocDispatchExVtbl;
|
doc->lpIDispatchExVtbl = &DocDispatchExVtbl;
|
||||||
|
doc->lpSupportErrorInfoVtbl = &SupportErrorInfoVtbl;
|
||||||
doc->ref = 1;
|
doc->ref = 1;
|
||||||
doc->readystate = READYSTATE_UNINITIALIZED;
|
doc->readystate = READYSTATE_UNINITIALIZED;
|
||||||
doc->scriptmode = SCRIPTMODE_GECKO;
|
doc->scriptmode = SCRIPTMODE_GECKO;
|
||||||
|
|
|
@ -238,7 +238,7 @@ struct HTMLDocument {
|
||||||
const IPersistStreamInitVtbl *lpPersistStreamInitVtbl;
|
const IPersistStreamInitVtbl *lpPersistStreamInitVtbl;
|
||||||
const ICustomDocVtbl *lpCustomDocVtbl;
|
const ICustomDocVtbl *lpCustomDocVtbl;
|
||||||
const IDispatchExVtbl *lpIDispatchExVtbl;
|
const IDispatchExVtbl *lpIDispatchExVtbl;
|
||||||
|
const ISupportErrorInfoVtbl *lpSupportErrorInfoVtbl;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
|
|
||||||
NSContainer *nscontainer;
|
NSContainer *nscontainer;
|
||||||
|
@ -474,6 +474,8 @@ typedef struct {
|
||||||
|
|
||||||
#define DISPATCHEX(x) ((IDispatchEx*) &(x)->lpIDispatchExVtbl)
|
#define DISPATCHEX(x) ((IDispatchEx*) &(x)->lpIDispatchExVtbl)
|
||||||
|
|
||||||
|
#define SUPPERRINFO(x) ((ISupportErrorInfo*) &(x)->lpSupportErrorInfoVtbl)
|
||||||
|
|
||||||
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
|
#define DEFINE_THIS2(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,ifc)))
|
||||||
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
|
#define DEFINE_THIS(cls,ifc,iface) DEFINE_THIS2(cls,lp ## ifc ## Vtbl,iface)
|
||||||
|
|
||||||
|
|
|
@ -4135,6 +4135,31 @@ static void gecko_installer_workaround(BOOL disable)
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_HTMLDoc_ISupportErrorInfo(void)
|
||||||
|
{
|
||||||
|
HRESULT hres;
|
||||||
|
IUnknown *unk;
|
||||||
|
ISupportErrorInfo *sinfo;
|
||||||
|
LONG ref;
|
||||||
|
|
||||||
|
hres = create_document(&unk);
|
||||||
|
if(FAILED(hres))
|
||||||
|
return;
|
||||||
|
|
||||||
|
hres = IUnknown_QueryInterface(unk, &IID_ISupportErrorInfo, (void**)&sinfo);
|
||||||
|
ok(hres == S_OK, "got %x\n", hres);
|
||||||
|
ok(sinfo != NULL, "got %p\n", sinfo);
|
||||||
|
if(sinfo)
|
||||||
|
{
|
||||||
|
hres = ISupportErrorInfo_InterfaceSupportsErrorInfo(sinfo, &IID_IErrorInfo);
|
||||||
|
ok(hres == S_FALSE, "Expected S_OK, got %x\n", hres);
|
||||||
|
}
|
||||||
|
|
||||||
|
IUnknown_Release(sinfo);
|
||||||
|
ref = IUnknown_Release(unk);
|
||||||
|
ok(ref == 0, "ref=%d, expected 0\n", ref);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(htmldoc)
|
START_TEST(htmldoc)
|
||||||
{
|
{
|
||||||
gecko_installer_workaround(TRUE);
|
gecko_installer_workaround(TRUE);
|
||||||
|
@ -4151,6 +4176,7 @@ START_TEST(htmldoc)
|
||||||
test_editing_mode(FALSE);
|
test_editing_mode(FALSE);
|
||||||
test_editing_mode(TRUE);
|
test_editing_mode(TRUE);
|
||||||
}
|
}
|
||||||
|
test_HTMLDoc_ISupportErrorInfo();
|
||||||
|
|
||||||
DestroyWindow(container_hwnd);
|
DestroyWindow(container_hwnd);
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
|
|
Loading…
Reference in New Issue