winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
December 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1099 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Associate PluginHost with containing element.
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: 483fe27730f8b5c06e1718b25a3c27483622f398 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=483fe27730f8b5c06e1718b25…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 9 16:28:34 2010 +0100 mshtml: Associate PluginHost with containing element. --- dlls/mshtml/htmlobject.c | 2 ++ dlls/mshtml/npplugin.c | 2 +- dlls/mshtml/pluginhost.c | 32 +++++++++++++++++++++++++++++++- dlls/mshtml/pluginhost.h | 4 +++- 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c index a2f5322..c911dd8 100644 --- a/dlls/mshtml/htmlobject.c +++ b/dlls/mshtml/htmlobject.c @@ -422,6 +422,8 @@ static void HTMLObjectElement_destructor(HTMLDOMNode *iface) { HTMLObjectElement *This = HTMLOBJECT_NODE_THIS(iface); + if(This->plugin_container.plugin_host) + This->plugin_container.plugin_host->element = NULL; if(This->nsobject) nsIDOMHTMLObjectElement_Release(This->nsobject); diff --git a/dlls/mshtml/npplugin.c b/dlls/mshtml/npplugin.c index a1c1c47..93e22da 100644 --- a/dlls/mshtml/npplugin.c +++ b/dlls/mshtml/npplugin.c @@ -272,7 +272,7 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I PluginHost *host; HRESULT hres; - hres = create_plugin_host(window->doc, obj, &host); + hres = create_plugin_host(window->doc, nselem, obj, &host); nsIDOMElement_Release(nselem); IUnknown_Release(obj); if(SUCCEEDED(hres)) diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index 2af929c..785abdd 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -164,6 +164,8 @@ static ULONG WINAPI PHClientSite_Release(IOleClientSite *iface) if(!ref) { list_remove(&This->entry); + if(This->element) + This->element->plugin_host = NULL; if(This->plugin_unk) IUnknown_Release(This->plugin_unk); heap_free(This); @@ -735,6 +737,27 @@ static const IServiceProviderVtbl ServiceProviderVtbl = { PHServiceProvider_QueryService }; +static HRESULT assoc_element(PluginHost *host, HTMLDocumentNode *doc, nsIDOMElement *nselem) +{ + HTMLPluginContainer *container_elem; + HTMLDOMNode *node; + HRESULT hres; + + hres = get_node(doc, (nsIDOMNode*)nselem, TRUE, &node); + if(FAILED(hres)) + return hres; + + hres = IHTMLDOMNode_QueryInterface(HTMLDOMNODE(node), &IID_HTMLPluginContainer, (void**)&container_elem); + if(FAILED(hres)) { + ERR("Not an object element\n"); + return hres; + } + + container_elem->plugin_host = host; + host->element = container_elem; + return S_OK; +} + void detach_plugin_hosts(HTMLDocumentNode *doc) { PluginHost *iter; @@ -746,9 +769,10 @@ void detach_plugin_hosts(HTMLDocumentNode *doc) } } -HRESULT create_plugin_host(HTMLDocumentNode *doc, IUnknown *unk, PluginHost **ret) +HRESULT create_plugin_host(HTMLDocumentNode *doc, nsIDOMElement *nselem, IUnknown *unk, PluginHost **ret) { PluginHost *host; + HRESULT hres; host = heap_alloc_zero(sizeof(*host)); if(!host) @@ -765,6 +789,12 @@ HRESULT create_plugin_host(HTMLDocumentNode *doc, IUnknown *unk, PluginHost **re host->ref = 1; + hres = assoc_element(host, doc, nselem); + if(FAILED(hres)) { + heap_free(host); + return hres; + } + IUnknown_AddRef(unk); host->plugin_unk = unk; diff --git a/dlls/mshtml/pluginhost.h b/dlls/mshtml/pluginhost.h index 1c80a9c..d030a3e 100644 --- a/dlls/mshtml/pluginhost.h +++ b/dlls/mshtml/pluginhost.h @@ -35,6 +35,8 @@ typedef struct { HTMLDocumentNode *doc; struct list entry; + + HTMLPluginContainer *element; } PluginHost; struct HTMLPluginContainer { @@ -45,6 +47,6 @@ struct HTMLPluginContainer { extern const IID IID_HTMLPluginContainer; -HRESULT create_plugin_host(HTMLDocumentNode*,IUnknown*,PluginHost**); +HRESULT create_plugin_host(HTMLDocumentNode*,nsIDOMElement*,IUnknown*,PluginHost**); void update_plugin_window(PluginHost*,HWND,const RECT*); void detach_plugin_hosts(HTMLDocumentNode*);
1
0
0
0
Jacek Caban : mshtml: Inherit HTMLObjectElement from new HTMLPluginContainer object.
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: bfc49aa7f308f2e7446efae19e1f3adbbff59571 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bfc49aa7f308f2e7446efae19…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 9 16:28:18 2010 +0100 mshtml: Inherit HTMLObjectElement from new HTMLPluginContainer object. --- dlls/mshtml/htmlobject.c | 33 +++++++++++++++++++-------------- dlls/mshtml/pluginhost.c | 3 +++ dlls/mshtml/pluginhost.h | 10 +++++++++- 3 files changed, 31 insertions(+), 15 deletions(-) diff --git a/dlls/mshtml/htmlobject.c b/dlls/mshtml/htmlobject.c index 482bac9..a2f5322 100644 --- a/dlls/mshtml/htmlobject.c +++ b/dlls/mshtml/htmlobject.c @@ -29,11 +29,12 @@ #include "wine/debug.h" #include "mshtml_private.h" +#include "pluginhost.h" WINE_DEFAULT_DEBUG_CHANNEL(mshtml); typedef struct { - HTMLElement element; + HTMLPluginContainer plugin_container; IHTMLObjectElement IHTMLObjectElement_iface; @@ -50,34 +51,34 @@ static HRESULT WINAPI HTMLObjectElement_QueryInterface(IHTMLObjectElement *iface { HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface); - return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->element.node), riid, ppv); + return IHTMLDOMNode_QueryInterface(HTMLDOMNODE(&This->plugin_container.element.node), riid, ppv); } static ULONG WINAPI HTMLObjectElement_AddRef(IHTMLObjectElement *iface) { HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface); - return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->element.node)); + return IHTMLDOMNode_AddRef(HTMLDOMNODE(&This->plugin_container.element.node)); } static ULONG WINAPI HTMLObjectElement_Release(IHTMLObjectElement *iface) { HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface); - return IHTMLDOMNode_Release(HTMLDOMNODE(&This->element.node)); + return IHTMLDOMNode_Release(HTMLDOMNODE(&This->plugin_container.element.node)); } static HRESULT WINAPI HTMLObjectElement_GetTypeInfoCount(IHTMLObjectElement *iface, UINT *pctinfo) { HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface); - return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->element.node.dispex), pctinfo); + return IDispatchEx_GetTypeInfoCount(DISPATCHEX(&This->plugin_container.element.node.dispex), pctinfo); } static HRESULT WINAPI HTMLObjectElement_GetTypeInfo(IHTMLObjectElement *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface); - return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->element.node.dispex), iTInfo, lcid, ppTInfo); + return IDispatchEx_GetTypeInfo(DISPATCHEX(&This->plugin_container.element.node.dispex), iTInfo, lcid, ppTInfo); } static HRESULT WINAPI HTMLObjectElement_GetIDsOfNames(IHTMLObjectElement *iface, REFIID riid, @@ -85,7 +86,7 @@ static HRESULT WINAPI HTMLObjectElement_GetIDsOfNames(IHTMLObjectElement *iface, LCID lcid, DISPID *rgDispId) { HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface); - return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId); + return IDispatchEx_GetIDsOfNames(DISPATCHEX(&This->plugin_container.element.node.dispex), riid, rgszNames, cNames, lcid, rgDispId); } static HRESULT WINAPI HTMLObjectElement_Invoke(IHTMLObjectElement *iface, DISPID dispIdMember, @@ -93,7 +94,7 @@ static HRESULT WINAPI HTMLObjectElement_Invoke(IHTMLObjectElement *iface, DISPID VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { HTMLObjectElement *This = impl_from_IHTMLObjectElement(iface); - return IDispatchEx_Invoke(DISPATCHEX(&This->element.node.dispex), dispIdMember, riid, lcid, wFlags, pDispParams, + return IDispatchEx_Invoke(DISPATCHEX(&This->plugin_container.element.node.dispex), dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } @@ -390,7 +391,7 @@ static const IHTMLObjectElementVtbl HTMLObjectElementVtbl = { HTMLObjectElement_get_hspace }; -#define HTMLOBJECT_NODE_THIS(iface) DEFINE_THIS2(HTMLObjectElement, element.node, iface) +#define HTMLOBJECT_NODE_THIS(iface) DEFINE_THIS2(HTMLObjectElement, plugin_container.element.node, iface) static HRESULT HTMLObjectElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) { @@ -405,8 +406,12 @@ static HRESULT HTMLObjectElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv) }else if(IsEqualGUID(&IID_IHTMLObjectElement, riid)) { TRACE("(%p)->(IID_IHTMLObjectElement %p)\n", This, ppv); *ppv = &This->IHTMLObjectElement_iface; + }else if(IsEqualGUID(&IID_HTMLPluginContainer, riid)) { + TRACE("(%p)->(IID_HTMLPluginContainer %p)\n", This, ppv); + *ppv = &This->plugin_container; + return S_OK; }else { - return HTMLElement_QI(&This->element.node, riid, ppv); + return HTMLElement_QI(&This->plugin_container.element.node, riid, ppv); } IUnknown_AddRef((IUnknown*)*ppv); @@ -420,7 +425,7 @@ static void HTMLObjectElement_destructor(HTMLDOMNode *iface) if(This->nsobject) nsIDOMHTMLObjectElement_Release(This->nsobject); - HTMLElement_destructor(&This->element.node); + HTMLElement_destructor(&This->plugin_container.element.node); } static HRESULT HTMLObjectElement_get_readystate(HTMLDOMNode *iface, BSTR *p) @@ -466,7 +471,7 @@ HRESULT HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nsele return E_OUTOFMEMORY; ret->IHTMLObjectElement_iface.lpVtbl = &HTMLObjectElementVtbl; - ret->element.node.vtbl = &HTMLObjectElementImplVtbl; + ret->plugin_container.element.node.vtbl = &HTMLObjectElementImplVtbl; nsres = nsIDOMHTMLElement_QueryInterface(nselem, &IID_nsIDOMHTMLObjectElement, (void**)&ret->nsobject); if(NS_FAILED(nsres)) { @@ -475,8 +480,8 @@ HRESULT HTMLObjectElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nsele return E_FAIL; } - HTMLElement_Init(&ret->element, doc, nselem, &HTMLObjectElement_dispex); + HTMLElement_Init(&ret->plugin_container.element, doc, nselem, &HTMLObjectElement_dispex); - *elem = &ret->element; + *elem = &ret->plugin_container.element; return S_OK; } diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index 27404f6..2af929c 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -36,6 +36,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); +const IID IID_HTMLPluginContainer = + {0xbd7a6050,0xb373,0x4f6f,{0xa4,0x93,0xdd,0x40,0xc5,0x23,0xa8,0x6a}}; + static void activate_plugin(PluginHost *host) { IClientSecurity *client_security; diff --git a/dlls/mshtml/pluginhost.h b/dlls/mshtml/pluginhost.h index ab61523..1c80a9c 100644 --- a/dlls/mshtml/pluginhost.h +++ b/dlls/mshtml/pluginhost.h @@ -16,7 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -typedef struct HTMLObjectElement HTMLObjectElement; +typedef struct HTMLPluginContainer HTMLPluginContainer; typedef struct { IOleClientSite IOleClientSite_iface; @@ -37,6 +37,14 @@ typedef struct { struct list entry; } PluginHost; +struct HTMLPluginContainer { + HTMLElement element; + + PluginHost *plugin_host; +}; + +extern const IID IID_HTMLPluginContainer; + HRESULT create_plugin_host(HTMLDocumentNode*,IUnknown*,PluginHost**); void update_plugin_window(PluginHost*,HWND,const RECT*); void detach_plugin_hosts(HTMLDocumentNode*);
1
0
0
0
Jacek Caban : mshtml: Associate PluginHost with containing HTMLDocumentDode .
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: b962fff243906ba56295aeeacf66142f0388638b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b962fff243906ba56295aeeac…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Dec 9 16:27:51 2010 +0100 mshtml: Associate PluginHost with containing HTMLDocumentDode. --- dlls/mshtml/htmldoc.c | 3 +++ dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/npplugin.c | 2 +- dlls/mshtml/pluginhost.c | 17 ++++++++++++++++- dlls/mshtml/pluginhost.h | 6 +++++- 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index e9a0cd6..a4c1451 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -35,6 +35,7 @@ #include "mshtml_private.h" #include "htmlevent.h" +#include "pluginhost.h" WINE_DEFAULT_DEBUG_CHANNEL(mshtml); @@ -1897,6 +1898,7 @@ static void HTMLDocumentNode_destructor(HTMLDOMNode *iface) detach_selection(This); detach_ranges(This); + detach_plugin_hosts(This); release_nodes(This); if(This->nsdoc) { @@ -1982,6 +1984,7 @@ static HTMLDocumentNode *alloc_doc_node(HTMLDocumentObj *doc_obj, HTMLWindow *wi list_init(&doc->bindings); list_init(&doc->selection_list); list_init(&doc->range_list); + list_init(&doc->plugin_hosts); return doc; } diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index c27a068..269962f 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -618,6 +618,7 @@ struct HTMLDocumentNode { struct list bindings; struct list selection_list; struct list range_list; + struct list plugin_hosts; }; #define HTMLWINDOW2(x) ((IHTMLWindow2*) &(x)->lpHTMLWindow2Vtbl) diff --git a/dlls/mshtml/npplugin.c b/dlls/mshtml/npplugin.c index 60f2125..a1c1c47 100644 --- a/dlls/mshtml/npplugin.c +++ b/dlls/mshtml/npplugin.c @@ -272,7 +272,7 @@ static NPError CDECL NPP_New(NPMIMEType pluginType, NPP instance, UINT16 mode, I PluginHost *host; HRESULT hres; - hres = create_plugin_host(obj, &host); + hres = create_plugin_host(window->doc, obj, &host); nsIDOMElement_Release(nselem); IUnknown_Release(obj); if(SUCCEEDED(hres)) diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index e7f39d8..27404f6 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -160,6 +160,7 @@ static ULONG WINAPI PHClientSite_Release(IOleClientSite *iface) TRACE("(%p) ref=%d\n", This, ref); if(!ref) { + list_remove(&This->entry); if(This->plugin_unk) IUnknown_Release(This->plugin_unk); heap_free(This); @@ -731,7 +732,18 @@ static const IServiceProviderVtbl ServiceProviderVtbl = { PHServiceProvider_QueryService }; -HRESULT create_plugin_host(IUnknown *unk, PluginHost **ret) +void detach_plugin_hosts(HTMLDocumentNode *doc) +{ + PluginHost *iter; + + while(!list_empty(&doc->plugin_hosts)) { + iter = LIST_ENTRY(list_head(&doc->plugin_hosts), PluginHost, entry); + list_remove(&iter->entry); + iter->doc = NULL; + } +} + +HRESULT create_plugin_host(HTMLDocumentNode *doc, IUnknown *unk, PluginHost **ret) { PluginHost *host; @@ -753,6 +765,9 @@ HRESULT create_plugin_host(IUnknown *unk, PluginHost **ret) IUnknown_AddRef(unk); host->plugin_unk = unk; + host->doc = doc; + list_add_tail(&doc->plugin_hosts, &host->entry); + *ret = host; return S_OK; } diff --git a/dlls/mshtml/pluginhost.h b/dlls/mshtml/pluginhost.h index 2b66696..ab61523 100644 --- a/dlls/mshtml/pluginhost.h +++ b/dlls/mshtml/pluginhost.h @@ -32,7 +32,11 @@ typedef struct { IUnknown *plugin_unk; HWND hwnd; + + HTMLDocumentNode *doc; + struct list entry; } PluginHost; -HRESULT create_plugin_host(IUnknown*,PluginHost**); +HRESULT create_plugin_host(HTMLDocumentNode*,IUnknown*,PluginHost**); void update_plugin_window(PluginHost*,HWND,const RECT*); +void detach_plugin_hosts(HTMLDocumentNode*);
1
0
0
0
Francois Gouget : winetest: Allow submitting the results if not too many tests have been skipped.
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: d9dcafab911e1889f5d59f30998c9dc2bc91be7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d9dcafab911e1889f5d59f309…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Dec 9 12:19:08 2010 +0100 winetest: Allow submitting the results if not too many tests have been skipped. Currently the limit is set at 10 tests or subtests. --- programs/winetest/main.c | 50 +++++++++++++++++++++++++-------------------- 1 files changed, 28 insertions(+), 22 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 6f922ef..1ea308b 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -37,6 +37,9 @@ #include "winetest.h" #include "resource.h" +/* Don't submit the results if more than SKIP_LIMIT tests have been skipped */ +#define SKIP_LIMIT 10 + struct wine_test { char *name; @@ -53,7 +56,7 @@ char *url = NULL; char *email = NULL; BOOL aborting = FALSE; static struct wine_test *wine_tests; -static int nr_of_files, nr_of_tests; +static int nr_of_files, nr_of_tests, nr_of_skips; static int nr_native_dlls; static const char whitespace[] = " \t\r\n"; static const char testexe[] = "_test.exe"; @@ -597,6 +600,7 @@ run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const ch { report (R_STEP, "Skipping: %s:%s", test->name, subtest); xprintf ("%s:%s skipped %s -\n", test->name, subtest, file); + nr_of_skips++; } else { @@ -703,7 +707,11 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType, ULONG_PTR cookie; if (aborting) return TRUE; - if (test_filtered_out( lpszName, NULL )) return TRUE; + if (test_filtered_out( lpszName, NULL )) + { + nr_of_skips++; + return TRUE; + } CharLowerA(lpszName); extract_test (&wine_tests[nr_of_files], tempdir, lpszName); @@ -902,6 +910,7 @@ run_tests (char *logname, char *outdir) report (R_PROGRESS, 0, nr_of_files); nr_of_files = 0; nr_of_tests = 0; + nr_of_skips = 0; if (!EnumResourceNames (NULL, "TESTRES", extract_test_proc, (LPARAM)tempdir)) report (R_FATAL, "Can't enumerate test files: %d", GetLastError ()); @@ -1172,35 +1181,32 @@ int main( int argc, char *argv[] ) SetEnvironmentVariableA( "WINETEST_REPORT_SUCCESS", "0" ); } - if (!nb_filters) /* don't submit results when filtering */ - { - while (!tag) { - if (!interactive) - report (R_FATAL, "Please specify a tag (-t option) if " - "running noninteractive!"); - if (guiAskTag () == IDABORT) exit (1); - } - report (R_TAG); - - while (!email) { - if (!interactive) - report (R_FATAL, "Please specify an email address (-m option) to enable developers\n" - " to contact you about your report if necessary."); - if (guiAskEmail () == IDABORT) exit (1); - } + while (!tag) { + if (!interactive) + report (R_FATAL, "Please specify a tag (-t option) if " + "running noninteractive!"); + if (guiAskTag () == IDABORT) exit (1); + } + report (R_TAG); - if (!build_id[0]) - report( R_WARNING, "You won't be able to submit results without a valid build id.\n" - "To submit results, winetest needs to be built from a git checkout." ); + while (!email) { + if (!interactive) + report (R_FATAL, "Please specify an email address (-m option) to enable developers\n" + " to contact you about your report if necessary."); + if (guiAskEmail () == IDABORT) exit (1); } + if (!build_id[0]) + report( R_WARNING, "You won't be able to submit results without a valid build id.\n" + "To submit results, winetest needs to be built from a git checkout." ); + if (!logname) { logname = run_tests (NULL, outdir); if (aborting) { DeleteFileA(logname); exit (0); } - if (build_id[0] && !nb_filters && !nr_native_dlls && + if (build_id[0] && nr_of_skips <= SKIP_LIMIT && !nr_native_dlls && report (R_ASK, MB_YESNO, "Do you want to submit the test results?") == IDYES) if (!send_file (logname) && !DeleteFileA(logname)) report (R_WARNING, "Can't remove logfile: %u", GetLastError());
1
0
0
0
Francois Gouget : winetest: Add a trace in the log when skipping a subtest.
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: aa424f8159b02f2215886e4c58975b91f191cab2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa424f8159b02f2215886e4c5…
Author: Francois Gouget <fgouget(a)free.fr> Date: Thu Dec 9 12:05:19 2010 +0100 winetest: Add a trace in the log when skipping a subtest. --- programs/winetest/main.c | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 883006c..6f922ef 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -575,8 +575,7 @@ get_subtests (const char *tempdir, struct wine_test *test, LPTSTR res_name) test->subtests = heap_realloc (test->subtests, allocated * sizeof(char*)); } - if (!test_filtered_out( test->name, index )) - test->subtests[test->subtest_count++] = heap_strdup(index); + test->subtests[test->subtest_count++] = heap_strdup(index); index = strtok (NULL, whitespace); } test->subtests = heap_realloc (test->subtests, @@ -592,14 +591,23 @@ get_subtests (const char *tempdir, struct wine_test *test, LPTSTR res_name) static void run_test (struct wine_test* test, const char* subtest, HANDLE out_file, const char *tempdir) { - int status; const char* file = get_test_source_file(test->name, subtest); - char *cmd = strmake (NULL, "%s %s", test->exename, subtest); - xprintf ("%s:%s start %s -\n", test->name, subtest, file); - status = run_ex (cmd, out_file, tempdir, 120000); - heap_free (cmd); - xprintf ("%s:%s done (%d)\n", test->name, subtest, status); + if (test_filtered_out( test->name, subtest )) + { + report (R_STEP, "Skipping: %s:%s", test->name, subtest); + xprintf ("%s:%s skipped %s -\n", test->name, subtest, file); + } + else + { + int status; + char *cmd = strmake (NULL, "%s %s", test->exename, subtest); + report (R_STEP, "Running: %s:%s", test->name, subtest); + xprintf ("%s:%s start %s -\n", test->name, subtest, file); + status = run_ex (cmd, out_file, tempdir, 120000); + heap_free (cmd); + xprintf ("%s:%s done (%d)\n", test->name, subtest, status); + } } static BOOL CALLBACK @@ -924,9 +932,7 @@ run_tests (char *logname, char *outdir) for (j = 0; j < test->subtest_count; j++) { if (aborting) break; - report (R_STEP, "Running: %s:%s", test->name, - test->subtests[j]); - run_test (test, test->subtests[j], logfile, tempdir); + run_test (test, test->subtests[j], logfile, tempdir); } if (test->maindllpath) {
1
0
0
0
Michael Stefaniuc : riched20: Standardize the COM usage in clipboard.c.
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: 9a6f5ad23969675c111c7949a5528d6af3c797bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9a6f5ad23969675c111c7949a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Dec 9 10:27:26 2010 +0100 riched20: Standardize the COM usage in clipboard.c. --- dlls/riched20/clipboard.c | 56 ++++++++++++++++++++++++++------------------ 1 files changed, 33 insertions(+), 23 deletions(-) diff --git a/dlls/riched20/clipboard.c b/dlls/riched20/clipboard.c index 15ce97b..f7514a2 100644 --- a/dlls/riched20/clipboard.c +++ b/dlls/riched20/clipboard.c @@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit); static UINT cfRTF = 0; typedef struct DataObjectImpl { - const IDataObjectVtbl *lpVtbl; + IDataObject IDataObject_iface; LONG ref; FORMATETC *fmtetc; @@ -36,7 +36,7 @@ typedef struct DataObjectImpl { } DataObjectImpl; typedef struct EnumFormatImpl { - const IEnumFORMATETCVtbl *lpVtbl; + IEnumFORMATETC IEnumFORMATETC_iface; LONG ref; FORMATETC *fmtetc; @@ -47,9 +47,19 @@ typedef struct EnumFormatImpl { static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT size, LPENUMFORMATETC *lplpformatetc); +static inline DataObjectImpl *impl_from_IDataObject(IDataObject *iface) +{ + return CONTAINING_RECORD(iface, DataObjectImpl, IDataObject_iface); +} + +static inline EnumFormatImpl *impl_from_IEnumFORMATETC(IEnumFORMATETC *iface) +{ + return CONTAINING_RECORD(iface, EnumFormatImpl, IEnumFORMATETC_iface); +} + static HRESULT WINAPI EnumFormatImpl_QueryInterface(IEnumFORMATETC *iface, REFIID riid, LPVOID *ppvObj) { - EnumFormatImpl *This = (EnumFormatImpl*)iface; + EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface); TRACE("%p %s\n", This, debugstr_guid(riid)); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumFORMATETC)) { @@ -63,7 +73,7 @@ static HRESULT WINAPI EnumFormatImpl_QueryInterface(IEnumFORMATETC *iface, REFII static ULONG WINAPI EnumFormatImpl_AddRef(IEnumFORMATETC *iface) { - EnumFormatImpl *This = (EnumFormatImpl*)iface; + EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface); LONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); return ref; @@ -71,7 +81,7 @@ static ULONG WINAPI EnumFormatImpl_AddRef(IEnumFORMATETC *iface) static ULONG WINAPI EnumFormatImpl_Release(IEnumFORMATETC *iface) { - EnumFormatImpl *This = (EnumFormatImpl*)iface; + EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); @@ -86,7 +96,7 @@ static ULONG WINAPI EnumFormatImpl_Release(IEnumFORMATETC *iface) static HRESULT WINAPI EnumFormatImpl_Next(IEnumFORMATETC *iface, ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched) { - EnumFormatImpl *This = (EnumFormatImpl*)iface; + EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface); ULONG count = 0; TRACE("(%p)->(%d %p %p)\n", This, celt, rgelt, pceltFetched); @@ -105,7 +115,7 @@ static HRESULT WINAPI EnumFormatImpl_Next(IEnumFORMATETC *iface, ULONG celt, static HRESULT WINAPI EnumFormatImpl_Skip(IEnumFORMATETC *iface, ULONG celt) { - EnumFormatImpl *This = (EnumFormatImpl*)iface; + EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface); ULONG count = 0; TRACE("(%p)->(%d)\n", This, celt); @@ -116,7 +126,7 @@ static HRESULT WINAPI EnumFormatImpl_Skip(IEnumFORMATETC *iface, ULONG celt) static HRESULT WINAPI EnumFormatImpl_Reset(IEnumFORMATETC *iface) { - EnumFormatImpl *This = (EnumFormatImpl*)iface; + EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface); TRACE("(%p)\n", This); This->cur = 0; @@ -125,7 +135,7 @@ static HRESULT WINAPI EnumFormatImpl_Reset(IEnumFORMATETC *iface) static HRESULT WINAPI EnumFormatImpl_Clone(IEnumFORMATETC *iface, IEnumFORMATETC **ppenum) { - EnumFormatImpl *This = (EnumFormatImpl*)iface; + EnumFormatImpl *This = impl_from_IEnumFORMATETC(iface); HRESULT hr; TRACE("(%p)->(%p)\n", This, ppenum); @@ -153,7 +163,7 @@ static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT fmtetc_cnt, I TRACE("\n"); ret = heap_alloc(sizeof(EnumFormatImpl)); - ret->lpVtbl = &VT_EnumFormatImpl; + ret->IEnumFORMATETC_iface.lpVtbl = &VT_EnumFormatImpl; ret->ref = 1; ret->cur = 0; ret->fmtetc_cnt = fmtetc_cnt; @@ -165,7 +175,7 @@ static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT fmtetc_cnt, I static HRESULT WINAPI DataObjectImpl_QueryInterface(IDataObject *iface, REFIID riid, LPVOID *ppvObj) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); TRACE("(%p)->(%s)\n", This, debugstr_guid(riid)); if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDataObject)) { @@ -179,7 +189,7 @@ static HRESULT WINAPI DataObjectImpl_QueryInterface(IDataObject *iface, REFIID r static ULONG WINAPI DataObjectImpl_AddRef(IDataObject* iface) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref=%d\n", This, ref); return ref; @@ -187,7 +197,7 @@ static ULONG WINAPI DataObjectImpl_AddRef(IDataObject* iface) static ULONG WINAPI DataObjectImpl_Release(IDataObject* iface) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref=%d\n",This, ref); @@ -203,7 +213,7 @@ static ULONG WINAPI DataObjectImpl_Release(IDataObject* iface) static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); TRACE("(%p)->(fmt=0x%08x tym=0x%08x)\n", This, pformatetc->cfFormat, pformatetc->tymed); if(pformatetc->lindex != -1) @@ -227,14 +237,14 @@ static HRESULT WINAPI DataObjectImpl_GetData(IDataObject* iface, FORMATETC *pfor static HRESULT WINAPI DataObjectImpl_GetDataHere(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); FIXME("(%p): stub\n", This); return E_NOTIMPL; } static HRESULT WINAPI DataObjectImpl_QueryGetData(IDataObject* iface, FORMATETC *pformatetc) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); UINT i; BOOL foundFormat = FALSE; TRACE("(%p)->(fmt=0x%08x tym=0x%08x)\n", This, pformatetc->cfFormat, pformatetc->tymed); @@ -255,7 +265,7 @@ static HRESULT WINAPI DataObjectImpl_QueryGetData(IDataObject* iface, FORMATETC static HRESULT WINAPI DataObjectImpl_GetCanonicalFormatEtc(IDataObject* iface, FORMATETC *pformatetcIn, FORMATETC *pformatetcOut) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); TRACE("(%p)->(%p,%p)\n", This, pformatetcIn, pformatetcOut); if(pformatetcOut) { @@ -268,7 +278,7 @@ static HRESULT WINAPI DataObjectImpl_GetCanonicalFormatEtc(IDataObject* iface, F static HRESULT WINAPI DataObjectImpl_SetData(IDataObject* iface, FORMATETC *pformatetc, STGMEDIUM *pmedium, BOOL fRelease) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); FIXME("(%p): stub\n", This); return E_NOTIMPL; } @@ -276,7 +286,7 @@ static HRESULT WINAPI DataObjectImpl_SetData(IDataObject* iface, FORMATETC *pfor static HRESULT WINAPI DataObjectImpl_EnumFormatEtc(IDataObject* iface, DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); TRACE("(%p)->(%d)\n", This, dwDirection); if(dwDirection != DATADIR_GET) { @@ -291,21 +301,21 @@ static HRESULT WINAPI DataObjectImpl_EnumFormatEtc(IDataObject* iface, DWORD dwD static HRESULT WINAPI DataObjectImpl_DAdvise(IDataObject* iface, FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); FIXME("(%p): stub\n", This); return E_NOTIMPL; } static HRESULT WINAPI DataObjectImpl_DUnadvise(IDataObject* iface, DWORD dwConnection) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); FIXME("(%p): stub\n", This); return E_NOTIMPL; } static HRESULT WINAPI DataObjectImpl_EnumDAdvise(IDataObject* iface, IEnumSTATDATA **ppenumAdvise) { - DataObjectImpl *This = (DataObjectImpl*)iface; + DataObjectImpl *This = impl_from_IDataObject(iface); FIXME("(%p): stub\n", This); return E_NOTIMPL; } @@ -399,7 +409,7 @@ HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start, if(cfRTF == 0) cfRTF = RegisterClipboardFormatA("Rich Text Format"); - obj->lpVtbl = &VT_DataObjectImpl; + obj->IDataObject_iface.lpVtbl = &VT_DataObjectImpl; obj->ref = 1; obj->unicode = get_unicode_text(editor, start, nChars); obj->rtf = NULL;
1
0
0
0
Michael Stefaniuc : riched20/tests: Use an iface instead of a vtbl pointer in ITextHostTestImpl.
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: 0acf4a297bc6b2faf5d15eccb41bf40c1e5040df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0acf4a297bc6b2faf5d15eccb…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Thu Dec 9 10:27:13 2010 +0100 riched20/tests: Use an iface instead of a vtbl pointer in ITextHostTestImpl. --- dlls/riched20/tests/txtsrv.c | 95 ++++++++++++++++++++++-------------------- 1 files changed, 50 insertions(+), 45 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0acf4a297bc6b2faf5d15…
1
0
0
0
Michael Stefaniuc : msxml3: Use ifaces instead of vtbl pointers in BindStatusCallback.
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: 4038523b4e30c5bbee20d1e83c78ec780019c902 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4038523b4e30c5bbee20d1e83…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Dec 8 22:59:37 2010 +0100 msxml3: Use ifaces instead of vtbl pointers in BindStatusCallback. --- dlls/msxml3/httprequest.c | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c index b016016..9e8cf69 100644 --- a/dlls/msxml3/httprequest.c +++ b/dlls/msxml3/httprequest.c @@ -105,8 +105,8 @@ static void httprequest_setreadystate(httprequest *This, READYSTATE state) struct BindStatusCallback { - const IBindStatusCallbackVtbl *lpBindStatusCallbackVtbl; - const IHttpNegotiateVtbl *lpHttpNegotiateVtbl; + IBindStatusCallback IBindStatusCallback_iface; + IHttpNegotiate IHttpNegotiate_iface; LONG ref; IBinding *binding; @@ -121,12 +121,12 @@ struct BindStatusCallback static inline BindStatusCallback *impl_from_IBindStatusCallback( IBindStatusCallback *iface ) { - return (BindStatusCallback *)((char*)iface - FIELD_OFFSET(BindStatusCallback, lpBindStatusCallbackVtbl)); + return CONTAINING_RECORD(iface, BindStatusCallback, IBindStatusCallback_iface); } static inline BindStatusCallback *impl_from_IHttpNegotiate( IHttpNegotiate *iface ) { - return (BindStatusCallback *)((char*)iface - FIELD_OFFSET(BindStatusCallback, lpHttpNegotiateVtbl)); + return CONTAINING_RECORD(iface, BindStatusCallback, IHttpNegotiate_iface); } void BindStatusCallback_Detach(BindStatusCallback *bsc) @@ -135,7 +135,7 @@ void BindStatusCallback_Detach(BindStatusCallback *bsc) { if (bsc->binding) IBinding_Abort(bsc->binding); bsc->request = NULL; - IBindStatusCallback_Release((IBindStatusCallback*)bsc); + IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface); } } @@ -151,11 +151,11 @@ static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *ifa if (IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IBindStatusCallback, riid)) { - *ppv = &This->lpBindStatusCallbackVtbl; + *ppv = &This->IBindStatusCallback_iface; } else if (IsEqualGUID(&IID_IHttpNegotiate, riid)) { - *ppv = &This->lpHttpNegotiateVtbl; + *ppv = &This->IHttpNegotiate_iface; } else if (IsEqualGUID(&IID_IServiceProvider, riid) || IsEqualGUID(&IID_IBindStatusCallbackEx, riid) || @@ -344,19 +344,19 @@ static HRESULT WINAPI BSCHttpNegotiate_QueryInterface(IHttpNegotiate *iface, REFIID riid, void **ppv) { BindStatusCallback *This = impl_from_IHttpNegotiate(iface); - return IBindStatusCallback_QueryInterface((IBindStatusCallback*)This, riid, ppv); + return IBindStatusCallback_QueryInterface(&This->IBindStatusCallback_iface, riid, ppv); } static ULONG WINAPI BSCHttpNegotiate_AddRef(IHttpNegotiate *iface) { BindStatusCallback *This = impl_from_IHttpNegotiate(iface); - return IBindStatusCallback_AddRef((IBindStatusCallback*)This); + return IBindStatusCallback_AddRef(&This->IBindStatusCallback_iface); } static ULONG WINAPI BSCHttpNegotiate_Release(IHttpNegotiate *iface) { BindStatusCallback *This = impl_from_IHttpNegotiate(iface); - return IBindStatusCallback_Release((IBindStatusCallback*)This); + return IBindStatusCallback_Release(&This->IBindStatusCallback_iface); } static HRESULT WINAPI BSCHttpNegotiate_BeginningTransaction(IHttpNegotiate *iface, @@ -433,8 +433,8 @@ static HRESULT BindStatusCallback_create(httprequest* This, BindStatusCallback * return E_OUTOFMEMORY; } - bsc->lpBindStatusCallbackVtbl = &BindStatusCallbackVtbl; - bsc->lpHttpNegotiateVtbl = &BSCHttpNegotiateVtbl; + bsc->IBindStatusCallback_iface.lpVtbl = &BindStatusCallbackVtbl; + bsc->IHttpNegotiate_iface.lpVtbl = &BSCHttpNegotiateVtbl; bsc->ref = 1; bsc->request = This; bsc->binding = NULL; @@ -465,7 +465,7 @@ static HRESULT BindStatusCallback_create(httprequest* This, BindStatusCallback * FIXME("unsupported body data type %d\n", V_VT(body)); } - hr = RegisterBindStatusCallback(pbc, (IBindStatusCallback*)bsc, NULL, 0); + hr = RegisterBindStatusCallback(pbc, &bsc->IBindStatusCallback_iface, NULL, 0); if (hr == S_OK) { IMoniker *moniker; @@ -484,7 +484,7 @@ static HRESULT BindStatusCallback_create(httprequest* This, BindStatusCallback * if (FAILED(hr)) { - IBindStatusCallback_Release((IBindStatusCallback*)bsc); + IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface); bsc = NULL; }
1
0
0
0
Michael Stefaniuc : msimtf: Use an iface instead of a vtbl pointer in ActiveIMMApp.
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: d24e87fdafcf4f1b57a56829f5dd8158cf25bf18 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d24e87fdafcf4f1b57a56829f…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Dec 8 22:59:32 2010 +0100 msimtf: Use an iface instead of a vtbl pointer in ActiveIMMApp. --- dlls/msimtf/activeimmapp.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/msimtf/activeimmapp.c b/dlls/msimtf/activeimmapp.c index 73ce075..4178992 100644 --- a/dlls/msimtf/activeimmapp.c +++ b/dlls/msimtf/activeimmapp.c @@ -42,10 +42,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(msimtf); typedef struct tagActiveIMMApp { - const IActiveIMMAppVtbl *vtbl; + IActiveIMMApp IActiveIMMApp_iface; LONG refCount; } ActiveIMMApp; +static inline ActiveIMMApp *impl_from_IActiveIMMApp(IActiveIMMApp *iface) +{ + return CONTAINING_RECORD(iface, ActiveIMMApp, IActiveIMMApp_iface); +} + static void ActiveIMMApp_Destructor(ActiveIMMApp* This) { TRACE("\n"); @@ -55,7 +60,7 @@ static void ActiveIMMApp_Destructor(ActiveIMMApp* This) static HRESULT WINAPI ActiveIMMApp_QueryInterface (IActiveIMMApp* iface, REFIID iid, LPVOID *ppvOut) { - ActiveIMMApp *This = (ActiveIMMApp*)iface; + ActiveIMMApp *This = impl_from_IActiveIMMApp(iface); *ppvOut = NULL; if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IActiveIMMApp)) @@ -75,13 +80,13 @@ static HRESULT WINAPI ActiveIMMApp_QueryInterface (IActiveIMMApp* iface, static ULONG WINAPI ActiveIMMApp_AddRef(IActiveIMMApp* iface) { - ActiveIMMApp *This = (ActiveIMMApp*)iface; + ActiveIMMApp *This = impl_from_IActiveIMMApp(iface); return InterlockedIncrement(&This->refCount); } static ULONG WINAPI ActiveIMMApp_Release(IActiveIMMApp* iface) { - ActiveIMMApp *This = (ActiveIMMApp*)iface; + ActiveIMMApp *This = impl_from_IActiveIMMApp(iface); ULONG ret; ret = InterlockedDecrement(&This->refCount); @@ -818,7 +823,7 @@ HRESULT ActiveIMMApp_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut) if (This == NULL) return E_OUTOFMEMORY; - This->vtbl = &ActiveIMMAppVtbl; + This->IActiveIMMApp_iface.lpVtbl = &ActiveIMMAppVtbl; This->refCount = 1; TRACE("returning %p\n",This);
1
0
0
0
Michael Stefaniuc : qedit: Use an iface instead of a vtbl pointer in MediaDetImpl.
by Alexandre Julliard
09 Dec '10
09 Dec '10
Module: wine Branch: master Commit: 5c2cf08674d6584e09f15265a533973e135e9415 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c2cf08674d6584e09f15265a…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Dec 8 22:59:33 2010 +0100 qedit: Use an iface instead of a vtbl pointer in MediaDetImpl. --- dlls/qedit/mediadet.c | 47 ++++++++++++++++++++++++++--------------------- 1 files changed, 26 insertions(+), 21 deletions(-) diff --git a/dlls/qedit/mediadet.c b/dlls/qedit/mediadet.c index 5ccccd6..38a54ce 100644 --- a/dlls/qedit/mediadet.c +++ b/dlls/qedit/mediadet.c @@ -33,7 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qedit); typedef struct MediaDetImpl { - const IMediaDetVtbl *MediaDet_Vtbl; + IMediaDet IMediaDet_iface; LONG refCount; IGraphBuilder *graph; IBaseFilter *source; @@ -43,6 +43,11 @@ typedef struct MediaDetImpl { IPin *cur_pin; } MediaDetImpl; +static inline MediaDetImpl *impl_from_IMediaDet(IMediaDet *iface) +{ + return CONTAINING_RECORD(iface, MediaDetImpl, IMediaDet_iface); +} + static void MD_cleanup(MediaDetImpl *This) { if (This->cur_pin) IPin_Release(This->cur_pin); @@ -59,7 +64,7 @@ static void MD_cleanup(MediaDetImpl *This) static ULONG WINAPI MediaDet_AddRef(IMediaDet* iface) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); ULONG refCount = InterlockedIncrement(&This->refCount); TRACE("(%p)->() AddRef from %d\n", This, refCount - 1); return refCount; @@ -67,7 +72,7 @@ static ULONG WINAPI MediaDet_AddRef(IMediaDet* iface) static ULONG WINAPI MediaDet_Release(IMediaDet* iface) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); ULONG refCount = InterlockedDecrement(&This->refCount); TRACE("(%p)->() Release from %d\n", This, refCount + 1); @@ -84,7 +89,7 @@ static ULONG WINAPI MediaDet_Release(IMediaDet* iface) static HRESULT WINAPI MediaDet_QueryInterface(IMediaDet* iface, REFIID riid, void **ppvObject) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppvObject); if (IsEqualIID(riid, &IID_IUnknown) || @@ -100,21 +105,21 @@ static HRESULT WINAPI MediaDet_QueryInterface(IMediaDet* iface, REFIID riid, static HRESULT WINAPI MediaDet_get_Filter(IMediaDet* iface, IUnknown **pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%p): not implemented!\n", This, pVal); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_put_Filter(IMediaDet* iface, IUnknown *newVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%p): not implemented!\n", This, newVal); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_get_OutputStreams(IMediaDet* iface, LONG *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); IEnumPins *pins; IPin *pin; HRESULT hr; @@ -158,7 +163,7 @@ static HRESULT WINAPI MediaDet_get_OutputStreams(IMediaDet* iface, LONG *pVal) static HRESULT WINAPI MediaDet_get_CurrentStream(IMediaDet* iface, LONG *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); TRACE("(%p)\n", This); if (!pVal) @@ -211,7 +216,7 @@ static HRESULT SetCurPin(MediaDetImpl *This, LONG strm) static HRESULT WINAPI MediaDet_put_CurrentStream(IMediaDet* iface, LONG newVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); HRESULT hr; TRACE("(%p)->(%d)\n", This, newVal); @@ -237,28 +242,28 @@ static HRESULT WINAPI MediaDet_put_CurrentStream(IMediaDet* iface, LONG newVal) static HRESULT WINAPI MediaDet_get_StreamType(IMediaDet* iface, GUID *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%p): not implemented!\n", This, debugstr_guid(pVal)); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_get_StreamTypeB(IMediaDet* iface, BSTR *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%p): not implemented!\n", This, pVal); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_get_StreamLength(IMediaDet* iface, double *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p): stub!\n", This); return VFW_E_INVALIDMEDIATYPE; } static HRESULT WINAPI MediaDet_get_Filename(IMediaDet* iface, BSTR *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); IFileSourceFilter *file; LPOLESTR name; HRESULT hr; @@ -437,7 +442,7 @@ retry: static HRESULT WINAPI MediaDet_put_Filename(IMediaDet* iface, BSTR newVal) { static const WCHAR reader[] = {'R','e','a','d','e','r',0}; - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); IGraphBuilder *gb; IBaseFilter *bf; HRESULT hr; @@ -476,7 +481,7 @@ static HRESULT WINAPI MediaDet_GetBitmapBits(IMediaDet* iface, LONG *pBufferSize, char *pBuffer, LONG Width, LONG Height) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%f %p %p %d %d): not implemented!\n", This, StreamTime, pBufferSize, pBuffer, Width, Height); return E_NOTIMPL; @@ -486,7 +491,7 @@ static HRESULT WINAPI MediaDet_WriteBitmapBits(IMediaDet* iface, double StreamTime, LONG Width, LONG Height, BSTR Filename) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%f %d %d %p): not implemented!\n", This, StreamTime, Width, Height, Filename); return E_NOTIMPL; } @@ -494,7 +499,7 @@ static HRESULT WINAPI MediaDet_WriteBitmapBits(IMediaDet* iface, static HRESULT WINAPI MediaDet_get_StreamMediaType(IMediaDet* iface, AM_MEDIA_TYPE *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); IEnumMediaTypes *types; AM_MEDIA_TYPE *pmt; HRESULT hr; @@ -528,14 +533,14 @@ static HRESULT WINAPI MediaDet_get_StreamMediaType(IMediaDet* iface, static HRESULT WINAPI MediaDet_GetSampleGrabber(IMediaDet* iface, ISampleGrabber **ppVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%p): not implemented!\n", This, ppVal); return E_NOTIMPL; } static HRESULT WINAPI MediaDet_get_FrameRate(IMediaDet* iface, double *pVal) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); AM_MEDIA_TYPE mt; VIDEOINFOHEADER *vh; HRESULT hr; @@ -565,7 +570,7 @@ static HRESULT WINAPI MediaDet_get_FrameRate(IMediaDet* iface, double *pVal) static HRESULT WINAPI MediaDet_EnterBitmapGrabMode(IMediaDet* iface, double SeekTime) { - MediaDetImpl *This = (MediaDetImpl *)iface; + MediaDetImpl *This = impl_from_IMediaDet(iface); FIXME("(%p)->(%f): not implemented!\n", This, SeekTime); return E_NOTIMPL; } @@ -609,7 +614,7 @@ HRESULT MediaDet_create(IUnknown * pUnkOuter, LPVOID * ppv) { ZeroMemory(obj, sizeof(MediaDetImpl)); obj->refCount = 1; - obj->MediaDet_Vtbl = &IMediaDet_VTable; + obj->IMediaDet_iface.lpVtbl = &IMediaDet_VTable; obj->graph = NULL; obj->source = NULL; obj->splitter = NULL;
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
110
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200