From e759105cdd14d7db09881520dc601adf057a959d Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 6 May 2014 10:41:19 +0200 Subject: [PATCH] mshtml: Use debugstr_mshtml_guid in a few more places. --- dlls/mshtml/htmlattr.c | 6 +++--- dlls/mshtml/htmlcurstyle.c | 20 +++++++------------- dlls/mshtml/htmlelemcol.c | 23 +++++++++-------------- dlls/mshtml/main.c | 23 +++++++++++++++-------- 4 files changed, 34 insertions(+), 38 deletions(-) diff --git a/dlls/mshtml/htmlattr.c b/dlls/mshtml/htmlattr.c index 1b016621a00..420a275af47 100644 --- a/dlls/mshtml/htmlattr.c +++ b/dlls/mshtml/htmlattr.c @@ -43,16 +43,16 @@ static HRESULT WINAPI HTMLDOMAttribute_QueryInterface(IHTMLDOMAttribute *iface, { HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface); + TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv); + if(IsEqualGUID(&IID_IUnknown, riid)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); *ppv = &This->IHTMLDOMAttribute_iface; }else if(IsEqualGUID(&IID_IHTMLDOMAttribute, riid)) { - TRACE("(%p)->(IID_IHTMLDOMAttribute %p)\n", This, ppv); *ppv = &This->IHTMLDOMAttribute_iface; }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; }else { - WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + WARN("%s not supported\n", debugstr_mshtml_guid(riid)); *ppv = NULL; return E_NOINTERFACE; } diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c index 71d57a19e32..ca5d60f5f95 100644 --- a/dlls/mshtml/htmlcurstyle.c +++ b/dlls/mshtml/htmlcurstyle.c @@ -69,34 +69,28 @@ static HRESULT WINAPI HTMLCurrentStyle_QueryInterface(IHTMLCurrentStyle *iface, { HTMLCurrentStyle *This = impl_from_IHTMLCurrentStyle(iface); - *ppv = NULL; + TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv); if(IsEqualGUID(&IID_IUnknown, riid)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); *ppv = &This->IHTMLCurrentStyle_iface; }else if(IsEqualGUID(&IID_IHTMLCurrentStyle, riid)) { - TRACE("(%p)->(IID_IHTMLCurrentStyle %p)\n", This, ppv); *ppv = &This->IHTMLCurrentStyle_iface; }else if(IsEqualGUID(&IID_IHTMLCurrentStyle2, riid)) { - TRACE("(%p)->(IID_IHTMLCurrentStyle2 %p)\n", This, ppv); *ppv = &This->IHTMLCurrentStyle2_iface; }else if(IsEqualGUID(&IID_IHTMLCurrentStyle3, riid)) { - TRACE("(%p)->(IID_IHTMLCurrentStyle3 %p)\n", This, ppv); *ppv = &This->IHTMLCurrentStyle3_iface; }else if(IsEqualGUID(&IID_IHTMLCurrentStyle4, riid)) { - TRACE("(%p)->(IID_IHTMLCurrentStyle4 %p)\n", This, ppv); *ppv = &This->IHTMLCurrentStyle4_iface; }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; + }else { + *ppv = NULL; + WARN("unsupported %s\n", debugstr_mshtml_guid(riid)); + return E_NOINTERFACE; } - if(*ppv) { - IUnknown_AddRef((IUnknown*)*ppv); - return S_OK; - } - - WARN("unsupported %s\n", debugstr_guid(riid)); - return E_NOINTERFACE; + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; } static ULONG WINAPI HTMLCurrentStyle_AddRef(IHTMLCurrentStyle *iface) diff --git a/dlls/mshtml/htmlelemcol.c b/dlls/mshtml/htmlelemcol.c index 5819d444150..cb7bad19995 100644 --- a/dlls/mshtml/htmlelemcol.c +++ b/dlls/mshtml/htmlelemcol.c @@ -104,14 +104,14 @@ static HRESULT WINAPI HTMLElementCollectionEnum_QueryInterface(IEnumVARIANT *ifa { HTMLElementCollectionEnum *This = impl_from_IEnumVARIANT(iface); + TRACE("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv); + if(IsEqualGUID(riid, &IID_IUnknown)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); *ppv = &This->IEnumVARIANT_iface; }else if(IsEqualGUID(riid, &IID_IEnumVARIANT)) { - TRACE("(%p)->(IID_IEnumVARIANT %p)\n", This, ppv); *ppv = &This->IEnumVARIANT_iface; }else { - FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + FIXME("Unsupported iface %s\n", debugstr_mshtml_guid(riid)); *ppv = NULL; return E_NOINTERFACE; } @@ -217,25 +217,20 @@ static HRESULT WINAPI HTMLElementCollection_QueryInterface(IHTMLElementCollectio { HTMLElementCollection *This = impl_from_IHTMLElementCollection(iface); - *ppv = NULL; - if(IsEqualGUID(&IID_IUnknown, riid)) { - TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); *ppv = &This->IHTMLElementCollection_iface; }else if(IsEqualGUID(&IID_IHTMLElementCollection, riid)) { - TRACE("(%p)->(IID_IHTMLElementCollection %p)\n", This, ppv); *ppv = &This->IHTMLElementCollection_iface; }else if(dispex_query_interface(&This->dispex, riid, ppv)) { return *ppv ? S_OK : E_NOINTERFACE; + }else { + *ppv = NULL; + FIXME("Unsupported iface %s\n", debugstr_mshtml_guid(riid)); + return E_NOINTERFACE; } - if(*ppv) { - IHTMLElementCollection_AddRef(&This->IHTMLElementCollection_iface); - return S_OK; - } - - FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); - return E_NOINTERFACE; + IHTMLElementCollection_AddRef(&This->IHTMLElementCollection_iface); + return S_OK; } static ULONG WINAPI HTMLElementCollection_AddRef(IHTMLElementCollection *iface) diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index 1f906862f0a..0bdc145249e 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -204,7 +204,7 @@ static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFGUID return S_OK; } - WARN("not supported iid %s\n", debugstr_guid(riid)); + WARN("not supported iid %s\n", debugstr_mshtml_guid(riid)); *ppvObject = NULL; return E_NOINTERFACE; } @@ -277,25 +277,25 @@ static HRESULT ClassFactory_Create(REFIID riid, void **ppv, CreateInstanceFunc f HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { if(IsEqualGUID(&CLSID_HTMLDocument, rclsid)) { - TRACE("(CLSID_HTMLDocument %s %p)\n", debugstr_guid(riid), ppv); + TRACE("(CLSID_HTMLDocument %s %p)\n", debugstr_mshtml_guid(riid), ppv); return ClassFactory_Create(riid, ppv, HTMLDocument_Create); }else if(IsEqualGUID(&CLSID_AboutProtocol, rclsid)) { - TRACE("(CLSID_AboutProtocol %s %p)\n", debugstr_guid(riid), ppv); + TRACE("(CLSID_AboutProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv); return ProtocolFactory_Create(rclsid, riid, ppv); }else if(IsEqualGUID(&CLSID_JSProtocol, rclsid)) { - TRACE("(CLSID_JSProtocol %s %p)\n", debugstr_guid(riid), ppv); + TRACE("(CLSID_JSProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv); return ProtocolFactory_Create(rclsid, riid, ppv); }else if(IsEqualGUID(&CLSID_MailtoProtocol, rclsid)) { - TRACE("(CLSID_MailtoProtocol %s %p)\n", debugstr_guid(riid), ppv); + TRACE("(CLSID_MailtoProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv); return ProtocolFactory_Create(rclsid, riid, ppv); }else if(IsEqualGUID(&CLSID_ResProtocol, rclsid)) { - TRACE("(CLSID_ResProtocol %s %p)\n", debugstr_guid(riid), ppv); + TRACE("(CLSID_ResProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv); return ProtocolFactory_Create(rclsid, riid, ppv); }else if(IsEqualGUID(&CLSID_SysimageProtocol, rclsid)) { - TRACE("(CLSID_SysimageProtocol %s %p)\n", debugstr_guid(riid), ppv); + TRACE("(CLSID_SysimageProtocol %s %p)\n", debugstr_mshtml_guid(riid), ppv); return ProtocolFactory_Create(rclsid, riid, ppv); }else if(IsEqualGUID(&CLSID_HTMLLoadOptions, rclsid)) { - TRACE("(CLSID_HTMLLoadOptions %s %p)\n", debugstr_guid(riid), ppv); + TRACE("(CLSID_HTMLLoadOptions %s %p)\n", debugstr_mshtml_guid(riid), ppv); return ClassFactory_Create(riid, ppv, HTMLLoadOptions_Create); } @@ -540,7 +540,12 @@ const char *debugstr_mshtml_guid(const GUID *iid) X(IID_ICustomDoc); X(IID_IDispatch); X(IID_IDispatchEx); + X(IID_IEnumVARIANT); X(IID_IHlinkTarget); + X(IID_IHTMLCurrentStyle); + X(IID_IHTMLCurrentStyle2); + X(IID_IHTMLCurrentStyle3); + X(IID_IHTMLCurrentStyle4); X(IID_IHTMLDocument); X(IID_IHTMLDocument2); X(IID_IHTMLDocument3); @@ -548,6 +553,8 @@ const char *debugstr_mshtml_guid(const GUID *iid) X(IID_IHTMLDocument5); X(IID_IHTMLDocument6); X(IID_IHTMLDocument7); + X(IID_IHTMLDOMAttribute); + X(IID_IHTMLElementCollection); X(IID_IInternetHostSecurityManager); X(IID_IMonikerProp); X(IID_IObjectSafety); -- 2.11.4.GIT