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
March
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
September 2009
----- 2025 -----
March 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
3 participants
866 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Make COM inproc object and document node separated objects inheriting from HTMLDocument .
by Alexandre Julliard
17 Sep '09
17 Sep '09
Module: wine Branch: master Commit: 11eb1b08404780813704f0591fa47ebbffcac8fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11eb1b08404780813704f0591…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 16 22:06:31 2009 +0200 mshtml: Make COM inproc object and document node separated objects inheriting from HTMLDocument. --- dlls/mshtml/htmldoc.c | 476 +++++++++++++++++++++++++----------------- dlls/mshtml/htmliframe.c | 6 +- dlls/mshtml/mshtml_private.h | 37 +++- 3 files changed, 318 insertions(+), 201 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=11eb1b08404780813704f…
1
0
0
0
Jacek Caban : mshtml: Moved HTMLLocation object to HTMLWindow.
by Alexandre Julliard
17 Sep '09
17 Sep '09
Module: wine Branch: master Commit: 74f28d4a20947dfbbda21993e94c242e3f1a920f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=74f28d4a20947dfbbda21993e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 16 22:05:50 2009 +0200 mshtml: Moved HTMLLocation object to HTMLWindow. --- dlls/mshtml/htmldoc.c | 11 +------- dlls/mshtml/htmllocation.c | 61 ++++++++++++++++++++++++++--------------- dlls/mshtml/htmlwindow.c | 19 ++++++++++--- dlls/mshtml/mshtml_private.h | 23 +++++++-------- 4 files changed, 66 insertions(+), 48 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 1c35b4b..e34e9dd 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -196,9 +196,6 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface) if(This->hwnd) DestroyWindow(This->hwnd); - if(This->location) - This->location->doc = NULL; - if(This->window) IHTMLWindow2_Release(HTMLWINDOW2(This->window)); @@ -733,13 +730,7 @@ static HRESULT WINAPI HTMLDocument_get_location(IHTMLDocument2 *iface, IHTMLLoca TRACE("(%p)->(%p)\n", This, p); - if(This->location) - IHTMLLocation_AddRef(HTMLLOCATION(This->location)); - else - This->location = HTMLLocation_Create(This); - - *p = HTMLLOCATION(This->location); - return S_OK; + return IHTMLWindow2_get_location(HTMLWINDOW2(This->window), p); } static HRESULT WINAPI HTMLDocument_get_lastModified(IHTMLDocument2 *iface, BSTR *p) diff --git a/dlls/mshtml/htmllocation.c b/dlls/mshtml/htmllocation.c index 8637838..6a3e194 100644 --- a/dlls/mshtml/htmllocation.c +++ b/dlls/mshtml/htmllocation.c @@ -35,6 +35,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); +static HRESULT get_url(HTMLLocation *This, const WCHAR **ret) +{ + if(!This->window || !This->window->doc || !This->window->doc->url) { + FIXME("No current URL\n"); + return E_NOTIMPL; + } + + *ret = This->window->doc->url; + return S_OK; +} + + #define HTMLLOCATION_THIS(iface) DEFINE_THIS(HTMLLocation, HTMLLocation, iface) static HRESULT WINAPI HTMLLocation_QueryInterface(IHTMLLocation *iface, REFIID riid, void **ppv) @@ -80,8 +92,8 @@ static ULONG WINAPI HTMLLocation_Release(IHTMLLocation *iface) TRACE("(%p) ref=%d\n", This, ref); if(!ref) { - if(This->doc && This->doc->location == This) - This->doc->location = NULL; + if(This->window) + This->window->location = NULL; release_dispex(&This->dispex); heap_free(This); } @@ -129,20 +141,20 @@ static HRESULT WINAPI HTMLLocation_put_href(IHTMLLocation *iface, BSTR v) static HRESULT WINAPI HTMLLocation_get_href(IHTMLLocation *iface, BSTR *p) { HTMLLocation *This = HTMLLOCATION_THIS(iface); + const WCHAR *url; + HRESULT hres; TRACE("(%p)->(%p)\n", This, p); if(!p) return E_POINTER; - if(!This->doc || !This->doc->url) { - FIXME("No current URL\n"); - return E_NOTIMPL; - } - - *p = SysAllocString(This->doc->url); + hres = get_url(This, &url); + if(FAILED(hres)) + return hres; - return S_OK; + *p = SysAllocString(url); + return *p ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI HTMLLocation_put_protocol(IHTMLLocation *iface, BSTR v) @@ -213,17 +225,17 @@ static HRESULT WINAPI HTMLLocation_get_pathname(IHTMLLocation *iface, BSTR *p) HTMLLocation *This = HTMLLOCATION_THIS(iface); WCHAR buf[INTERNET_MAX_PATH_LENGTH]; URL_COMPONENTSW url = {sizeof(url)}; + const WCHAR *doc_url; DWORD size = 0; HRESULT hres; TRACE("(%p)->(%p)\n", This, p); - if(!This->doc || !This->doc->url) { - FIXME("No current URL\n"); - return E_NOTIMPL; - } + hres = get_url(This, &doc_url); + if(FAILED(hres)) + return hres; - hres = CoInternetParseUrl(This->doc->url, PARSE_PATH_FROM_URL, 0, buf, sizeof(buf), &size, 0); + hres = CoInternetParseUrl(doc_url, PARSE_PATH_FROM_URL, 0, buf, sizeof(buf), &size, 0); if(SUCCEEDED(hres)) { *p = SysAllocString(buf); if(!*p) @@ -232,7 +244,7 @@ static HRESULT WINAPI HTMLLocation_get_pathname(IHTMLLocation *iface, BSTR *p) } url.dwUrlPathLength = 1; - if(!InternetCrackUrlW(This->doc->url, 0, 0, &url)) { + if(!InternetCrackUrlW(doc_url, 0, 0, &url)) { FIXME("InternetCrackUrl failed\n"); return E_FAIL; } @@ -382,15 +394,20 @@ static dispex_static_data_t HTMLLocation_dispex = { }; -HTMLLocation *HTMLLocation_Create(HTMLDocument *doc) +HRESULT HTMLLocation_Create(HTMLWindow *window, HTMLLocation **ret) { - HTMLLocation *ret = heap_alloc(sizeof(*ret)); + HTMLLocation *location; - ret->lpHTMLLocationVtbl = &HTMLLocationVtbl; - ret->ref = 1; - ret->doc = doc; + location = heap_alloc(sizeof(*location)); + if(!location) + return E_OUTOFMEMORY; - init_dispex(&ret->dispex, (IUnknown*)HTMLLOCATION(ret), &HTMLLocation_dispex); + location->lpHTMLLocationVtbl = &HTMLLocationVtbl; + location->ref = 1; + location->window = window; - return ret; + init_dispex(&location->dispex, (IUnknown*)HTMLLOCATION(location), &HTMLLocation_dispex); + + *ret = location; + return S_OK; } diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 60a46a1..c08929b 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -100,6 +100,11 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface) IHTMLOptionElementFactory_Release(HTMLOPTFACTORY(This->option_factory)); } + if(This->location) { + This->location->window = NULL; + IHTMLLocation_Release(HTMLLOCATION(This->location)); + } + if(This->event_target) release_event_target(This->event_target); for(i=0; i < This->global_prop_cnt; i++) @@ -364,12 +369,18 @@ static HRESULT WINAPI HTMLWindow2_get_location(IHTMLWindow2 *iface, IHTMLLocatio TRACE("(%p)->(%p)\n", This, p); - if(!This->doc) { - FIXME("This->doc is NULL\n"); - return E_FAIL; + if(This->location) { + IHTMLLocation_AddRef(HTMLLOCATION(This->location)); + }else { + HRESULT hres; + + hres = HTMLLocation_Create(This, &This->location); + if(FAILED(hres)) + return hres; } - return IHTMLDocument2_get_location(HTMLDOC(This->doc), p); + *p = HTMLLOCATION(This->location); + return S_OK; } static HRESULT WINAPI HTMLWindow2_get_history(IHTMLWindow2 *iface, IOmHistory **p) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index f5cb291..9508847 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -176,6 +176,15 @@ typedef struct { HTMLWindow *window; } HTMLOptionElementFactory; +struct HTMLLocation { + DispatchEx dispex; + const IHTMLLocationVtbl *lpHTMLLocationVtbl; + + LONG ref; + + HTMLWindow *window; +}; + struct HTMLWindow { DispatchEx dispex; const IHTMLWindow2Vtbl *lpHTMLWindow2Vtbl; @@ -194,6 +203,7 @@ struct HTMLWindow { struct list script_hosts; HTMLOptionElementFactory *option_factory; + HTMLLocation *location; global_prop_t *global_props; DWORD global_prop_cnt; @@ -232,15 +242,6 @@ struct ConnectionPoint { ConnectionPoint *next; }; -struct HTMLLocation { - DispatchEx dispex; - const IHTMLLocationVtbl *lpHTMLLocationVtbl; - - LONG ref; - - HTMLDocument *doc; -}; - struct HTMLDocument { DispatchEx dispex; const IHTMLDocument2Vtbl *lpHTMLDocument2Vtbl; @@ -307,8 +308,6 @@ struct HTMLDocument { ConnectionPoint cp_htmldocevents2; ConnectionPoint cp_propnotif; - HTMLLocation *location; - struct list selection_list; struct list range_list; @@ -514,7 +513,7 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument*,HTMLDocument**); HRESULT HTMLWindow_Create(HTMLDocument*,nsIDOMWindow*,HTMLWindow**); HTMLWindow *nswindow_to_window(const nsIDOMWindow*); HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLWindow*); -HTMLLocation *HTMLLocation_Create(HTMLDocument*); +HRESULT HTMLLocation_Create(HTMLWindow*,HTMLLocation**); IOmNavigator *OmNavigator_Create(void); void HTMLDocument_HTMLDocument3_Init(HTMLDocument*);
1
0
0
0
Jacek Caban : mshtml: Moved option_factory to HTMLWindow object.
by Alexandre Julliard
17 Sep '09
17 Sep '09
Module: wine Branch: master Commit: c9f6aaa2f72dab8d6053c562233a265ae334ab10 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c9f6aaa2f72dab8d6053c5622…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Sep 16 22:05:24 2009 +0200 mshtml: Moved option_factory to HTMLWindow object. --- dlls/mshtml/htmldoc.c | 5 ----- dlls/mshtml/htmloption.c | 10 +++++----- dlls/mshtml/htmlwindow.c | 11 ++++++++--- dlls/mshtml/mshtml_private.h | 27 +++++++++++++++------------ 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 8b810fc..1c35b4b 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -196,11 +196,6 @@ static ULONG WINAPI HTMLDocument_Release(IHTMLDocument2 *iface) if(This->hwnd) DestroyWindow(This->hwnd); - if(This->option_factory) { - This->option_factory->doc = NULL; - IHTMLOptionElementFactory_Release(HTMLOPTFACTORY(This->option_factory)); - } - if(This->location) This->location->doc = NULL; diff --git a/dlls/mshtml/htmloption.c b/dlls/mshtml/htmloption.c index 49d8deb..0bc9f2c 100644 --- a/dlls/mshtml/htmloption.c +++ b/dlls/mshtml/htmloption.c @@ -459,7 +459,7 @@ static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory TRACE("(%p)->(%s %s %s %s %p)\n", This, debugstr_variant(&text), debugstr_variant(&value), debugstr_variant(&defaultselected), debugstr_variant(&selected), optelem); - if(!This->doc->nsdoc) { + if(!This->window || !This->window->doc || !This->window->doc->nsdoc) { WARN("NULL nsdoc\n"); return E_UNEXPECTED; } @@ -467,14 +467,14 @@ static HRESULT WINAPI HTMLOptionElementFactory_create(IHTMLOptionElementFactory *optelem = NULL; nsAString_Init(&option_str, optionW); - nsres = nsIDOMHTMLDocument_CreateElement(This->doc->nsdoc, &option_str, &nselem); + nsres = nsIDOMHTMLDocument_CreateElement(This->window->doc->nsdoc, &option_str, &nselem); nsAString_Finish(&option_str); if(NS_FAILED(nsres)) { ERR("CreateElement failed: %08x\n", nsres); return E_FAIL; } - hres = IHTMLDOMNode_QueryInterface(HTMLDOMNODE(get_node(This->doc, (nsIDOMNode*)nselem, TRUE)), + hres = IHTMLDOMNode_QueryInterface(HTMLDOMNODE(get_node(This->window->doc, (nsIDOMNode*)nselem, TRUE)), &IID_IHTMLOptionElement, (void**)optelem); nsIDOMElement_Release(nselem); @@ -509,7 +509,7 @@ static const IHTMLOptionElementFactoryVtbl HTMLOptionElementFactoryVtbl = { HTMLOptionElementFactory_create }; -HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLDocument *doc) +HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLWindow *window) { HTMLOptionElementFactory *ret; @@ -517,7 +517,7 @@ HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLDocument *doc) ret->lpHTMLOptionElementFactoryVtbl = &HTMLOptionElementFactoryVtbl; ret->ref = 1; - ret->doc = doc; + ret->window = window; return ret; } diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index f268a0a..60a46a1 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -95,6 +95,11 @@ static ULONG WINAPI HTMLWindow2_Release(IHTMLWindow2 *iface) if(!ref) { DWORD i; + if(This->option_factory) { + This->option_factory->window = NULL; + IHTMLOptionElementFactory_Release(HTMLOPTFACTORY(This->option_factory)); + } + if(This->event_target) release_event_target(This->event_target); for(i=0; i < This->global_prop_cnt; i++) @@ -672,10 +677,10 @@ static HRESULT WINAPI HTMLWindow2_get_Option(IHTMLWindow2 *iface, IHTMLOptionEle TRACE("(%p)->(%p)\n", This, p); - if(!This->doc->option_factory) - This->doc->option_factory = HTMLOptionElementFactory_Create(This->doc); + if(!This->option_factory) + This->option_factory = HTMLOptionElementFactory_Create(This); - *p = HTMLOPTFACTORY(This->doc->option_factory); + *p = HTMLOPTFACTORY(This->option_factory); IHTMLOptionElementFactory_AddRef(*p); return S_OK; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 2aedc98..f5cb291 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -1,5 +1,5 @@ /* - * Copyright 2005-2008 Jacek Caban for CodeWeavers + * Copyright 2005-2009 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -153,6 +153,8 @@ void release_dispex(DispatchEx*); BOOL dispex_query_interface(DispatchEx*,REFIID,void**); HRESULT dispex_get_dprop_ref(DispatchEx*,const WCHAR*,BOOL,VARIANT**); +typedef struct HTMLWindow HTMLWindow; + typedef enum { SCRIPTMODE_GECKO, SCRIPTMODE_ACTIVESCRIPT @@ -167,6 +169,14 @@ typedef struct { } global_prop_t; typedef struct { + const IHTMLOptionElementFactoryVtbl *lpHTMLOptionElementFactoryVtbl; + + LONG ref; + + HTMLWindow *window; +} HTMLOptionElementFactory; + +struct HTMLWindow { DispatchEx dispex; const IHTMLWindow2Vtbl *lpHTMLWindow2Vtbl; const IHTMLWindow3Vtbl *lpHTMLWindow3Vtbl; @@ -183,12 +193,14 @@ typedef struct { SCRIPTMODE scriptmode; struct list script_hosts; + HTMLOptionElementFactory *option_factory; + global_prop_t *global_props; DWORD global_prop_cnt; DWORD global_prop_size; struct list entry; -} HTMLWindow; +}; typedef enum { UNKNOWN_USERMODE, @@ -229,14 +241,6 @@ struct HTMLLocation { HTMLDocument *doc; }; -typedef struct { - const IHTMLOptionElementFactoryVtbl *lpHTMLOptionElementFactoryVtbl; - - LONG ref; - - HTMLDocument *doc; -} HTMLOptionElementFactory; - struct HTMLDocument { DispatchEx dispex; const IHTMLDocument2Vtbl *lpHTMLDocument2Vtbl; @@ -303,7 +307,6 @@ struct HTMLDocument { ConnectionPoint cp_htmldocevents2; ConnectionPoint cp_propnotif; - HTMLOptionElementFactory *option_factory; HTMLLocation *location; struct list selection_list; @@ -510,7 +513,7 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument*,HTMLDocument**); HRESULT HTMLWindow_Create(HTMLDocument*,nsIDOMWindow*,HTMLWindow**); HTMLWindow *nswindow_to_window(const nsIDOMWindow*); -HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLDocument*); +HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLWindow*); HTMLLocation *HTMLLocation_Create(HTMLDocument*); IOmNavigator *OmNavigator_Create(void);
1
0
0
0
Erich Hoover : winealsa.drv: Fix DSOUND_BufPtrDiff in Kane' s Wrath with new audio pathway.
by Alexandre Julliard
16 Sep '09
16 Sep '09
Module: wine Branch: master Commit: 336b0ef18f832aee8766374e636fd3d43b2fd1f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=336b0ef18f832aee8766374e6…
Author: Erich Hoover <ehoover(a)mines.edu> Date: Sat Sep 12 23:23:49 2009 -0600 winealsa.drv: Fix DSOUND_BufPtrDiff in Kane's Wrath with new audio pathway. --- dlls/winealsa.drv/dsoutput.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/winealsa.drv/dsoutput.c b/dlls/winealsa.drv/dsoutput.c index 6d0df21..9d63475 100644 --- a/dlls/winealsa.drv/dsoutput.c +++ b/dlls/winealsa.drv/dsoutput.c @@ -247,6 +247,7 @@ static int DSDB_CreateMMAP(IDsDriverBufferImpl* pdbi) return DSERR_OUTOFMEMORY; snd_pcm_format_set_silence(format, buf, pdbi->mmap_buflen_frames); + pdbi->mmap_pos = 0; } else {
1
0
0
0
Vincent Povirk : oleaut32: Use DISPATCH_HREF_MASK even for non-dual dispatch types.
by Alexandre Julliard
16 Sep '09
16 Sep '09
Module: wine Branch: master Commit: 03683b25309a0da31ef26b62e5d4ed26eae820ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=03683b25309a0da31ef26b62e…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Sep 16 14:05:39 2009 -0500 oleaut32: Use DISPATCH_HREF_MASK even for non-dual dispatch types. --- dlls/oleaut32/tests/typelib.c | 2 +- dlls/oleaut32/typelib.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index e447440..1fdd458 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -923,7 +923,7 @@ if(use_midl_tlb) { href = U(pFD->lprgelemdescParam[0].tdesc).hreftype; ok((href & 0xff000000) == 0x04000000, "href 0x%08x\n", href); hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); - todo_wine ok(SUCCEEDED(hr), "hr %08x\n", hr); + ok(SUCCEEDED(hr), "hr %08x\n", hr); if (SUCCEEDED(hr)) ITypeInfo_Release(pTI_p); ITypeInfo_ReleaseFuncDesc(pTI, pFD); } diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 1484a00..8fe6ce9 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -6722,8 +6722,7 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo( result = S_OK; } else if ((hRefType != -1) && (hRefType & DISPATCH_HREF_MASK) && - (This->TypeAttr.typekind == TKIND_DISPATCH) && - (This->TypeAttr.wTypeFlags & TYPEFLAG_FDUAL)) + (This->TypeAttr.typekind == TKIND_DISPATCH)) { HREFTYPE href_dispatch = hRefType; result = ITypeInfoImpl_GetDispatchRefTypeInfo((ITypeInfo *)iface, &href_dispatch, ppTInfo);
1
0
0
0
Vincent Povirk : oleaut32: Add test for HREFTYPE's from inherited methods.
by Alexandre Julliard
16 Sep '09
16 Sep '09
Module: wine Branch: master Commit: 004ad9af10ce1b9f03237f1bb6f529389d5bb632 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=004ad9af10ce1b9f03237f1bb…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Wed Sep 16 11:23:47 2009 -0500 oleaut32: Add test for HREFTYPE's from inherited methods. --- dlls/oleaut32/tests/tmarshal.idl | 2 +- dlls/oleaut32/tests/typelib.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.idl b/dlls/oleaut32/tests/tmarshal.idl index f9b18b8..71d53cf 100644 --- a/dlls/oleaut32/tests/tmarshal.idl +++ b/dlls/oleaut32/tests/tmarshal.idl @@ -285,7 +285,7 @@ library TestTypelib ] interface ItestIF7 : ItestIF6 { - [id(0x1236)] HRESULT fn6([in] int a); + [id(0x1236)] HRESULT fn6([in] GUID a); } [ diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 9834d10..e447440 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -915,6 +915,16 @@ if(use_midl_tlb) { ok(hr == S_OK, "hr %08x\n", hr); ok(pFD->memid == 0x1236, "memid %08x\n", pFD->memid); ok(pFD->oVft == 9 * sizeof(void *), "oVft %d\n", pFD->oVft); + + /* first argument to 10th function is an HREFTYPE from the impl type */ + ok(pFD->cParams == 1, "cParams %i\n", pFD->cParams); + ok(pFD->lprgelemdescParam[0].tdesc.vt == VT_USERDEFINED, + "vt 0x%x\n", pFD->lprgelemdescParam[0].tdesc.vt); + href = U(pFD->lprgelemdescParam[0].tdesc).hreftype; + ok((href & 0xff000000) == 0x04000000, "href 0x%08x\n", href); + hr = ITypeInfo_GetRefTypeInfo(pTI, href, &pTI_p); + todo_wine ok(SUCCEEDED(hr), "hr %08x\n", hr); + if (SUCCEEDED(hr)) ITypeInfo_Release(pTI_p); ITypeInfo_ReleaseFuncDesc(pTI, pFD); } ITypeInfo_Release(pTI);
1
0
0
0
Huw Davies : winetest: Add the ability to retrieve the dll path for com dlls from the registry.
by Alexandre Julliard
16 Sep '09
16 Sep '09
Module: wine Branch: master Commit: 8b8af9c878ea8e46026787107e8af86482600544 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b8af9c878ea8e46026787107…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Sep 14 14:10:32 2009 +0100 winetest: Add the ability to retrieve the dll path for com dlls from the registry. --- programs/winetest/main.c | 87 ++++++++++++++++++++++++++++++++++++++------- 1 files changed, 73 insertions(+), 14 deletions(-) diff --git a/programs/winetest/main.c b/programs/winetest/main.c index 7564748..10804a6 100644 --- a/programs/winetest/main.c +++ b/programs/winetest/main.c @@ -544,6 +544,68 @@ EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType, return TRUE; } +static const struct clsid_mapping +{ + const char *name; + CLSID clsid; +} clsid_list[] = +{ + {"oledb32", {0xc8b522d1, 0x5cf3, 0x11ce, {0xad, 0xe5, 0x00, 0xaa, 0x00, 0x44, 0x77, 0x3d}}}, + {NULL, {0, 0, 0, {0,0,0,0,0,0,0,0}}} +}; + + +static BOOL get_main_clsid(const char *name, CLSID *clsid) +{ + const struct clsid_mapping *mapping; + + for(mapping = clsid_list; mapping->name; mapping++) + { + if(!strcasecmp(name, mapping->name)) + { + *clsid = mapping->clsid; + return TRUE; + } + } + return FALSE; +} + +static HMODULE load_com_dll(const char *name) +{ + HMODULE dll = NULL; + HKEY hkey; + char keyname[100]; + char dllname[MAX_PATH]; + CLSID clsid; + + if(!get_main_clsid(name, &clsid)) return NULL; + + sprintf(keyname, "CLSID\\{%08x-%04x-%04x-%02x%2x-%02x%2x%02x%2x%02x%2x}\\InprocServer32", + clsid.Data1, clsid.Data2, clsid.Data3, clsid.Data4[0], clsid.Data4[1], + clsid.Data4[2], clsid.Data4[3], clsid.Data4[4], clsid.Data4[5], + clsid.Data4[6], clsid.Data4[7]); + + if(RegOpenKeyA(HKEY_CLASSES_ROOT, keyname, &hkey) == ERROR_SUCCESS) + { + LONG size = sizeof(dllname); + if(RegQueryValueA(hkey, NULL, dllname, &size) == ERROR_SUCCESS) + dll = LoadLibraryExA(dllname, NULL, LOAD_LIBRARY_AS_DATAFILE); + RegCloseKey(hkey); + } + + return dll; +} + +static void get_dll_path(HMODULE dll, char **path, char *filename) +{ + char dllpath[MAX_PATH]; + + GetModuleFileNameA(dll, dllpath, MAX_PATH); + strcpy(filename, dllpath); + *strrchr(dllpath, '\\') = '\0'; + *path = heap_strdup( dllpath ); +} + static BOOL CALLBACK extract_test_proc (HMODULE hModule, LPCTSTR lpszType, LPTSTR lpszName, LONG_PTR lParam) @@ -565,27 +627,24 @@ extract_test_proc (HMODULE hModule, LPCTSTR lpszType, wine_tests[nr_of_files].maindllpath = NULL; strcpy(filename, dllname); dll = LoadLibraryExA(dllname, NULL, LOAD_LIBRARY_AS_DATAFILE); + + if(!dll) + { + dll = load_com_dll(dllname); + if(dll) get_dll_path(dll, &wine_tests[nr_of_files].maindllpath, filename); + } + if (!dll && pLoadLibraryShim) { MultiByteToWideChar(CP_ACP, 0, dllname, -1, dllnameW, MAX_PATH); if (FAILED( pLoadLibraryShim(dllnameW, NULL, NULL, &dll) )) dll = 0; else - { - char dllpath[MAX_PATH]; - - /* We have a dll that cannot be found through LoadLibraryExA. This - * is the case for .NET provided dll's. We will add the directory - * where the dll resides to the PATH variable when dealing with - * the tests for this dll. - */ - GetModuleFileNameA(dll, dllpath, MAX_PATH); - strcpy(filename, dllpath); - *strrchr(dllpath, '\\') = '\0'; - wine_tests[nr_of_files].maindllpath = heap_strdup( dllpath ); - } + get_dll_path(dll, &wine_tests[nr_of_files].maindllpath, filename); } - if (!dll) { + + if (!dll) + { xprintf (" %s=dll is missing\n", dllname); return TRUE; }
1
0
0
0
Jörg Höhle : winecoreaudio: Added WAVEFORMATEXTENSIBLE support, for PCM only.
by Alexandre Julliard
16 Sep '09
16 Sep '09
Module: wine Branch: master Commit: c5b2acfb0400cf91af7c9c81ad4e12a4ee07c600 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c5b2acfb0400cf91af7c9c81a…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Fri Sep 11 08:12:53 2009 +0200 winecoreaudio: Added WAVEFORMATEXTENSIBLE support, for PCM only. --- dlls/winecoreaudio.drv/audio.c | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-) diff --git a/dlls/winecoreaudio.drv/audio.c b/dlls/winecoreaudio.drv/audio.c index 2873b38..7f7c1ee 100644 --- a/dlls/winecoreaudio.drv/audio.c +++ b/dlls/winecoreaudio.drv/audio.c @@ -40,8 +40,12 @@ #include "wingdi.h" #include "winerror.h" #include "mmddk.h" +#include "mmreg.h" #include "dsound.h" #include "dsdriver.h" +#include "ks.h" +#include "ksguid.h" +#include "ksmedia.h" #include "coreaudio.h" #include "wine/unicode.h" #include "wine/library.h" @@ -441,12 +445,34 @@ static BOOL supportedFormat(LPWAVEFORMATEX wf) if (wf->wBitsPerSample==8||wf->wBitsPerSample==16) return TRUE; } + } else if (wf->wFormatTag == WAVE_FORMAT_EXTENSIBLE) { + WAVEFORMATEXTENSIBLE * wfex = (WAVEFORMATEXTENSIBLE *)wf; + + if (wf->cbSize == 22 && IsEqualGUID(&wfex->SubFormat, &KSDATAFORMAT_SUBTYPE_PCM)) { + if (wf->nChannels >=1 && wf->nChannels <= 2) { + if (wf->wBitsPerSample==wfex->Samples.wValidBitsPerSample) { + if (wf->wBitsPerSample==8||wf->wBitsPerSample==16) + return TRUE; + } else + WARN("wBitsPerSample != wValidBitsPerSample not supported yet\n"); + } + } else + WARN("only KSDATAFORMAT_SUBTYPE_PCM supported\n"); } else WARN("only WAVE_FORMAT_PCM supported\n"); return FALSE; } +void copyFormat(LPWAVEFORMATEX wf1, LPPCMWAVEFORMAT wf2) +{ + memcpy(wf2, wf1, sizeof(PCMWAVEFORMAT)); + /* Downgrade WAVE_FORMAT_EXTENSIBLE KSDATAFORMAT_SUBTYPE_PCM + * to smaller yet compatible WAVE_FORMAT_PCM structure */ + if (wf2->wf.wFormatTag == WAVE_FORMAT_EXTENSIBLE) + wf2->wf.wFormatTag = WAVE_FORMAT_PCM; +} + /************************************************************************** * CoreAudio_GetDevCaps [internal] */ @@ -915,7 +941,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) wwo->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); wwo->waveDesc = *lpDesc; - memcpy(&wwo->format, lpDesc->lpFormat, sizeof(PCMWAVEFORMAT)); + copyFormat(lpDesc->lpFormat, &wwo->format); wwo->dwPlayedTotal = 0; wwo->dwWrittenTotal = 0; @@ -1941,7 +1967,7 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) wwi->wFlags = HIWORD(dwFlags & CALLBACK_TYPEMASK); wwi->waveDesc = *lpDesc; - memcpy(&wwi->format, lpDesc->lpFormat, sizeof(PCMWAVEFORMAT)); + copyFormat(lpDesc->lpFormat, &wwi->format); wwi->dwTotalRecorded = 0;
1
0
0
0
Jörg Höhle : winecoreaudio: Enforce invariant about BlockAlign and nAvgBytesPerSec.
by Alexandre Julliard
16 Sep '09
16 Sep '09
Module: wine Branch: master Commit: e6770a40118349e8d33e52a54af3602e9af76ac3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6770a40118349e8d33e52a54…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Fri Sep 11 07:46:43 2009 +0200 winecoreaudio: Enforce invariant about BlockAlign and nAvgBytesPerSec. --- dlls/winecoreaudio.drv/audio.c | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/dlls/winecoreaudio.drv/audio.c b/dlls/winecoreaudio.drv/audio.c index 8c42815..2873b38 100644 --- a/dlls/winecoreaudio.drv/audio.c +++ b/dlls/winecoreaudio.drv/audio.c @@ -825,6 +825,16 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) return MMSYSERR_NOERROR; } + /* nBlockAlign and nAvgBytesPerSec are output variables for dsound */ + if (lpDesc->lpFormat->nBlockAlign != lpDesc->lpFormat->nChannels*lpDesc->lpFormat->wBitsPerSample/8) { + lpDesc->lpFormat->nBlockAlign = lpDesc->lpFormat->nChannels*lpDesc->lpFormat->wBitsPerSample/8; + WARN("Fixing nBlockAlign\n"); + } + if (lpDesc->lpFormat->nAvgBytesPerSec!= lpDesc->lpFormat->nSamplesPerSec*lpDesc->lpFormat->nBlockAlign) { + lpDesc->lpFormat->nAvgBytesPerSec = lpDesc->lpFormat->nSamplesPerSec*lpDesc->lpFormat->nBlockAlign; + WARN("Fixing nAvgBytesPerSec\n"); + } + /* We proceed in three phases: * o Reserve the device for us, marking it as unavailable (not closed) * o Create, configure, and start the Audio Unit. To avoid deadlock, @@ -1907,6 +1917,16 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) return MMSYSERR_NOERROR; } + /* nBlockAlign and nAvgBytesPerSec are output variables for dsound */ + if (lpDesc->lpFormat->nBlockAlign != lpDesc->lpFormat->nChannels*lpDesc->lpFormat->wBitsPerSample/8) { + lpDesc->lpFormat->nBlockAlign = lpDesc->lpFormat->nChannels*lpDesc->lpFormat->wBitsPerSample/8; + WARN("Fixing nBlockAlign\n"); + } + if (lpDesc->lpFormat->nAvgBytesPerSec!= lpDesc->lpFormat->nSamplesPerSec*lpDesc->lpFormat->nBlockAlign) { + lpDesc->lpFormat->nAvgBytesPerSec = lpDesc->lpFormat->nSamplesPerSec*lpDesc->lpFormat->nBlockAlign; + WARN("Fixing nAvgBytesPerSec\n"); + } + wwi = &WInDev[wDevID]; if (!OSSpinLockTry(&wwi->lock)) return MMSYSERR_ALLOCATED;
1
0
0
0
Jörg Höhle : winecoreaudio: Make supported format test more restrictive.
by Alexandre Julliard
16 Sep '09
16 Sep '09
Module: wine Branch: master Commit: 89fe38ca9e917fb8c4b12f5a725cf86e78c5347c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89fe38ca9e917fb8c4b12f5a7…
Author: Jörg Höhle <hoehle(a)users.sourceforge.net> Date: Fri Sep 11 07:43:45 2009 +0200 winecoreaudio: Make supported format test more restrictive. --- dlls/winecoreaudio.drv/audio.c | 42 +++++++++++++++++---------------------- 1 files changed, 18 insertions(+), 24 deletions(-) diff --git a/dlls/winecoreaudio.drv/audio.c b/dlls/winecoreaudio.drv/audio.c index 10b66d0..8c42815 100644 --- a/dlls/winecoreaudio.drv/audio.c +++ b/dlls/winecoreaudio.drv/audio.c @@ -431,6 +431,22 @@ static DWORD bytes_to_mmtime(LPMMTIME lpTime, DWORD position, return MMSYSERR_NOERROR; } +static BOOL supportedFormat(LPWAVEFORMATEX wf) +{ + if (wf->nSamplesPerSec == 0) + return FALSE; + + if (wf->wFormatTag == WAVE_FORMAT_PCM) { + if (wf->nChannels >= 1 && wf->nChannels <= 2) { + if (wf->wBitsPerSample==8||wf->wBitsPerSample==16) + return TRUE; + } + } else + WARN("only WAVE_FORMAT_PCM supported\n"); + + return FALSE; +} + /************************************************************************** * CoreAudio_GetDevCaps [internal] */ @@ -793,10 +809,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels, lpDesc->lpFormat->nSamplesPerSec, lpDesc->lpFormat->wBitsPerSample); - if (lpDesc->lpFormat->wFormatTag != WAVE_FORMAT_PCM || - lpDesc->lpFormat->nChannels == 0 || - lpDesc->lpFormat->nSamplesPerSec == 0 - ) + if (!supportedFormat(lpDesc->lpFormat)) { WARN("Bad format: tag=%04X nChannels=%d nSamplesPerSec=%d wBitsPerSample=%d !\n", lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels, @@ -893,14 +906,6 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) wwo->waveDesc = *lpDesc; memcpy(&wwo->format, lpDesc->lpFormat, sizeof(PCMWAVEFORMAT)); - - if (wwo->format.wBitsPerSample == 0) { - WARN("Resetting zeroed wBitsPerSample\n"); - wwo->format.wBitsPerSample = 8 * - (wwo->format.wf.nAvgBytesPerSec / - wwo->format.wf.nSamplesPerSec) / - wwo->format.wf.nChannels; - } wwo->dwPlayedTotal = 0; wwo->dwWrittenTotal = 0; @@ -1884,9 +1889,7 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) lpDesc->lpFormat->wFormatTag, lpDesc->lpFormat->nChannels, lpDesc->lpFormat->nSamplesPerSec, lpDesc->lpFormat->wBitsPerSample); - if (lpDesc->lpFormat->wFormatTag != WAVE_FORMAT_PCM || - lpDesc->lpFormat->nChannels == 0 || - lpDesc->lpFormat->nSamplesPerSec == 0 || + if (!supportedFormat(lpDesc->lpFormat) || lpDesc->lpFormat->nSamplesPerSec != AudioUnit_GetInputDeviceSampleRate() ) { @@ -1920,15 +1923,6 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags) wwi->waveDesc = *lpDesc; memcpy(&wwi->format, lpDesc->lpFormat, sizeof(PCMWAVEFORMAT)); - if (wwi->format.wBitsPerSample == 0) - { - WARN("Resetting zeroed wBitsPerSample\n"); - wwi->format.wBitsPerSample = 8 * - (wwi->format.wf.nAvgBytesPerSec / - wwi->format.wf.nSamplesPerSec) / - wwi->format.wf.nChannels; - } - wwi->dwTotalRecorded = 0; wwi->trace_on = TRACE_ON(wave);
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
87
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
Results per page:
10
25
50
100
200