Commit 9339317e authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Forward objects' IUnknown methods to the DispatchEx.

parent f0f4b50e
......@@ -1576,7 +1576,7 @@ ret:
static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
LONG ref = dispex_ref_incr(This);
LONG ref = ccref_incr(&This->ccref, (nsISupports*)&This->IDispatchEx_iface);
TRACE("%s (%p) ref=%ld\n", This->info->desc->name, This, ref);
......@@ -1586,10 +1586,19 @@ static ULONG WINAPI DispatchEx_AddRef(IDispatchEx *iface)
static ULONG WINAPI DispatchEx_Release(IDispatchEx *iface)
{
DispatchEx *This = impl_from_IDispatchEx(iface);
LONG ref = dispex_ref_decr(This);
LONG ref = ccref_decr(&This->ccref, (nsISupports*)&This->IDispatchEx_iface, &dispex_ccp);
TRACE("%s (%p) ref=%ld\n", This->info->desc->name, This, ref);
/* Gecko ccref may not free the object immediately when ref count reaches 0, so we need
* an extra care for objects that need an immediate clean up. See Gecko's
* NS_IMPL_CYCLE_COLLECTING_NATIVE_RELEASE_WITH_LAST_RELEASE for details. */
if(!ref && This->info->desc->vtbl->last_release) {
ccref_incr(&This->ccref, (nsISupports*)&This->IDispatchEx_iface);
This->info->desc->vtbl->last_release(This);
ccref_decr(&This->ccref, (nsISupports*)&This->IDispatchEx_iface, &dispex_ccp);
}
return ref;
}
......@@ -1951,27 +1960,6 @@ static IDispatchExVtbl DispatchExVtbl = {
DispatchEx_GetNameSpaceParent
};
BOOL dispex_query_interface(DispatchEx *This, REFIID riid, void **ppv)
{
return IDispatchEx_QueryInterface(&This->IDispatchEx_iface, riid, ppv) == S_OK;
}
LONG dispex_ref_decr(DispatchEx *dispex)
{
LONG ref = ccref_decr(&dispex->ccref, (nsISupports*)&dispex->IDispatchEx_iface, &dispex_ccp);
/* Gecko ccref may not free the object immediatelly when ref count reaches 0, so we need
* an extra care for objects that need an immediate clean up. See
* NS_IMPL_CYCLE_COLLECTING_NATIVE_RELEASE_WITH_LAST_RELEASE for details. */
if(!ref && dispex->info->desc->vtbl->last_release) {
ccref_incr(&dispex->ccref, (nsISupports*)&dispex->IDispatchEx_iface);
dispex->info->desc->vtbl->last_release(dispex);
ccref_decr(&dispex->ccref, (nsISupports*)&dispex->IDispatchEx_iface, &dispex_ccp);
}
return ref;
}
static nsresult NSAPI dispex_traverse(void *ccp, void *p, nsCycleCollectionTraversalCallback *cb)
{
DispatchEx *This = impl_from_IDispatchEx(p);
......
......@@ -41,33 +41,19 @@ static HRESULT WINAPI HTMLDOMAttribute_QueryInterface(IHTMLDOMAttribute *iface,
REFIID riid, void **ppv)
{
HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLDOMAttribute_AddRef(IHTMLDOMAttribute *iface)
{
HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLDOMAttribute_Release(IHTMLDOMAttribute *iface)
{
HTMLDOMAttribute *This = impl_from_IHTMLDOMAttribute(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLDOMAttribute_GetTypeInfoCount(IHTMLDOMAttribute *iface, UINT *pctinfo)
......
......@@ -540,33 +540,19 @@ static inline HTMLRect *impl_from_IHTMLRect(IHTMLRect *iface)
static HRESULT WINAPI HTMLRect_QueryInterface(IHTMLRect *iface, REFIID riid, void **ppv)
{
HTMLRect *This = impl_from_IHTMLRect(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLRect_AddRef(IHTMLRect *iface)
{
HTMLRect *This = impl_from_IHTMLRect(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLRect_Release(IHTMLRect *iface)
{
HTMLRect *This = impl_from_IHTMLRect(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLRect_GetTypeInfoCount(IHTMLRect *iface, UINT *pctinfo)
......@@ -1047,33 +1033,19 @@ static inline HTMLRectCollection *impl_from_IHTMLRectCollection(IHTMLRectCollect
static HRESULT WINAPI HTMLRectCollection_QueryInterface(IHTMLRectCollection *iface, REFIID riid, void **ppv)
{
HTMLRectCollection *This = impl_from_IHTMLRectCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLRectCollection_AddRef(IHTMLRectCollection *iface)
{
HTMLRectCollection *This = impl_from_IHTMLRectCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLRectCollection_Release(IHTMLRectCollection *iface)
{
HTMLRectCollection *This = impl_from_IHTMLRectCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLRectCollection_GetTypeInfoCount(IHTMLRectCollection *iface, UINT *pctinfo)
......@@ -7382,33 +7354,19 @@ static inline struct token_list *impl_from_IWineDOMTokenList(IWineDOMTokenList *
static HRESULT WINAPI token_list_QueryInterface(IWineDOMTokenList *iface, REFIID riid, void **ppv)
{
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
if(dispex_query_interface(&token_list->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", token_list, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&token_list->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI token_list_AddRef(IWineDOMTokenList *iface)
{
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
LONG ref = dispex_ref_incr(&token_list->dispex);
TRACE("(%p) ref=%ld\n", token_list, ref);
return ref;
return IDispatchEx_AddRef(&token_list->dispex.IDispatchEx_iface);
}
static ULONG WINAPI token_list_Release(IWineDOMTokenList *iface)
{
struct token_list *token_list = impl_from_IWineDOMTokenList(iface);
LONG ref = dispex_ref_decr(&token_list->dispex);
TRACE("(%p) ref=%ld\n", token_list, ref);
return ref;
return IDispatchEx_Release(&token_list->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI token_list_GetTypeInfoCount(IWineDOMTokenList *iface, UINT *pctinfo)
......@@ -8093,33 +8051,19 @@ HRESULT get_element(nsIDOMElement *nselem, HTMLElement **ret)
static HRESULT WINAPI HTMLFiltersCollection_QueryInterface(IHTMLFiltersCollection *iface, REFIID riid, void **ppv)
{
HTMLFiltersCollection *This = impl_from_IHTMLFiltersCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLFiltersCollection_AddRef(IHTMLFiltersCollection *iface)
{
HTMLFiltersCollection *This = impl_from_IHTMLFiltersCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLFiltersCollection_Release(IHTMLFiltersCollection *iface)
{
HTMLFiltersCollection *This = impl_from_IHTMLFiltersCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLFiltersCollection_GetTypeInfoCount(IHTMLFiltersCollection *iface, UINT *pctinfo)
......@@ -8542,33 +8486,19 @@ static inline HTMLAttributeCollection *impl_from_IHTMLAttributeCollection(IHTMLA
static HRESULT WINAPI HTMLAttributeCollection_QueryInterface(IHTMLAttributeCollection *iface, REFIID riid, void **ppv)
{
HTMLAttributeCollection *This = impl_from_IHTMLAttributeCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLAttributeCollection_AddRef(IHTMLAttributeCollection *iface)
{
HTMLAttributeCollection *This = impl_from_IHTMLAttributeCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLAttributeCollection_Release(IHTMLAttributeCollection *iface)
{
HTMLAttributeCollection *This = impl_from_IHTMLAttributeCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLAttributeCollection_GetTypeInfoCount(IHTMLAttributeCollection *iface, UINT *pctinfo)
......
......@@ -214,33 +214,19 @@ static HRESULT WINAPI HTMLElementCollection_QueryInterface(IHTMLElementCollectio
REFIID riid, void **ppv)
{
HTMLElementCollection *This = impl_from_IHTMLElementCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLElementCollection_AddRef(IHTMLElementCollection *iface)
{
HTMLElementCollection *This = impl_from_IHTMLElementCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLElementCollection_Release(IHTMLElementCollection *iface)
{
HTMLElementCollection *This = impl_from_IHTMLElementCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLElementCollection_GetTypeInfoCount(IHTMLElementCollection *iface,
......
......@@ -362,33 +362,19 @@ static inline HTMLEventObj *impl_from_IHTMLEventObj(IHTMLEventObj *iface)
static HRESULT WINAPI HTMLEventObj_QueryInterface(IHTMLEventObj *iface, REFIID riid, void **ppv)
{
HTMLEventObj *This = impl_from_IHTMLEventObj(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLEventObj_AddRef(IHTMLEventObj *iface)
{
HTMLEventObj *This = impl_from_IHTMLEventObj(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLEventObj_Release(IHTMLEventObj *iface)
{
HTMLEventObj *This = impl_from_IHTMLEventObj(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLEventObj_GetTypeInfoCount(IHTMLEventObj *iface, UINT *pctinfo)
......@@ -969,33 +955,19 @@ static inline DOMEvent *unsafe_impl_from_IDOMEvent(IDOMEvent *iface)
static HRESULT WINAPI DOMEvent_QueryInterface(IDOMEvent *iface, REFIID riid, void **ppv)
{
DOMEvent *This = impl_from_IDOMEvent(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI DOMEvent_AddRef(IDOMEvent *iface)
{
DOMEvent *This = impl_from_IDOMEvent(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%lu\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI DOMEvent_Release(IDOMEvent *iface)
{
DOMEvent *This = impl_from_IDOMEvent(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%lu\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI DOMEvent_GetTypeInfoCount(IDOMEvent *iface, UINT *pctinfo)
......
......@@ -757,33 +757,19 @@ static HRESULT WINAPI HTMLImageElementFactory_QueryInterface(IHTMLImageElementFa
REFIID riid, void **ppv)
{
HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLImageElementFactory_AddRef(IHTMLImageElementFactory *iface)
{
HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLImageElementFactory_Release(IHTMLImageElementFactory *iface)
{
HTMLImageElementFactory *This = impl_from_IHTMLImageElementFactory(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLImageElementFactory_GetTypeInfoCount(IHTMLImageElementFactory *iface,
......
......@@ -62,33 +62,19 @@ static inline HTMLLocation *impl_from_IHTMLLocation(IHTMLLocation *iface)
static HRESULT WINAPI HTMLLocation_QueryInterface(IHTMLLocation *iface, REFIID riid, void **ppv)
{
HTMLLocation *This = impl_from_IHTMLLocation(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLLocation_AddRef(IHTMLLocation *iface)
{
HTMLLocation *This = impl_from_IHTMLLocation(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLLocation_Release(IHTMLLocation *iface)
{
HTMLLocation *This = impl_from_IHTMLLocation(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLLocation_GetTypeInfoCount(IHTMLLocation *iface, UINT *pctinfo)
......
......@@ -199,33 +199,19 @@ static inline HTMLDOMChildrenCollection *impl_from_IHTMLDOMChildrenCollection(IH
static HRESULT WINAPI HTMLDOMChildrenCollection_QueryInterface(IHTMLDOMChildrenCollection *iface, REFIID riid, void **ppv)
{
HTMLDOMChildrenCollection *This = impl_from_IHTMLDOMChildrenCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLDOMChildrenCollection_AddRef(IHTMLDOMChildrenCollection *iface)
{
HTMLDOMChildrenCollection *This = impl_from_IHTMLDOMChildrenCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLDOMChildrenCollection_Release(IHTMLDOMChildrenCollection *iface)
{
HTMLDOMChildrenCollection *This = impl_from_IHTMLDOMChildrenCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLDOMChildrenCollection_GetTypeInfoCount(IHTMLDOMChildrenCollection *iface, UINT *pctinfo)
......@@ -492,33 +478,19 @@ static HRESULT WINAPI HTMLDOMNode_QueryInterface(IHTMLDOMNode *iface,
REFIID riid, void **ppv)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(iface);
if(dispex_query_interface(&This->event_target.dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->event_target.dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLDOMNode_AddRef(IHTMLDOMNode *iface)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(iface);
LONG ref = dispex_ref_incr(&This->event_target.dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->event_target.dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLDOMNode_Release(IHTMLDOMNode *iface)
{
HTMLDOMNode *This = impl_from_IHTMLDOMNode(iface);
LONG ref = dispex_ref_decr(&This->event_target.dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->event_target.dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLDOMNode_GetTypeInfoCount(IHTMLDOMNode *iface, UINT *pctinfo)
......
......@@ -429,33 +429,19 @@ static HRESULT WINAPI HTMLOptionElementFactory_QueryInterface(IHTMLOptionElement
REFIID riid, void **ppv)
{
HTMLOptionElementFactory *This = impl_from_IHTMLOptionElementFactory(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLOptionElementFactory_AddRef(IHTMLOptionElementFactory *iface)
{
HTMLOptionElementFactory *This = impl_from_IHTMLOptionElementFactory(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLOptionElementFactory_Release(IHTMLOptionElementFactory *iface)
{
HTMLOptionElementFactory *This = impl_from_IHTMLOptionElementFactory(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLOptionElementFactory_GetTypeInfoCount(IHTMLOptionElementFactory *iface, UINT *pctinfo)
......
......@@ -362,33 +362,19 @@ done:
static HRESULT WINAPI HTMLStorage_QueryInterface(IHTMLStorage *iface, REFIID riid, void **ppv)
{
HTMLStorage *This = impl_from_IHTMLStorage(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLStorage_AddRef(IHTMLStorage *iface)
{
HTMLStorage *This = impl_from_IHTMLStorage(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLStorage_Release(IHTMLStorage *iface)
{
HTMLStorage *This = impl_from_IHTMLStorage(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLStorage_GetTypeInfoCount(IHTMLStorage *iface, UINT *pctinfo)
......
......@@ -4734,33 +4734,19 @@ static HRESULT WINAPI HTMLCSSStyleDeclaration_QueryInterface(IHTMLCSSStyleDeclar
REFIID riid, void **ppv)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLCSSStyleDeclaration_AddRef(IHTMLCSSStyleDeclaration *iface)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLCSSStyleDeclaration_Release(IHTMLCSSStyleDeclaration *iface)
{
CSSStyle *This = impl_from_IHTMLCSSStyleDeclaration(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLCSSStyleDeclaration_GetTypeInfoCount(IHTMLCSSStyleDeclaration *iface,
......
......@@ -78,33 +78,19 @@ static HRESULT WINAPI HTMLStyleSheetRule_QueryInterface(IHTMLStyleSheetRule *ifa
REFIID riid, void **ppv)
{
HTMLStyleSheetRule *This = impl_from_IHTMLStyleSheetRule(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLStyleSheetRule_AddRef(IHTMLStyleSheetRule *iface)
{
HTMLStyleSheetRule *This = impl_from_IHTMLStyleSheetRule(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLStyleSheetRule_Release(IHTMLStyleSheetRule *iface)
{
HTMLStyleSheetRule *This = impl_from_IHTMLStyleSheetRule(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLStyleSheetRule_GetTypeInfoCount(
......@@ -267,33 +253,19 @@ static HRESULT WINAPI HTMLStyleSheetRulesCollection_QueryInterface(IHTMLStyleShe
REFIID riid, void **ppv)
{
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLStyleSheetRulesCollection_AddRef(IHTMLStyleSheetRulesCollection *iface)
{
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLStyleSheetRulesCollection_Release(IHTMLStyleSheetRulesCollection *iface)
{
HTMLStyleSheetRulesCollection *This = impl_from_IHTMLStyleSheetRulesCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLStyleSheetRulesCollection_GetTypeInfoCount(
......@@ -663,33 +635,19 @@ static HRESULT WINAPI HTMLStyleSheetsCollection_QueryInterface(IHTMLStyleSheetsC
REFIID riid, void **ppv)
{
HTMLStyleSheetsCollection *This = impl_from_IHTMLStyleSheetsCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLStyleSheetsCollection_AddRef(IHTMLStyleSheetsCollection *iface)
{
HTMLStyleSheetsCollection *This = impl_from_IHTMLStyleSheetsCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLStyleSheetsCollection_Release(IHTMLStyleSheetsCollection *iface)
{
HTMLStyleSheetsCollection *This = impl_from_IHTMLStyleSheetsCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLStyleSheetsCollection_GetTypeInfoCount(IHTMLStyleSheetsCollection *iface,
......@@ -976,33 +934,19 @@ static inline HTMLStyleSheet *impl_from_IHTMLStyleSheet(IHTMLStyleSheet *iface)
static HRESULT WINAPI HTMLStyleSheet_QueryInterface(IHTMLStyleSheet *iface, REFIID riid, void **ppv)
{
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLStyleSheet_AddRef(IHTMLStyleSheet *iface)
{
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLStyleSheet_Release(IHTMLStyleSheet *iface)
{
HTMLStyleSheet *This = impl_from_IHTMLStyleSheet(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLStyleSheet_GetTypeInfoCount(IHTMLStyleSheet *iface, UINT *pctinfo)
......
......@@ -208,33 +208,19 @@ static void *base_query_interface(HTMLWindow *This, REFIID riid)
static HRESULT WINAPI HTMLWindow2_QueryInterface(IHTMLWindow2 *iface, REFIID riid, void **ppv)
{
HTMLInnerWindow *This = HTMLInnerWindow_from_IHTMLWindow2(iface);
if(dispex_query_interface(&This->event_target.dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->event_target.dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLWindow2_AddRef(IHTMLWindow2 *iface)
{
HTMLInnerWindow *This = HTMLInnerWindow_from_IHTMLWindow2(iface);
LONG ref = dispex_ref_incr(&This->event_target.dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->event_target.dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface)
{
HTMLInnerWindow *This = HTMLInnerWindow_from_IHTMLWindow2(iface);
LONG ref = dispex_ref_decr(&This->event_target.dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->event_target.dispex.IDispatchEx_iface);
}
static HRESULT WINAPI outer_window_QueryInterface(IHTMLWindow2 *iface, REFIID riid, void **ppv)
......
......@@ -432,14 +432,7 @@ extern void (__cdecl *ccp_init)(ExternalCycleCollectionParticipant*,const CCObjC
extern void (__cdecl *describe_cc_node)(nsCycleCollectingAutoRefCnt*,const char*,nsCycleCollectionTraversalCallback*);
extern void (__cdecl *note_cc_edge)(nsISupports*,const char*,nsCycleCollectionTraversalCallback*);
static inline LONG dispex_ref_incr(DispatchEx *dispex)
{
return ccref_incr(&dispex->ccref, (nsISupports*)&dispex->IDispatchEx_iface);
}
extern LONG dispex_ref_decr(DispatchEx*);
void init_dispatch(DispatchEx*,dispex_static_data_t*,compat_mode_t);
BOOL dispex_query_interface(DispatchEx*,REFIID,void**);
void dispex_props_unlink(DispatchEx*);
HRESULT change_type(VARIANT*,VARIANT*,VARTYPE,IServiceProvider*);
HRESULT dispex_get_dprop_ref(DispatchEx*,const WCHAR*,BOOL,VARIANT**);
......
......@@ -1092,33 +1092,19 @@ static inline struct mutation_observer *impl_from_IWineMSHTMLMutationObserver(IW
static HRESULT WINAPI MutationObserver_QueryInterface(IWineMSHTMLMutationObserver *iface, REFIID riid, void **ppv)
{
struct mutation_observer *This = impl_from_IWineMSHTMLMutationObserver(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI MutationObserver_AddRef(IWineMSHTMLMutationObserver *iface)
{
struct mutation_observer *This = impl_from_IWineMSHTMLMutationObserver(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI MutationObserver_Release(IWineMSHTMLMutationObserver *iface)
{
struct mutation_observer *This = impl_from_IWineMSHTMLMutationObserver(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI MutationObserver_GetTypeInfoCount(IWineMSHTMLMutationObserver *iface, UINT *pctinfo)
......
......@@ -59,33 +59,19 @@ static inline HTMLDOMImplementation *impl_from_IHTMLDOMImplementation(IHTMLDOMIm
static HRESULT WINAPI HTMLDOMImplementation_QueryInterface(IHTMLDOMImplementation *iface, REFIID riid, void **ppv)
{
HTMLDOMImplementation *This = impl_from_IHTMLDOMImplementation(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLDOMImplementation_AddRef(IHTMLDOMImplementation *iface)
{
HTMLDOMImplementation *This = impl_from_IHTMLDOMImplementation(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLDOMImplementation_Release(IHTMLDOMImplementation *iface)
{
HTMLDOMImplementation *This = impl_from_IHTMLDOMImplementation(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLDOMImplementation_GetTypeInfoCount(IHTMLDOMImplementation *iface, UINT *pctinfo)
......@@ -382,33 +368,19 @@ static inline HTMLScreen *impl_from_IHTMLScreen(IHTMLScreen *iface)
static HRESULT WINAPI HTMLScreen_QueryInterface(IHTMLScreen *iface, REFIID riid, void **ppv)
{
HTMLScreen *This = impl_from_IHTMLScreen(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLScreen_AddRef(IHTMLScreen *iface)
{
HTMLScreen *This = impl_from_IHTMLScreen(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLScreen_Release(IHTMLScreen *iface)
{
HTMLScreen *This = impl_from_IHTMLScreen(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLScreen_GetTypeInfoCount(IHTMLScreen *iface, UINT *pctinfo)
......@@ -617,33 +589,19 @@ static inline OmHistory *impl_from_IOmHistory(IOmHistory *iface)
static HRESULT WINAPI OmHistory_QueryInterface(IOmHistory *iface, REFIID riid, void **ppv)
{
OmHistory *This = impl_from_IOmHistory(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI OmHistory_AddRef(IOmHistory *iface)
{
OmHistory *This = impl_from_IOmHistory(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI OmHistory_Release(IOmHistory *iface)
{
OmHistory *This = impl_from_IOmHistory(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI OmHistory_GetTypeInfoCount(IOmHistory *iface, UINT *pctinfo)
......@@ -800,33 +758,19 @@ static inline HTMLPluginsCollection *impl_from_IHTMLPluginsCollection(IHTMLPlugi
static HRESULT WINAPI HTMLPluginsCollection_QueryInterface(IHTMLPluginsCollection *iface, REFIID riid, void **ppv)
{
HTMLPluginsCollection *This = impl_from_IHTMLPluginsCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLPluginsCollection_AddRef(IHTMLPluginsCollection *iface)
{
HTMLPluginsCollection *This = impl_from_IHTMLPluginsCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLPluginsCollection_Release(IHTMLPluginsCollection *iface)
{
HTMLPluginsCollection *This = impl_from_IHTMLPluginsCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLPluginsCollection_GetTypeInfoCount(IHTMLPluginsCollection *iface, UINT *pctinfo)
......@@ -971,33 +915,19 @@ static inline HTMLMimeTypesCollection *impl_from_IHTMLMimeTypesCollection(IHTMLM
static HRESULT WINAPI HTMLMimeTypesCollection_QueryInterface(IHTMLMimeTypesCollection *iface, REFIID riid, void **ppv)
{
HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLMimeTypesCollection_AddRef(IHTMLMimeTypesCollection *iface)
{
HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLMimeTypesCollection_Release(IHTMLMimeTypesCollection *iface)
{
HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLMimeTypesCollection_GetTypeInfoCount(IHTMLMimeTypesCollection *iface, UINT *pctinfo)
......@@ -1124,33 +1054,19 @@ static inline OmNavigator *impl_from_IOmNavigator(IOmNavigator *iface)
static HRESULT WINAPI OmNavigator_QueryInterface(IOmNavigator *iface, REFIID riid, void **ppv)
{
OmNavigator *This = impl_from_IOmNavigator(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI OmNavigator_AddRef(IOmNavigator *iface)
{
OmNavigator *This = impl_from_IOmNavigator(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI OmNavigator_Release(IOmNavigator *iface)
{
OmNavigator *This = impl_from_IOmNavigator(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI OmNavigator_GetTypeInfoCount(IOmNavigator *iface, UINT *pctinfo)
......@@ -1577,33 +1493,19 @@ static inline HTMLPerformanceTiming *impl_from_IHTMLPerformanceTiming(IHTMLPerfo
static HRESULT WINAPI HTMLPerformanceTiming_QueryInterface(IHTMLPerformanceTiming *iface, REFIID riid, void **ppv)
{
HTMLPerformanceTiming *This = impl_from_IHTMLPerformanceTiming(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLPerformanceTiming_AddRef(IHTMLPerformanceTiming *iface)
{
HTMLPerformanceTiming *This = impl_from_IHTMLPerformanceTiming(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLPerformanceTiming_Release(IHTMLPerformanceTiming *iface)
{
HTMLPerformanceTiming *This = impl_from_IHTMLPerformanceTiming(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLPerformanceTiming_GetTypeInfoCount(IHTMLPerformanceTiming *iface, UINT *pctinfo)
......@@ -1998,33 +1900,19 @@ static inline HTMLPerformanceNavigation *impl_from_IHTMLPerformanceNavigation(IH
static HRESULT WINAPI HTMLPerformanceNavigation_QueryInterface(IHTMLPerformanceNavigation *iface, REFIID riid, void **ppv)
{
HTMLPerformanceNavigation *This = impl_from_IHTMLPerformanceNavigation(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLPerformanceNavigation_AddRef(IHTMLPerformanceNavigation *iface)
{
HTMLPerformanceNavigation *This = impl_from_IHTMLPerformanceNavigation(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLPerformanceNavigation_Release(IHTMLPerformanceNavigation *iface)
{
HTMLPerformanceNavigation *This = impl_from_IHTMLPerformanceNavigation(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLPerformanceNavigation_GetTypeInfoCount(IHTMLPerformanceNavigation *iface, UINT *pctinfo)
......@@ -2185,33 +2073,19 @@ static inline HTMLPerformance *impl_from_IHTMLPerformance(IHTMLPerformance *ifac
static HRESULT WINAPI HTMLPerformance_QueryInterface(IHTMLPerformance *iface, REFIID riid, void **ppv)
{
HTMLPerformance *This = impl_from_IHTMLPerformance(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLPerformance_AddRef(IHTMLPerformance *iface)
{
HTMLPerformance *This = impl_from_IHTMLPerformance(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLPerformance_Release(IHTMLPerformance *iface)
{
HTMLPerformance *This = impl_from_IHTMLPerformance(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLPerformance_GetTypeInfoCount(IHTMLPerformance *iface, UINT *pctinfo)
......@@ -2426,33 +2300,19 @@ static inline HTMLNamespaceCollection *impl_from_IHTMLNamespaceCollection(IHTMLN
static HRESULT WINAPI HTMLNamespaceCollection_QueryInterface(IHTMLNamespaceCollection *iface, REFIID riid, void **ppv)
{
HTMLNamespaceCollection *This = impl_from_IHTMLNamespaceCollection(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLNamespaceCollection_AddRef(IHTMLNamespaceCollection *iface)
{
HTMLNamespaceCollection *This = impl_from_IHTMLNamespaceCollection(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLNamespaceCollection_Release(IHTMLNamespaceCollection *iface)
{
HTMLNamespaceCollection *This = impl_from_IHTMLNamespaceCollection(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLNamespaceCollection_GetTypeInfoCount(IHTMLNamespaceCollection *iface, UINT *pctinfo)
......@@ -2589,33 +2449,19 @@ static inline struct console *impl_from_IWineMSHTMLConsole(IWineMSHTMLConsole *i
static HRESULT WINAPI console_QueryInterface(IWineMSHTMLConsole *iface, REFIID riid, void **ppv)
{
struct console *console = impl_from_IWineMSHTMLConsole(iface);
if(dispex_query_interface(&console->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", console, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&console->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI console_AddRef(IWineMSHTMLConsole *iface)
{
struct console *console = impl_from_IWineMSHTMLConsole(iface);
LONG ref = dispex_ref_incr(&console->dispex);
TRACE("(%p) ref=%ld\n", console, ref);
return ref;
return IDispatchEx_AddRef(&console->dispex.IDispatchEx_iface);
}
static ULONG WINAPI console_Release(IWineMSHTMLConsole *iface)
{
struct console *console = impl_from_IWineMSHTMLConsole(iface);
LONG ref = dispex_ref_decr(&console->dispex);
TRACE("(%p) ref=%ld\n", console, ref);
return ref;
return IDispatchEx_Release(&console->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI console_GetTypeInfoCount(IWineMSHTMLConsole *iface, UINT *pctinfo)
......@@ -2872,33 +2718,19 @@ static inline struct media_query_list *impl_from_IWineMSHTMLMediaQueryList(IWine
static HRESULT WINAPI media_query_list_QueryInterface(IWineMSHTMLMediaQueryList *iface, REFIID riid, void **ppv)
{
struct media_query_list *media_query_list = impl_from_IWineMSHTMLMediaQueryList(iface);
if(dispex_query_interface(&media_query_list->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", media_query_list, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&media_query_list->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI media_query_list_AddRef(IWineMSHTMLMediaQueryList *iface)
{
struct media_query_list *media_query_list = impl_from_IWineMSHTMLMediaQueryList(iface);
LONG ref = dispex_ref_incr(&media_query_list->dispex);
TRACE("(%p) ref=%ld\n", media_query_list, ref);
return ref;
return IDispatchEx_AddRef(&media_query_list->dispex.IDispatchEx_iface);
}
static ULONG WINAPI media_query_list_Release(IWineMSHTMLMediaQueryList *iface)
{
struct media_query_list *media_query_list = impl_from_IWineMSHTMLMediaQueryList(iface);
LONG ref = dispex_ref_decr(&media_query_list->dispex);
TRACE("(%p) ref=%ld\n", media_query_list, ref);
return ref;
return IDispatchEx_Release(&media_query_list->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI media_query_list_GetTypeInfoCount(IWineMSHTMLMediaQueryList *iface, UINT *pctinfo)
......
......@@ -813,33 +813,19 @@ static inline HTMLTxtRange *impl_from_IHTMLTxtRange(IHTMLTxtRange *iface)
static HRESULT WINAPI HTMLTxtRange_QueryInterface(IHTMLTxtRange *iface, REFIID riid, void **ppv)
{
HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLTxtRange_AddRef(IHTMLTxtRange *iface)
{
HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLTxtRange_Release(IHTMLTxtRange *iface)
{
HTMLTxtRange *This = impl_from_IHTMLTxtRange(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLTxtRange_GetTypeInfoCount(IHTMLTxtRange *iface, UINT *pctinfo)
......@@ -1783,33 +1769,19 @@ static inline HTMLDOMRange *impl_from_IHTMLDOMRange(IHTMLDOMRange *iface)
static HRESULT WINAPI HTMLDOMRange_QueryInterface(IHTMLDOMRange *iface, REFIID riid, void **ppv)
{
HTMLDOMRange *This = impl_from_IHTMLDOMRange(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLDOMRange_AddRef(IHTMLDOMRange *iface)
{
HTMLDOMRange *This = impl_from_IHTMLDOMRange(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLDOMRange_Release(IHTMLDOMRange *iface)
{
HTMLDOMRange *This = impl_from_IHTMLDOMRange(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLDOMRange_GetTypeInfoCount(IHTMLDOMRange *iface, UINT *pctinfo)
......
......@@ -51,33 +51,19 @@ static HRESULT WINAPI HTMLSelectionObject_QueryInterface(IHTMLSelectionObject *i
REFIID riid, void **ppv)
{
HTMLSelectionObject *This = impl_from_IHTMLSelectionObject(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLSelectionObject_AddRef(IHTMLSelectionObject *iface)
{
HTMLSelectionObject *This = impl_from_IHTMLSelectionObject(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLSelectionObject_Release(IHTMLSelectionObject *iface)
{
HTMLSelectionObject *This = impl_from_IHTMLSelectionObject(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLSelectionObject_GetTypeInfoCount(IHTMLSelectionObject *iface, UINT *pctinfo)
......
......@@ -507,33 +507,19 @@ static inline HTMLXMLHttpRequest *impl_from_IHTMLXMLHttpRequest(IHTMLXMLHttpRequ
static HRESULT WINAPI HTMLXMLHttpRequest_QueryInterface(IHTMLXMLHttpRequest *iface, REFIID riid, void **ppv)
{
HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface);
if(dispex_query_interface(&This->event_target.dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->event_target.dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLXMLHttpRequest_AddRef(IHTMLXMLHttpRequest *iface)
{
HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface);
LONG ref = dispex_ref_incr(&This->event_target.dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->event_target.dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLXMLHttpRequest_Release(IHTMLXMLHttpRequest *iface)
{
HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface);
LONG ref = dispex_ref_decr(&This->event_target.dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->event_target.dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLXMLHttpRequest_GetTypeInfoCount(IHTMLXMLHttpRequest *iface, UINT *pctinfo)
......@@ -1640,33 +1626,19 @@ static inline HTMLXMLHttpRequestFactory *impl_from_IHTMLXMLHttpRequestFactory(IH
static HRESULT WINAPI HTMLXMLHttpRequestFactory_QueryInterface(IHTMLXMLHttpRequestFactory *iface, REFIID riid, void **ppv)
{
HTMLXMLHttpRequestFactory *This = impl_from_IHTMLXMLHttpRequestFactory(iface);
if(dispex_query_interface(&This->dispex, riid, ppv))
return *ppv ? S_OK : E_NOINTERFACE;
*ppv = NULL;
WARN("(%p)->(%s %p)\n", This, debugstr_mshtml_guid(riid), ppv);
return E_NOINTERFACE;
return IDispatchEx_QueryInterface(&This->dispex.IDispatchEx_iface, riid, ppv);
}
static ULONG WINAPI HTMLXMLHttpRequestFactory_AddRef(IHTMLXMLHttpRequestFactory *iface)
{
HTMLXMLHttpRequestFactory *This = impl_from_IHTMLXMLHttpRequestFactory(iface);
LONG ref = dispex_ref_incr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_AddRef(&This->dispex.IDispatchEx_iface);
}
static ULONG WINAPI HTMLXMLHttpRequestFactory_Release(IHTMLXMLHttpRequestFactory *iface)
{
HTMLXMLHttpRequestFactory *This = impl_from_IHTMLXMLHttpRequestFactory(iface);
LONG ref = dispex_ref_decr(&This->dispex);
TRACE("(%p) ref=%ld\n", This, ref);
return ref;
return IDispatchEx_Release(&This->dispex.IDispatchEx_iface);
}
static HRESULT WINAPI HTMLXMLHttpRequestFactory_GetTypeInfoCount(IHTMLXMLHttpRequestFactory *iface, UINT *pctinfo)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment