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
May 2011
----- 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
945 discussions
Start a n
N
ew thread
Andrew Nguyen : d3d9: Drop a superfluous cast in IDirect3DDevice9Impl_CreateOffscreenPlainSurface .
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: c4a6c253787c1c1e4d680cc806b6f87c3224a2bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c4a6c253787c1c1e4d680cc80…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue May 31 05:56:33 2011 -0500 d3d9: Drop a superfluous cast in IDirect3DDevice9Impl_CreateOffscreenPlainSurface. --- dlls/d3d9/device.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 2af2c82..a95fa16 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1130,7 +1130,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateOffscreenPlainSurface(IDirect */ hr = IDirect3DDevice9Impl_CreateSurface(This, Width, Height, Format, TRUE /* Lockable */, FALSE /* Discard */, 0 /* Level */, ppSurface, 0 /* Usage (undefined/none) */, - (WINED3DPOOL)Pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */); + Pool, D3DMULTISAMPLE_NONE, 0 /* MultisampleQuality */); return hr; }
1
0
0
0
Andrew Nguyen : d3d9/tests: Avoid a shift overflow in render_state_test_data_init.
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: 14e199ff6b9e4845396bf43671273fbc8ad7722d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14e199ff6b9e4845396bf4367…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue May 31 05:56:18 2011 -0500 d3d9/tests: Avoid a shift overflow in render_state_test_data_init. --- dlls/d3d9/tests/stateblock.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3d9/tests/stateblock.c b/dlls/d3d9/tests/stateblock.c index 8b7a0ba..e33c7b4 100644 --- a/dlls/d3d9/tests/stateblock.c +++ b/dlls/d3d9/tests/stateblock.c @@ -1462,7 +1462,7 @@ static void render_state_test_data_init(struct render_state_data *data) data->states[idx++] = TRUE; /* ALPHABLENDENABLE */ data->states[idx++] = TRUE; /* FOGENABLE */ data->states[idx++] = TRUE; /* SPECULARENABLE */ - data->states[idx++] = 255 << 31; /* FOGCOLOR */ + data->states[idx++] = 1 << 31; /* FOGCOLOR */ data->states[idx++] = D3DFOG_EXP; /* FOGTABLEMODE */ data->states[idx++] = to_dword(0.1f); /* FOGSTART */ data->states[idx++] = to_dword(0.8f); /* FOGEND */
1
0
0
0
Andrew Nguyen : d3d8/tests: Avoid a shift overflow in render_state_test_data_init.
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: eef74e5e4b96a727383d6ba160d141ea5643a868 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eef74e5e4b96a727383d6ba16…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue May 31 05:56:11 2011 -0500 d3d8/tests: Avoid a shift overflow in render_state_test_data_init. --- dlls/d3d8/tests/stateblock.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/d3d8/tests/stateblock.c b/dlls/d3d8/tests/stateblock.c index fa7d268..a0fc4ba 100644 --- a/dlls/d3d8/tests/stateblock.c +++ b/dlls/d3d8/tests/stateblock.c @@ -1346,7 +1346,7 @@ static void render_state_test_data_init(struct render_state_data *data) data->states[idx++] = TRUE; /* ALPHABLENDENABLE */ data->states[idx++] = TRUE; /* FOGENABLE */ data->states[idx++] = TRUE; /* SPECULARENABLE */ - data->states[idx++] = 255 << 31; /* FOGCOLOR */ + data->states[idx++] = 1 << 31; /* FOGCOLOR */ data->states[idx++] = D3DFOG_EXP; /* FOGTABLEMODE */ data->states[idx++] = to_dword(0.1f); /* FOGSTART */ data->states[idx++] = to_dword(0.8f); /* FOGEND */
1
0
0
0
Andrew Nguyen : ddraw: Remove some unused structure definitions in the private ddraw header.
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: be17277bb7023f403deefc9741e7ffdea9013f24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=be17277bb7023f403deefc974…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue May 31 05:50:02 2011 -0500 ddraw: Remove some unused structure definitions in the private ddraw header. --- dlls/ddraw/ddraw_private.h | 30 ------------------------------ 1 files changed, 0 insertions(+), 30 deletions(-) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index aa50feb..e88dda0 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -135,21 +135,6 @@ struct IDirectDrawImpl HRESULT ddraw_init(IDirectDrawImpl *ddraw, WINED3DDEVTYPE device_type) DECLSPEC_HIDDEN; -/* Helper structures */ -typedef struct EnumDisplayModesCBS -{ - void *context; - LPDDENUMMODESCALLBACK2 callback; -} EnumDisplayModesCBS; - -typedef struct EnumSurfacesCBS -{ - void *context; - LPDDENUMSURFACESCALLBACK7 callback; - LPDDSURFACEDESC2 pDDSD; - DWORD Flags; -} EnumSurfacesCBS; - /* Utility functions */ void DDRAW_Convert_DDSCAPS_1_To_2(const DDSCAPS *pIn, DDSCAPS2 *pOut) DECLSPEC_HIDDEN; void DDRAW_Convert_DDDEVICEIDENTIFIER_2_To_1(const DDDEVICEIDENTIFIER2 *pIn, DDDEVICEIDENTIFIER *pOut) DECLSPEC_HIDDEN; @@ -341,21 +326,6 @@ static inline IDirect3DDeviceImpl *device_from_device3(IDirect3DDevice3 *iface) return (IDirect3DDeviceImpl *)((char*)iface - FIELD_OFFSET(IDirect3DDeviceImpl, IDirect3DDevice3_vtbl)); } -/* Structures */ -struct EnumTextureFormatsCBS -{ - LPD3DENUMTEXTUREFORMATSCALLBACK cbv2; - LPD3DENUMPIXELFORMATSCALLBACK cbv7; - void *Context; -}; - -/* Structure for EnumZBufferFormats */ -struct EnumZBufferFormatsData -{ - LPD3DENUMPIXELFORMATSCALLBACK Callback; - void *Context; -}; - /***************************************************************************** * IDirectDrawClipper implementation structure *****************************************************************************/
1
0
0
0
Andrew Nguyen : ddraw: Add a NULL callback pointer check in the EnumDevices implementations.
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: cf6d56a43a18ac9ee9d3a56027cc6d3a88aaed05 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf6d56a43a18ac9ee9d3a5602…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue May 31 05:49:57 2011 -0500 ddraw: Add a NULL callback pointer check in the EnumDevices implementations. --- dlls/ddraw/ddraw.c | 6 ++++++ dlls/ddraw/tests/d3d.c | 12 ++++++++++++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index cac05d3..c2101b9 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -4234,6 +4234,9 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA TRACE("iface %p, callback %p, context %p.\n", iface, callback, context); + if (!callback) + return DDERR_INVALIDPARAMS; + EnterCriticalSection(&ddraw_cs); hr = IDirect3DImpl_GetCaps(This->wineD3D, &device_desc1, &device_desc7); @@ -4291,6 +4294,9 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA TRACE("iface %p, callback %p, context %p.\n", iface, callback, context); + if (!callback) + return DDERR_INVALIDPARAMS; + EnterCriticalSection(&ddraw_cs); hr = IDirect3DImpl_GetCaps(This->wineD3D, &device_desc1, &device_desc7); diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 00c6d2a..4dc2a20 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -865,8 +865,12 @@ static HRESULT WINAPI enumDevicesCallbackTest7(LPSTR DeviceDescription, LPSTR De IDirect3D7_EnumDevices. */ static void D3D7EnumTest(void) { + HRESULT hr; D3D7ETest d3d7et; + hr = IDirect3D7_EnumDevices(lpD3D, NULL, NULL); + ok(hr == DDERR_INVALIDPARAMS, "IDirect3D7_EnumDevices returned 0x%08x\n", hr); + memset(&d3d7et, 0, sizeof(d3d7et)); IDirect3D7_EnumDevices(lpD3D, enumDevicesCallbackTest7, &d3d7et); @@ -892,6 +896,10 @@ static void CapsTest(void) ok(hr == DD_OK, "Cannot create a DirectDraw 1 interface, hr = %08x\n", hr); hr = IDirectDraw_QueryInterface(dd1, &IID_IDirect3D3, (void **) &d3d3); ok(hr == D3D_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + + hr = IDirect3D3_EnumDevices(d3d3, NULL, NULL); + ok(hr == DDERR_INVALIDPARAMS, "IDirect3D3_EnumDevices returned 0x%08x\n", hr); + ver = 3; IDirect3D3_EnumDevices(d3d3, enumDevicesCallback, &ver); @@ -902,6 +910,10 @@ static void CapsTest(void) ok(hr == DD_OK, "Cannot create a DirectDraw 1 interface, hr = %08x\n", hr); hr = IDirectDraw_QueryInterface(dd1, &IID_IDirect3D2, (void **) &d3d2); ok(hr == D3D_OK, "IDirectDraw_QueryInterface returned %08x\n", hr); + + hr = IDirect3D2_EnumDevices(d3d2, NULL, NULL); + ok(hr == DDERR_INVALIDPARAMS, "IDirect3D2_EnumDevices returned 0x%08x\n", hr); + ver = 2; IDirect3D2_EnumDevices(d3d2, enumDevicesCallback, &ver);
1
0
0
0
Andrew Nguyen : ddraw/tests: Remove a superfluous skip check.
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: 7cd97b2ed4ece15b4d3a347dcbd272757e8790e5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7cd97b2ed4ece15b4d3a347dc…
Author: Andrew Nguyen <anguyen(a)codeweavers.com> Date: Tue May 31 05:49:38 2011 -0500 ddraw/tests: Remove a superfluous skip check. --- dlls/ddraw/tests/d3d.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 9ac3ffa..00c6d2a 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -867,11 +867,6 @@ static void D3D7EnumTest(void) { D3D7ETest d3d7et; - if (!lpD3D) { - skip("No Direct3D7 interface.\n"); - return; - } - memset(&d3d7et, 0, sizeof(d3d7et)); IDirect3D7_EnumDevices(lpD3D, enumDevicesCallbackTest7, &d3d7et);
1
0
0
0
Jacek Caban : mshtml: Added IHTMLMimeTypesCollection:: get_length implementation.
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: 2f8da934c7577eb03ed5cb1d6642fa9dca6466a8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f8da934c7577eb03ed5cb1d6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 31 12:20:24 2011 +0200 mshtml: Added IHTMLMimeTypesCollection::get_length implementation. --- dlls/mshtml/omnavigator.c | 8 ++++++-- dlls/mshtml/tests/dom.c | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 92afc98..79db598 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -294,8 +294,12 @@ static HRESULT WINAPI HTMLMimeTypesCollection_Invoke(IHTMLMimeTypesCollection *i static HRESULT WINAPI HTMLMimeTypesCollection_get_length(IHTMLMimeTypesCollection *iface, LONG *p) { HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + /* This is just a stub for compatibility with other browser in IE */ + *p = 0; + return S_OK; } static const IHTMLMimeTypesCollectionVtbl HTMLMimeTypesCollectionVtbl = { diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 9712605..4329be3 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -3830,6 +3830,7 @@ static void test_plugins_col(IOmNavigator *nav) static void test_mime_types_col(IOmNavigator *nav) { IHTMLMimeTypesCollection *col, *col2; + LONG length; ULONG ref; HRESULT hres; @@ -3843,6 +3844,11 @@ static void test_mime_types_col(IOmNavigator *nav) test_disp((IUnknown*)col, &IID_IHTMLMimeTypesCollection, "[object]"); + length = 0xdeadbeef; + hres = IHTMLMimeTypesCollection_get_length(col, &length); + ok(hres == S_OK, "get_length failed: %08x\n", hres); + ok(!length, "length = %d\n", length); + ref = IHTMLMimeTypesCollection_Release(col); ok(!ref, "ref=%d\n", ref); }
1
0
0
0
Jacek Caban : mshtml: Added IDispatchEx support to HTMLMimeTypesCollection object.
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: 8fce028694d3b0b2ec18350ed5a975556103fae3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8fce028694d3b0b2ec18350ed…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 31 12:20:15 2011 +0200 mshtml: Added IDispatchEx support to HTMLMimeTypesCollection object. --- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/omnavigator.c | 32 ++++++++++++++++++++++++-------- dlls/mshtml/tests/dom.c | 21 +++++++++++++++++++++ 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 6fc78ec..275bd81 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -138,6 +138,7 @@ typedef struct event_target_t event_target_t; XIID(IHTMLImgElement) \ XIID(IHTMLInputElement) \ XIID(IHTMLLocation) \ + XIID(IHTMLMimeTypesCollection) \ XIID(IHTMLObjectElement) \ XIID(IHTMLOptionElement) \ XIID(IHTMLPluginsCollection) \ diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 611f07d..92afc98 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -199,6 +199,7 @@ static HRESULT create_plugins_collection(OmNavigator *navigator, HTMLPluginsColl } struct HTMLMimeTypesCollection { + DispatchEx dispex; IHTMLMimeTypesCollection IHTMLMimeTypesCollection_iface; LONG ref; @@ -221,6 +222,8 @@ static HRESULT WINAPI HTMLMimeTypesCollection_QueryInterface(IHTMLMimeTypesColle }else if(IsEqualGUID(&IID_IHTMLMimeTypesCollection, riid)) { TRACE("(%p)->(IID_IHTMLMimeTypesCollection %p)\n", This, ppv); *ppv = &This->IHTMLMimeTypesCollection_iface; + }else if(dispex_query_interface(&This->dispex, riid, ppv)) { + return *ppv ? S_OK : E_NOINTERFACE; }else { *ppv = NULL; WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); @@ -251,6 +254,7 @@ static ULONG WINAPI HTMLMimeTypesCollection_Release(IHTMLMimeTypesCollection *if if(!ref) { if(This->navigator) This->navigator->mime_types = NULL; + release_dispex(&This->dispex); heap_free(This); } @@ -260,24 +264,22 @@ static ULONG WINAPI HTMLMimeTypesCollection_Release(IHTMLMimeTypesCollection *if static HRESULT WINAPI HTMLMimeTypesCollection_GetTypeInfoCount(IHTMLMimeTypesCollection *iface, UINT *pctinfo) { HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); - FIXME("%p\n", This); - return E_NOTIMPL; + return IDispatchEx_GetTypeInfoCount(&This->dispex.IDispatchEx_iface, pctinfo); } static HRESULT WINAPI HTMLMimeTypesCollection_GetTypeInfo(IHTMLMimeTypesCollection *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); - FIXME("%p\n", This); - return E_NOTIMPL; + return IDispatchEx_GetTypeInfo(&This->dispex.IDispatchEx_iface, iTInfo, lcid, ppTInfo); } static HRESULT WINAPI HTMLMimeTypesCollection_GetIDsOfNames(IHTMLMimeTypesCollection *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); - FIXME("%p\n", This); - return E_NOTIMPL; + return IDispatchEx_GetIDsOfNames(&This->dispex.IDispatchEx_iface, riid, rgszNames, cNames, + lcid, rgDispId); } static HRESULT WINAPI HTMLMimeTypesCollection_Invoke(IHTMLMimeTypesCollection *iface, DISPID dispIdMember, @@ -285,8 +287,8 @@ static HRESULT WINAPI HTMLMimeTypesCollection_Invoke(IHTMLMimeTypesCollection *i EXCEPINFO *pExcepInfo, UINT *puArgErr) { HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); - FIXME("%p\n", This); - return E_NOTIMPL; + return IDispatchEx_Invoke(&This->dispex.IDispatchEx_iface, dispIdMember, riid, lcid, + wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); } static HRESULT WINAPI HTMLMimeTypesCollection_get_length(IHTMLMimeTypesCollection *iface, LONG *p) @@ -307,6 +309,17 @@ static const IHTMLMimeTypesCollectionVtbl HTMLMimeTypesCollectionVtbl = { HTMLMimeTypesCollection_get_length }; +static const tid_t HTMLMimeTypesCollection_iface_tids[] = { + IHTMLMimeTypesCollection_tid, + 0 +}; +static dispex_static_data_t HTMLMimeTypesCollection_dispex = { + NULL, + IHTMLMimeTypesCollection_tid, + NULL, + HTMLMimeTypesCollection_iface_tids +}; + static HRESULT create_mime_types_collection(OmNavigator *navigator, HTMLMimeTypesCollection **ret) { HTMLMimeTypesCollection *col; @@ -319,6 +332,9 @@ static HRESULT create_mime_types_collection(OmNavigator *navigator, HTMLMimeType col->ref = 1; col->navigator = navigator; + init_dispex(&col->dispex, (IUnknown*)&col->IHTMLMimeTypesCollection_iface, + &HTMLMimeTypesCollection_dispex); + *ret = col; return S_OK; } diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 03eb48a..9712605 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -3827,6 +3827,26 @@ static void test_plugins_col(IOmNavigator *nav) ok(!ref, "ref=%d\n", ref); } +static void test_mime_types_col(IOmNavigator *nav) +{ + IHTMLMimeTypesCollection *col, *col2; + ULONG ref; + HRESULT hres; + + hres = IOmNavigator_get_mimeTypes(nav, &col); + ok(hres == S_OK, "get_mimeTypes failed: %08x\n", hres); + + hres = IOmNavigator_get_mimeTypes(nav, &col2); + ok(hres == S_OK, "get_mimeTypes failed: %08x\n", hres); + ok(iface_cmp((IUnknown*)col, (IUnknown*)col2), "col != col2\n"); + IHTMLMimeTypesCollection_Release(col2); + + test_disp((IUnknown*)col, &IID_IHTMLMimeTypesCollection, "[object]"); + + ref = IHTMLMimeTypesCollection_Release(col); + ok(!ref, "ref=%d\n", ref); +} + static void test_navigator(IHTMLDocument2 *doc) { IHTMLWindow2 *window; @@ -3914,6 +3934,7 @@ static void test_navigator(IHTMLDocument2 *doc) } test_plugins_col(navigator); + test_mime_types_col(navigator); ref = IOmNavigator_Release(navigator); ok(!ref, "navigator should be destroyed here\n");
1
0
0
0
Jacek Caban : mshtml: Don' t release plugins collection in OmNavigator destructor since it contains a weak reference .
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: aa29f5e0f6d10ee8284019b82dedd5683feaeacf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa29f5e0f6d10ee8284019b82…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 31 12:19:55 2011 +0200 mshtml: Don't release plugins collection in OmNavigator destructor since it contains a weak reference. --- dlls/mshtml/omnavigator.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index 95e8930..611f07d 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -366,10 +366,8 @@ static ULONG WINAPI OmNavigator_Release(IOmNavigator *iface) TRACE("(%p) ref=%d\n", This, ref); if(!ref) { - if(This->plugins) { + if(This->plugins) This->plugins->navigator = NULL; - IHTMLPluginsCollection_Release(&This->plugins->IHTMLPluginsCollection_iface); - } if(This->mime_types) This->mime_types->navigator = NULL; release_dispex(&This->dispex);
1
0
0
0
Jacek Caban : mshtml: Added IOmNavigator::get_mimeTypes implementation.
by Alexandre Julliard
31 May '11
31 May '11
Module: wine Branch: master Commit: 9dcceab0618114f5c40332ed6bb32d6246b54d43 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9dcceab0618114f5c40332ed6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 31 12:19:40 2011 +0200 mshtml: Added IOmNavigator::get_mimeTypes implementation. --- dlls/mshtml/omnavigator.c | 146 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 144 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c index f5a3573..95e8930 100644 --- a/dlls/mshtml/omnavigator.c +++ b/dlls/mshtml/omnavigator.c @@ -32,6 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml); typedef struct HTMLPluginsCollection HTMLPluginsCollection; +typedef struct HTMLMimeTypesCollection HTMLMimeTypesCollection; typedef struct { DispatchEx dispex; @@ -40,6 +41,7 @@ typedef struct { LONG ref; HTMLPluginsCollection *plugins; + HTMLMimeTypesCollection *mime_types; } OmNavigator; static inline OmNavigator *impl_from_IOmNavigator(IOmNavigator *iface) @@ -196,6 +198,131 @@ static HRESULT create_plugins_collection(OmNavigator *navigator, HTMLPluginsColl return S_OK; } +struct HTMLMimeTypesCollection { + IHTMLMimeTypesCollection IHTMLMimeTypesCollection_iface; + + LONG ref; + + OmNavigator *navigator; +}; + +static inline HTMLMimeTypesCollection *impl_from_IHTMLMimeTypesCollection(IHTMLMimeTypesCollection *iface) +{ + return CONTAINING_RECORD(iface, HTMLMimeTypesCollection, IHTMLMimeTypesCollection_iface); +} + +static HRESULT WINAPI HTMLMimeTypesCollection_QueryInterface(IHTMLMimeTypesCollection *iface, REFIID riid, void **ppv) +{ + HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); + + if(IsEqualGUID(&IID_IUnknown, riid)) { + TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv); + *ppv = &This->IHTMLMimeTypesCollection_iface; + }else if(IsEqualGUID(&IID_IHTMLMimeTypesCollection, riid)) { + TRACE("(%p)->(IID_IHTMLMimeTypesCollection %p)\n", This, ppv); + *ppv = &This->IHTMLMimeTypesCollection_iface; + }else { + *ppv = NULL; + WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); + return E_NOINTERFACE; + } + + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; +} + +static ULONG WINAPI HTMLMimeTypesCollection_AddRef(IHTMLMimeTypesCollection *iface) +{ + HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); + LONG ref = InterlockedIncrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + return ref; +} + +static ULONG WINAPI HTMLMimeTypesCollection_Release(IHTMLMimeTypesCollection *iface) +{ + HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); + LONG ref = InterlockedDecrement(&This->ref); + + TRACE("(%p) ref=%d\n", This, ref); + + if(!ref) { + if(This->navigator) + This->navigator->mime_types = NULL; + heap_free(This); + } + + return ref; +} + +static HRESULT WINAPI HTMLMimeTypesCollection_GetTypeInfoCount(IHTMLMimeTypesCollection *iface, UINT *pctinfo) +{ + HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); + FIXME("%p\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLMimeTypesCollection_GetTypeInfo(IHTMLMimeTypesCollection *iface, UINT iTInfo, + LCID lcid, ITypeInfo **ppTInfo) +{ + HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); + FIXME("%p\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLMimeTypesCollection_GetIDsOfNames(IHTMLMimeTypesCollection *iface, REFIID riid, + LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) +{ + HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); + FIXME("%p\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLMimeTypesCollection_Invoke(IHTMLMimeTypesCollection *iface, DISPID dispIdMember, + REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, + EXCEPINFO *pExcepInfo, UINT *puArgErr) +{ + HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); + FIXME("%p\n", This); + return E_NOTIMPL; +} + +static HRESULT WINAPI HTMLMimeTypesCollection_get_length(IHTMLMimeTypesCollection *iface, LONG *p) +{ + HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface); + FIXME("(%p)->(%p)\n", This, p); + return E_NOTIMPL; +} + +static const IHTMLMimeTypesCollectionVtbl HTMLMimeTypesCollectionVtbl = { + HTMLMimeTypesCollection_QueryInterface, + HTMLMimeTypesCollection_AddRef, + HTMLMimeTypesCollection_Release, + HTMLMimeTypesCollection_GetTypeInfoCount, + HTMLMimeTypesCollection_GetTypeInfo, + HTMLMimeTypesCollection_GetIDsOfNames, + HTMLMimeTypesCollection_Invoke, + HTMLMimeTypesCollection_get_length +}; + +static HRESULT create_mime_types_collection(OmNavigator *navigator, HTMLMimeTypesCollection **ret) +{ + HTMLMimeTypesCollection *col; + + col = heap_alloc_zero(sizeof(*col)); + if(!col) + return E_OUTOFMEMORY; + + col->IHTMLMimeTypesCollection_iface.lpVtbl = &HTMLMimeTypesCollectionVtbl; + col->ref = 1; + col->navigator = navigator; + + *ret = col; + return S_OK; +} + static HRESULT WINAPI OmNavigator_QueryInterface(IOmNavigator *iface, REFIID riid, void **ppv) { OmNavigator *This = impl_from_IOmNavigator(iface); @@ -243,6 +370,8 @@ static ULONG WINAPI OmNavigator_Release(IOmNavigator *iface) This->plugins->navigator = NULL; IHTMLPluginsCollection_Release(&This->plugins->IHTMLPluginsCollection_iface); } + if(This->mime_types) + This->mime_types->navigator = NULL; release_dispex(&This->dispex); heap_free(This); } @@ -387,8 +516,21 @@ static HRESULT WINAPI OmNavigator_taintEnabled(IOmNavigator *iface, VARIANT_BOOL static HRESULT WINAPI OmNavigator_get_mimeTypes(IOmNavigator *iface, IHTMLMimeTypesCollection **p) { OmNavigator *This = impl_from_IOmNavigator(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + + TRACE("(%p)->(%p)\n", This, p); + + if(!This->mime_types) { + HRESULT hres; + + hres = create_mime_types_collection(This, &This->mime_types); + if(FAILED(hres)) + return hres; + }else { + IHTMLMimeTypesCollection_AddRef(&This->mime_types->IHTMLMimeTypesCollection_iface); + } + + *p = &This->mime_types->IHTMLMimeTypesCollection_iface; + return S_OK; } static HRESULT WINAPI OmNavigator_get_plugins(IOmNavigator *iface, IHTMLPluginsCollection **p)
1
0
0
0
← Newer
1
2
3
4
5
...
95
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
Results per page:
10
25
50
100
200