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
February 2018
----- 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
804 discussions
Start a n
N
ew thread
Nikolay Sivov : wincodecs: Encoder options are optional for CreateNewFrame ().
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: 0be89601f57388e5788151d2176c0d24e9aaa76a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0be89601f57388e5788151d2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 5 19:59:33 2018 +0300 wincodecs: Encoder options are optional for CreateNewFrame(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/bmpencode.c | 7 +++++-- dlls/windowscodecs/icnsformat.c | 9 ++++++--- dlls/windowscodecs/jpegformat.c | 11 +++++++---- dlls/windowscodecs/pngformat.c | 11 +++++++---- dlls/windowscodecs/tests/converter.c | 18 ++++++++++++++++++ dlls/windowscodecs/tiffformat.c | 2 +- 6 files changed, 44 insertions(+), 14 deletions(-) diff --git a/dlls/windowscodecs/bmpencode.c b/dlls/windowscodecs/bmpencode.c index 48a8e27..047154e 100644 --- a/dlls/windowscodecs/bmpencode.c +++ b/dlls/windowscodecs/bmpencode.c @@ -508,8 +508,11 @@ static HRESULT WINAPI BmpEncoder_CreateNewFrame(IWICBitmapEncoder *iface, if (!This->stream) return WINCODEC_ERR_NOTINITIALIZED; - hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions); - if (FAILED(hr)) return hr; + if (ppIEncoderOptions) + { + hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions); + if (FAILED(hr)) return hr; + } encode = HeapAlloc(GetProcessHeap(), 0, sizeof(BmpFrameEncode)); if (!encode) diff --git a/dlls/windowscodecs/icnsformat.c b/dlls/windowscodecs/icnsformat.c index 14144f7..aa96404 100644 --- a/dlls/windowscodecs/icnsformat.c +++ b/dlls/windowscodecs/icnsformat.c @@ -617,9 +617,12 @@ static HRESULT WINAPI IcnsEncoder_CreateNewFrame(IWICBitmapEncoder *iface, goto end; } - hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions); - if (FAILED(hr)) - goto end; + if (ppIEncoderOptions) + { + hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions); + if (FAILED(hr)) + goto end; + } frameEncode = HeapAlloc(GetProcessHeap(), 0, sizeof(IcnsFrameEncode)); if (frameEncode == NULL) diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index 6617ec7..433a031 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -1466,11 +1466,14 @@ static HRESULT WINAPI JpegEncoder_CreateNewFrame(IWICBitmapEncoder *iface, return WINCODEC_ERR_NOTINITIALIZED; } - hr = CreatePropertyBag2(opts, sizeof(opts)/sizeof(opts[0]), ppIEncoderOptions); - if (FAILED(hr)) + if (ppIEncoderOptions) { - LeaveCriticalSection(&This->lock); - return hr; + hr = CreatePropertyBag2(opts, sizeof(opts)/sizeof(opts[0]), ppIEncoderOptions); + if (FAILED(hr)) + { + LeaveCriticalSection(&This->lock); + return hr; + } } This->frame_count = 1; diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index 117761c..26b5fd5 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -2055,11 +2055,14 @@ static HRESULT WINAPI PngEncoder_CreateNewFrame(IWICBitmapEncoder *iface, return WINCODEC_ERR_NOTINITIALIZED; } - hr = CreatePropertyBag2(opts, sizeof(opts)/sizeof(opts[0]), ppIEncoderOptions); - if (FAILED(hr)) + if (ppIEncoderOptions) { - LeaveCriticalSection(&This->lock); - return hr; + hr = CreatePropertyBag2(opts, sizeof(opts)/sizeof(opts[0]), ppIEncoderOptions); + if (FAILED(hr)) + { + LeaveCriticalSection(&This->lock); + return hr; + } } This->frame_count = 1; diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c index 704ae5d..80423dc 100644 --- a/dlls/windowscodecs/tests/converter.c +++ b/dlls/windowscodecs/tests/converter.c @@ -804,6 +804,24 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls int i; hr = CoCreateInstance(clsid_encoder, NULL, CLSCTX_INPROC_SERVER, + &IID_IWICBitmapEncoder, (void **)&encoder); + ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); + + hr = CreateStreamOnHGlobal(NULL, TRUE, &stream); + ok(SUCCEEDED(hr), "CreateStreamOnHGlobal failed, hr=%x\n", hr); + + hr = IWICBitmapEncoder_Initialize(encoder, stream, WICBitmapEncoderNoCache); + ok(SUCCEEDED(hr), "Initialize failed, hr=%x\n", hr); + + /* Encoder options are optional. */ + hr = IWICBitmapEncoder_CreateNewFrame(encoder, &frameencode, NULL); + ok(SUCCEEDED(hr), "Failed to create encode frame, hr %#x.\n", hr); + + IStream_Release(stream); + IWICBitmapEncoder_Release(encoder); + IWICBitmapFrameEncode_Release(frameencode); + + hr = CoCreateInstance(clsid_encoder, NULL, CLSCTX_INPROC_SERVER, &IID_IWICBitmapEncoder, (void**)&encoder); ok(SUCCEEDED(hr), "CoCreateInstance failed, hr=%x\n", hr); if (SUCCEEDED(hr)) diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index f165e18..f125b07 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -1957,7 +1957,7 @@ static HRESULT WINAPI TiffEncoder_CreateNewFrame(IWICBitmapEncoder *iface, hr = E_FAIL; } - if (SUCCEEDED(hr)) + if (ppIEncoderOptions && SUCCEEDED(hr)) { hr = CreatePropertyBag2(opts, sizeof(opts)/sizeof(opts[0]), ppIEncoderOptions); if (SUCCEEDED(hr))
1
0
0
0
Nikolay Sivov : wincodecs: Use static array for property bag descriptions.
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: 93afd254bb80d1f4c3e7601b5c2be14a1901a769 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=93afd254bb80d1f4c3e7601b…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Feb 5 19:59:32 2018 +0300 wincodecs: Use static array for property bag descriptions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/jpegformat.c | 31 ++++++++++--------------------- dlls/windowscodecs/pngformat.c | 13 +++++-------- dlls/windowscodecs/propertybag.c | 4 ++-- dlls/windowscodecs/tiffformat.c | 20 +++++++------------- dlls/windowscodecs/wincodecs_private.h | 2 +- 5 files changed, 25 insertions(+), 45 deletions(-) diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index ef050ba..6617ec7 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -1440,7 +1440,15 @@ static HRESULT WINAPI JpegEncoder_CreateNewFrame(IWICBitmapEncoder *iface, { JpegEncoder *This = impl_from_IWICBitmapEncoder(iface); HRESULT hr; - PROPBAG2 opts[6] = {{0}}; + static const PROPBAG2 opts[6] = + { + { PROPBAG2_TYPE_DATA, VT_R4, 0, 0, (LPOLESTR)wszImageQuality }, + { PROPBAG2_TYPE_DATA, VT_UI1, 0, 0, (LPOLESTR)wszBitmapTransform }, + { PROPBAG2_TYPE_DATA, VT_I4 | VT_ARRAY, 0, 0, (LPOLESTR)wszLuminance }, + { PROPBAG2_TYPE_DATA, VT_I4 | VT_ARRAY, 0, 0, (LPOLESTR)wszChrominance }, + { PROPBAG2_TYPE_DATA, VT_UI1, 0, 0, (LPOLESTR)wszJpegYCrCbSubsampling }, + { PROPBAG2_TYPE_DATA, VT_BOOL, 0, 0, (LPOLESTR)wszSuppressApp0 }, + }; TRACE("(%p,%p,%p)\n", iface, ppIFrameEncode, ppIEncoderOptions); @@ -1458,26 +1466,7 @@ static HRESULT WINAPI JpegEncoder_CreateNewFrame(IWICBitmapEncoder *iface, return WINCODEC_ERR_NOTINITIALIZED; } - opts[0].pstrName = (LPOLESTR)wszImageQuality; - opts[0].vt = VT_R4; - opts[0].dwType = PROPBAG2_TYPE_DATA; - opts[1].pstrName = (LPOLESTR)wszBitmapTransform; - opts[1].vt = VT_UI1; - opts[1].dwType = PROPBAG2_TYPE_DATA; - opts[2].pstrName = (LPOLESTR)wszLuminance; - opts[2].vt = VT_I4|VT_ARRAY; - opts[2].dwType = PROPBAG2_TYPE_DATA; - opts[3].pstrName = (LPOLESTR)wszChrominance; - opts[3].vt = VT_I4|VT_ARRAY; - opts[3].dwType = PROPBAG2_TYPE_DATA; - opts[4].pstrName = (LPOLESTR)wszJpegYCrCbSubsampling; - opts[4].vt = VT_UI1; - opts[4].dwType = PROPBAG2_TYPE_DATA; - opts[5].pstrName = (LPOLESTR)wszSuppressApp0; - opts[5].vt = VT_BOOL; - opts[5].dwType = PROPBAG2_TYPE_DATA; - - hr = CreatePropertyBag2(opts, 6, ppIEncoderOptions); + hr = CreatePropertyBag2(opts, sizeof(opts)/sizeof(opts[0]), ppIEncoderOptions); if (FAILED(hr)) { LeaveCriticalSection(&This->lock); diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index 1ab2c85..117761c 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -2033,7 +2033,11 @@ static HRESULT WINAPI PngEncoder_CreateNewFrame(IWICBitmapEncoder *iface, { PngEncoder *This = impl_from_IWICBitmapEncoder(iface); HRESULT hr; - PROPBAG2 opts[2]= {{0}}; + static const PROPBAG2 opts[2] = + { + { PROPBAG2_TYPE_DATA, VT_BOOL, 0, 0, (LPOLESTR)wszPngInterlaceOption }, + { PROPBAG2_TYPE_DATA, VT_UI1, 0, 0, (LPOLESTR)wszPngFilterOption }, + }; TRACE("(%p,%p,%p)\n", iface, ppIFrameEncode, ppIEncoderOptions); @@ -2051,13 +2055,6 @@ static HRESULT WINAPI PngEncoder_CreateNewFrame(IWICBitmapEncoder *iface, return WINCODEC_ERR_NOTINITIALIZED; } - opts[0].pstrName = (LPOLESTR)wszPngInterlaceOption; - opts[0].vt = VT_BOOL; - opts[0].dwType = PROPBAG2_TYPE_DATA; - opts[1].pstrName = (LPOLESTR)wszPngFilterOption; - opts[1].vt = VT_UI1; - opts[1].dwType = PROPBAG2_TYPE_DATA; - hr = CreatePropertyBag2(opts, sizeof(opts)/sizeof(opts[0]), ppIEncoderOptions); if (FAILED(hr)) { diff --git a/dlls/windowscodecs/propertybag.c b/dlls/windowscodecs/propertybag.c index 2f3015c..e9d1af9 100644 --- a/dlls/windowscodecs/propertybag.c +++ b/dlls/windowscodecs/propertybag.c @@ -213,7 +213,7 @@ static HRESULT WINAPI PropertyBag_CountProperties(IPropertyBag2 *iface, ULONG *p return S_OK; } -static HRESULT copy_propbag2(PROPBAG2 *dest, PROPBAG2 *src) +static HRESULT copy_propbag2(PROPBAG2 *dest, const PROPBAG2 *src) { dest->cfType = src->cfType; dest->clsid = src->clsid; @@ -278,7 +278,7 @@ static const IPropertyBag2Vtbl PropertyBag_Vtbl = { PropertyBag_LoadObject }; -HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count, +HRESULT CreatePropertyBag2(const PROPBAG2 *options, UINT count, IPropertyBag2 **ppPropertyBag2) { UINT i; diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index a0eec53..f165e18 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -1936,7 +1936,11 @@ static HRESULT WINAPI TiffEncoder_CreateNewFrame(IWICBitmapEncoder *iface, { TiffEncoder *This = impl_from_IWICBitmapEncoder(iface); TiffFrameEncode *result; - + static const PROPBAG2 opts[2] = + { + { PROPBAG2_TYPE_DATA, VT_UI1, 0, 0, (LPOLESTR)wszTiffCompressionMethod }, + { PROPBAG2_TYPE_DATA, VT_R4, 0, 0, (LPOLESTR)wszCompressionQuality }, + }; HRESULT hr=S_OK; TRACE("(%p,%p,%p)\n", iface, ppIFrameEncode, ppIEncoderOptions); @@ -1955,24 +1959,14 @@ static HRESULT WINAPI TiffEncoder_CreateNewFrame(IWICBitmapEncoder *iface, if (SUCCEEDED(hr)) { - PROPBAG2 opts[2]= {{0}}; - opts[0].pstrName = (LPOLESTR)wszTiffCompressionMethod; - opts[0].vt = VT_UI1; - opts[0].dwType = PROPBAG2_TYPE_DATA; - - opts[1].pstrName = (LPOLESTR)wszCompressionQuality; - opts[1].vt = VT_R4; - opts[1].dwType = PROPBAG2_TYPE_DATA; - - hr = CreatePropertyBag2(opts, 2, ppIEncoderOptions); - + hr = CreatePropertyBag2(opts, sizeof(opts)/sizeof(opts[0]), ppIEncoderOptions); if (SUCCEEDED(hr)) { VARIANT v; VariantInit(&v); V_VT(&v) = VT_UI1; V_UNION(&v, bVal) = WICTiffCompressionDontCare; - hr = IPropertyBag2_Write(*ppIEncoderOptions, 1, opts, &v); + hr = IPropertyBag2_Write(*ppIEncoderOptions, 1, (PROPBAG2 *)opts, &v); VariantClear(&v); if (FAILED(hr)) { diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index 2249c13..8bba811 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -120,7 +120,7 @@ extern void reverse_bgr8(UINT bytesperpixel, LPBYTE bits, UINT width, UINT heigh extern HRESULT get_pixelformat_bpp(const GUID *pixelformat, UINT *bpp) DECLSPEC_HIDDEN; -extern HRESULT CreatePropertyBag2(PROPBAG2 *options, UINT count, +extern HRESULT CreatePropertyBag2(const PROPBAG2 *options, UINT count, IPropertyBag2 **property) DECLSPEC_HIDDEN; extern HRESULT CreateComponentInfo(REFCLSID clsid, IWICComponentInfo **ppIInfo) DECLSPEC_HIDDEN;
1
0
0
0
Jacek Caban : mshtml.idl: Added IDOMUIEvent declaration.
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: 0eeaac7a38d51dd79a2e86104e4422208fe107de URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0eeaac7a38d51dd79a2e8610…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Feb 5 18:16:09 2018 +0100 mshtml.idl: Added IDOMUIEvent declaration. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/mshtml.idl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/include/mshtml.idl b/include/mshtml.idl index 42593dc..38e0bca 100644 --- a/include/mshtml.idl +++ b/include/mshtml.idl @@ -20168,6 +20168,35 @@ methods: WINE_IDOMEVENT_DISPINTERFACE_DECL; } +/***************************************************************************** + * IDOMUIEvent interface + */ +[ + odl, + oleautomation, + dual, + uuid(305106ca-98b5-11cf-bb82-00aa00bdce0b) +] +interface IDOMUIEvent : IDispatch +{ + [propget, id(DISPID_IDOMUIEVENT_VIEW)] + HRESULT view([out, retval] IHTMLWindow2 **p); + + [propget, id(DISPID_IDOMUIEVENT_DETAIL)] + HRESULT detail([out, retval] long *p); + + [id(DISPID_IDOMUIEVENT_INITUIEVENT)] + HRESULT initUIEvent( + [in] BSTR eventType, + [in] VARIANT_BOOL canBubble, + [in] VARIANT_BOOL cancelable, + [in] IHTMLWindow2 *view, + [in] long detail); +} + +/***************************************************************************** + * DispDOMUIEvent dispinterface + */ [ hidden, uuid(30590072-98b5-11cf-bb82-00aa00bdce0b)
1
0
0
0
Jacek Caban : mshtml: Use IDOMMouseEvent instead of nsIDOMMouseEvent in IHTMLEventObj implementation.
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: 65ce11478c2885ed2b248e6967479ba84fabb449 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=65ce11478c2885ed2b248e69…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Feb 5 17:31:04 2018 +0100 mshtml: Use IDOMMouseEvent instead of nsIDOMMouseEvent in IHTMLEventObj implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 109 ++++++++++++------------------------------------ 1 file changed, 27 insertions(+), 82 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 8462bed..633c1f9 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -411,6 +411,9 @@ static HRESULT WINAPI HTMLEventObj_get_altKey(IHTMLEventObj *iface, VARIANT_BOOL TRACE("(%p)->(%p)\n", This, p); + if(This->event && This->event->mouse_event) + return IDOMMouseEvent_get_altKey(&This->event->IDOMMouseEvent_iface, p); + if(This->event) { nsIDOMKeyEvent *key_event; nsresult nsres; @@ -419,14 +422,6 @@ static HRESULT WINAPI HTMLEventObj_get_altKey(IHTMLEventObj *iface, VARIANT_BOOL if(NS_SUCCEEDED(nsres)) { nsIDOMKeyEvent_GetAltKey(key_event, &ret); nsIDOMKeyEvent_Release(key_event); - }else { - nsIDOMMouseEvent *mouse_event; - - nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event); - if(NS_SUCCEEDED(nsres)) { - nsIDOMMouseEvent_GetAltKey(mouse_event, &ret); - nsIDOMMouseEvent_Release(mouse_event); - } } } @@ -441,6 +436,9 @@ static HRESULT WINAPI HTMLEventObj_get_ctrlKey(IHTMLEventObj *iface, VARIANT_BOO TRACE("(%p)->(%p)\n", This, p); + if(This->event && This->event->mouse_event) + return IDOMMouseEvent_get_ctrlKey(&This->event->IDOMMouseEvent_iface, p); + if(This->event) { nsIDOMKeyEvent *key_event; nsresult nsres; @@ -449,14 +447,6 @@ static HRESULT WINAPI HTMLEventObj_get_ctrlKey(IHTMLEventObj *iface, VARIANT_BOO if(NS_SUCCEEDED(nsres)) { nsIDOMKeyEvent_GetCtrlKey(key_event, &ret); nsIDOMKeyEvent_Release(key_event); - }else { - nsIDOMMouseEvent *mouse_event; - - nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event); - if(NS_SUCCEEDED(nsres)) { - nsIDOMMouseEvent_GetCtrlKey(mouse_event, &ret); - nsIDOMMouseEvent_Release(mouse_event); - } } } @@ -471,6 +461,9 @@ static HRESULT WINAPI HTMLEventObj_get_shiftKey(IHTMLEventObj *iface, VARIANT_BO TRACE("(%p)->(%p)\n", This, p); + if(This->event && This->event->mouse_event) + return IDOMMouseEvent_get_shiftKey(&This->event->IDOMMouseEvent_iface, p); + if(This->event) { nsIDOMKeyEvent *key_event; nsresult nsres; @@ -479,14 +472,6 @@ static HRESULT WINAPI HTMLEventObj_get_shiftKey(IHTMLEventObj *iface, VARIANT_BO if(NS_SUCCEEDED(nsres)) { nsIDOMKeyEvent_GetShiftKey(key_event, &ret); nsIDOMKeyEvent_Release(key_event); - }else { - nsIDOMMouseEvent *mouse_event; - - nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event); - if(NS_SUCCEEDED(nsres)) { - nsIDOMMouseEvent_GetShiftKey(mouse_event, &ret); - nsIDOMMouseEvent_Release(mouse_event); - } } } @@ -594,19 +579,15 @@ static HRESULT WINAPI HTMLEventObj_get_keyCode(IHTMLEventObj *iface, LONG *p) static HRESULT WINAPI HTMLEventObj_get_button(IHTMLEventObj *iface, LONG *p) { HTMLEventObj *This = impl_from_IHTMLEventObj(iface); - INT16 button = 0; + USHORT button = 0; TRACE("(%p)->(%p)\n", This, p); - if(This->event) { - nsIDOMMouseEvent *mouse_event; - nsresult nsres; - - nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event); - if(NS_SUCCEEDED(nsres)) { - nsIDOMMouseEvent_GetButton(mouse_event, &button); - nsIDOMMouseEvent_Release(mouse_event); - } + if(This->event && This->event->mouse_event) { + HRESULT hres; + hres = IDOMMouseEvent_get_button(&This->event->IDOMMouseEvent_iface, &button); + if(FAILED(hres)) + return hres; } *p = button; @@ -698,44 +679,26 @@ static HRESULT WINAPI HTMLEventObj_get_y(IHTMLEventObj *iface, LONG *p) static HRESULT WINAPI HTMLEventObj_get_clientX(IHTMLEventObj *iface, LONG *p) { HTMLEventObj *This = impl_from_IHTMLEventObj(iface); - LONG x = 0; TRACE("(%p)->(%p)\n", This, p); - if(This->event) { - nsIDOMMouseEvent *mouse_event; - nsresult nsres; + if(This->event && This->event->mouse_event) + return IDOMMouseEvent_get_clientX(&This->event->IDOMMouseEvent_iface, p); - nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event); - if(NS_SUCCEEDED(nsres)) { - nsIDOMMouseEvent_GetClientX(mouse_event, &x); - nsIDOMMouseEvent_Release(mouse_event); - } - } - - *p = x; + *p = 0; return S_OK; } static HRESULT WINAPI HTMLEventObj_get_clientY(IHTMLEventObj *iface, LONG *p) { HTMLEventObj *This = impl_from_IHTMLEventObj(iface); - LONG y = 0; TRACE("(%p)->(%p)\n", This, p); - if(This->event) { - nsIDOMMouseEvent *mouse_event; - nsresult nsres; - - nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event); - if(NS_SUCCEEDED(nsres)) { - nsIDOMMouseEvent_GetClientY(mouse_event, &y); - nsIDOMMouseEvent_Release(mouse_event); - } - } + if(This->event && This->event->mouse_event) + return IDOMMouseEvent_get_clientY(&This->event->IDOMMouseEvent_iface, p); - *p = y; + *p = 0; return S_OK; } @@ -762,44 +725,26 @@ static HRESULT WINAPI HTMLEventObj_get_offsetY(IHTMLEventObj *iface, LONG *p) static HRESULT WINAPI HTMLEventObj_get_screenX(IHTMLEventObj *iface, LONG *p) { HTMLEventObj *This = impl_from_IHTMLEventObj(iface); - LONG x = 0; TRACE("(%p)->(%p)\n", This, p); - if(This->event) { - nsIDOMMouseEvent *mouse_event; - nsresult nsres; - - nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event); - if(NS_SUCCEEDED(nsres)) { - nsIDOMMouseEvent_GetScreenX(mouse_event, &x); - nsIDOMMouseEvent_Release(mouse_event); - } - } + if(This->event && This->event->mouse_event) + return IDOMMouseEvent_get_screenX(&This->event->IDOMMouseEvent_iface, p); - *p = x; + *p = 0; return S_OK; } static HRESULT WINAPI HTMLEventObj_get_screenY(IHTMLEventObj *iface, LONG *p) { HTMLEventObj *This = impl_from_IHTMLEventObj(iface); - LONG y = 0; TRACE("(%p)->(%p)\n", This, p); - if(This->event) { - nsIDOMMouseEvent *mouse_event; - nsresult nsres; - - nsres = nsIDOMEvent_QueryInterface(This->event->nsevent, &IID_nsIDOMMouseEvent, (void**)&mouse_event); - if(NS_SUCCEEDED(nsres)) { - nsIDOMMouseEvent_GetScreenY(mouse_event, &y); - nsIDOMMouseEvent_Release(mouse_event); - } - } + if(This->event && This->event->mouse_event) + return IDOMMouseEvent_get_screenY(&This->event->IDOMMouseEvent_iface, p); - *p = y; + *p = 0; return S_OK; }
1
0
0
0
Jacek Caban : mshtml: Expose IDOMMouseEvent to scripts.
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: 5711c85a20831ab662407038a47ac7fdffff8231 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5711c85a20831ab662407038…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Feb 5 17:30:43 2018 +0100 mshtml: Expose IDOMMouseEvent to scripts. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 16 +++++++++++- dlls/mshtml/mshtml_private.h | 2 ++ dlls/mshtml/tests/events.js | 62 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 78 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index c037709..8462bed 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1586,6 +1586,18 @@ static dispex_static_data_t DOMEvent_dispex = { DOMEvent_iface_tids }; +static const tid_t DOMMouseEvent_iface_tids[] = { + IDOMEvent_tid, + IDOMMouseEvent_tid, + 0 +}; + +static dispex_static_data_t DOMMouseEvent_dispex = { + NULL, + DispDOMMouseEvent_tid, + DOMMouseEvent_iface_tids +}; + static DOMEvent *alloc_event(nsIDOMEvent *nsevent, eventid_t event_id) { dispex_static_data_t *dispex_data = &DOMEvent_dispex; @@ -1620,7 +1632,9 @@ static DOMEvent *alloc_event(nsIDOMEvent *nsevent, eventid_t event_id) - time_epoch; nsres = nsIDOMEvent_QueryInterface(nsevent, &IID_nsIDOMMouseEvent, (void**)&event->mouse_event); - if(NS_FAILED(nsres)) + if(NS_SUCCEEDED(nsres)) + dispex_data = &DOMMouseEvent_dispex; + else event->mouse_event = NULL; init_dispex(&event->dispex, (IUnknown*)&event->IDOMEvent_iface, dispex_data); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 162367a..83c30e6 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -81,6 +81,7 @@ typedef struct EventTarget EventTarget; XDIID(DispCPlugins) \ XDIID(DispDOMChildrenCollection) \ XDIID(DispDOMEvent) \ + XDIID(DispDOMMouseEvent) \ XDIID(DispHTMLAnchorElement) \ XDIID(DispHTMLAreaElement) \ XDIID(DispHTMLAttributeCollection) \ @@ -128,6 +129,7 @@ typedef struct EventTarget EventTarget; XDIID(HTMLDocumentEvents) \ XDIID(HTMLElementEvents2) \ XIID(IDOMEvent) \ + XIID(IDOMMouseEvent) \ XIID(IDocumentEvent) \ XIID(IDocumentSelector) \ XIID(IElementSelector) \ diff --git a/dlls/mshtml/tests/events.js b/dlls/mshtml/tests/events.js index 30d23c7..fd7a268 100644 --- a/dlls/mshtml/tests/events.js +++ b/dlls/mshtml/tests/events.js @@ -592,6 +592,65 @@ function test_time_stamp() { next_test(); } +function test_mouse_event() { + var e; + + e = document.createEvent("MouseEvent"); + ok(e.screenX === 0, "screenX = " + e.screenX); + ok(e.screenY === 0, "screenY = " + e.screenY); + ok(e.clientX === 0, "clientX = " + e.clientX); + ok(e.clientY === 0, "clientY = " + e.clientY); + ok(e.ctrlKey === false, "ctrlKey = " + e.ctrlKey); + ok(e.altKey === false, "altKey = " + e.altKey); + ok(e.shiftKey === false, "shiftKey = " + e.shiftKey); + ok(e.metaKey === false, "metaKey = " + e.metaKey); + ok(e.button === 0, "button = " + e.button); + + e.initMouseEvent("test", true, true, window, 1, 2, 3, 4, 5, false, false, false, false, 1, document); + ok(e.type === "test", "type = " + e.type); + ok(e.cancelable === true, "cancelable = " + e.cancelable); + ok(e.bubbles === true, "bubbles = " + e.bubbles); + ok(e.screenX === 2, "screenX = " + e.screenX); + ok(e.screenY === 3, "screenY = " + e.screenY); + ok(e.clientX === 4, "clientX = " + e.clientX); + ok(e.clientY === 5, "clientY = " + e.clientY); + ok(e.ctrlKey === false, "ctrlKey = " + e.ctrlKey); + ok(e.altKey === false, "altKey = " + e.altKey); + ok(e.shiftKey === false, "shiftKey = " + e.shiftKey); + ok(e.metaKey === false, "metaKey = " + e.metaKey); + ok(e.button === 1, "button = " + e.button); + + e.initMouseEvent("test", false, false, window, 9, 8, 7, 6, 5, true, true, true, true, 127, document); + ok(e.type === "test", "type = " + e.type); + ok(e.cancelable === false, "cancelable = " + e.cancelable); + ok(e.bubbles === false, "bubbles = " + e.bubbles); + ok(e.screenX === 8, "screenX = " + e.screenX); + ok(e.screenY === 7, "screenY = " + e.screenY); + ok(e.clientX === 6, "clientX = " + e.clientX); + ok(e.clientY === 5, "clientY = " + e.clientY); + ok(e.ctrlKey === true, "ctrlKey = " + e.ctrlKey); + ok(e.altKey === true, "altKey = " + e.altKey); + ok(e.shiftKey === true, "shiftKey = " + e.shiftKey); + ok(e.metaKey === true, "metaKey = " + e.metaKey); + ok(e.button === 127, "button = " + e.button); + + e.initEvent("testevent", true, true); + ok(e.type === "testevent", "type = " + e.type); + ok(e.cancelable === true, "cancelable = " + e.cancelable); + ok(e.bubbles === true, "bubbles = " + e.bubbles); + ok(e.screenX === 8, "screenX = " + e.screenX); + ok(e.screenY === 7, "screenY = " + e.screenY); + ok(e.clientX === 6, "clientX = " + e.clientX); + ok(e.clientY === 5, "clientY = " + e.clientY); + ok(e.ctrlKey === true, "ctrlKey = " + e.ctrlKey); + ok(e.altKey === true, "altKey = " + e.altKey); + ok(e.shiftKey === true, "shiftKey = " + e.shiftKey); + ok(e.metaKey === true, "metaKey = " + e.metaKey); + ok(e.button === 127, "button = " + e.button); + + next_test(); +} + var tests = [ test_content_loaded, test_add_remove_listener, @@ -605,5 +664,6 @@ var tests = [ test_dispatch_event, test_recursive_dispatch, test_time_stamp, - test_listener_order + test_listener_order, + test_mouse_event ];
1
0
0
0
Jacek Caban : mshtml: Added IDOMMouseEvent::initMouseEvent implementation.
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: 05b0c8f72b1c1cf373bd370683996617e42229ce URL:
https://source.winehq.org/git/wine.git/?a=commit;h=05b0c8f72b1c1cf373bd3706…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Feb 5 17:30:28 2018 +0100 mshtml: Added IDOMMouseEvent::initMouseEvent implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 2353d95..c037709 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1418,10 +1418,35 @@ static HRESULT WINAPI DOMMouseEvent_initMouseEvent(IDOMMouseEvent *iface, BSTR t IEventTarget *related_target) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%s %x %x %p %d %d %d %d %d %x %x %x %x %u %p)\n", This, debugstr_w(type), + nsAString type_str; + nsresult nsres; + HRESULT hres; + + TRACE("(%p)->(%s %x %x %p %d %d %d %d %d %x %x %x %x %u %p)\n", This, debugstr_w(type), can_bubble, cancelable, view, detail, screen_x, screen_y, client_x, client_y, ctrl_key, alt_key, shift_key, meta_key, button, related_target); - return E_NOTIMPL; + + if(This->target) { + TRACE("called on already dispatched event\n"); + return S_OK; + } + + hres = IDOMEvent_initEvent(&This->IDOMEvent_iface, type, can_bubble, cancelable); + if(FAILED(hres)) + return hres; + + nsAString_InitDepend(&type_str, type); + nsres = nsIDOMMouseEvent_InitMouseEvent(This->mouse_event, &type_str, can_bubble, cancelable, + NULL /* FIXME */, detail, screen_x, screen_y, + client_x, client_y, ctrl_key, alt_key, shift_key, + meta_key, button, NULL /* FIXME */); + nsAString_Finish(&type_str); + if(NS_FAILED(nsres)) { + FIXME("InitMouseEvent failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI DOMMouseEvent_getModifierState(IDOMMouseEvent *iface, BSTR key,
1
0
0
0
Jacek Caban : mshtml: Added IDOMMouseEvent:: button property implementation.
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: 17eb66c798670eaeee6249cfd6363c157f4c2468 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=17eb66c798670eaeee6249cf…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Feb 5 17:30:16 2018 +0100 mshtml: Added IDOMMouseEvent::button property implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index fbe44f5..2353d95 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1391,8 +1391,17 @@ static HRESULT WINAPI DOMMouseEvent_get_metaKey(IDOMMouseEvent *iface, VARIANT_B static HRESULT WINAPI DOMMouseEvent_get_button(IDOMMouseEvent *iface, USHORT *p) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + INT16 r; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMMouseEvent_GetButton(This->mouse_event, &r); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = r; + return S_OK; } static HRESULT WINAPI DOMMouseEvent_get_relatedTarget(IDOMMouseEvent *iface, IEventTarget **p)
1
0
0
0
Jacek Caban : mshtml: Added IDOMMouseEvent key state getters implementation.
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: 6a16a5f424fb8e8a296631b9fe34dc404366579d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6a16a5f424fb8e8a296631b9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Feb 5 17:30:08 2018 +0100 mshtml: Added IDOMMouseEvent key state getters implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 52 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index e4ba0ed..fbe44f5 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1327,29 +1327,65 @@ static HRESULT WINAPI DOMMouseEvent_get_clientY(IDOMMouseEvent *iface, LONG *p) static HRESULT WINAPI DOMMouseEvent_get_ctrlKey(IDOMMouseEvent *iface, VARIANT_BOOL *p) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + cpp_bool r; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMMouseEvent_GetCtrlKey(This->mouse_event, &r); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = variant_bool(r); + return S_OK; } static HRESULT WINAPI DOMMouseEvent_get_shiftKey(IDOMMouseEvent *iface, VARIANT_BOOL *p) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + cpp_bool r; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMMouseEvent_GetShiftKey(This->mouse_event, &r); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = variant_bool(r); + return S_OK; } static HRESULT WINAPI DOMMouseEvent_get_altKey(IDOMMouseEvent *iface, VARIANT_BOOL *p) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + cpp_bool r; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMMouseEvent_GetAltKey(This->mouse_event, &r); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = variant_bool(r); + return S_OK; } static HRESULT WINAPI DOMMouseEvent_get_metaKey(IDOMMouseEvent *iface, VARIANT_BOOL *p) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + cpp_bool r; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMMouseEvent_GetMetaKey(This->mouse_event, &r); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = variant_bool(r); + return S_OK; } static HRESULT WINAPI DOMMouseEvent_get_button(IDOMMouseEvent *iface, USHORT *p)
1
0
0
0
Jacek Caban : mshtml: Added IDOMMouseEvent position getters implementation.
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: feb957b2768e8864afc9946f1044cf251e311a61 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=feb957b2768e8864afc9946f…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Feb 5 17:29:59 2018 +0100 mshtml: Added IDOMMouseEvent position getters implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 52 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index 0cf69fb..e4ba0ed 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1263,29 +1263,65 @@ static HRESULT WINAPI DOMMouseEvent_Invoke(IDOMMouseEvent *iface, DISPID dispIdM static HRESULT WINAPI DOMMouseEvent_get_screenX(IDOMMouseEvent *iface, LONG *p) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + INT32 screen_x; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMMouseEvent_GetScreenX(This->mouse_event, &screen_x); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = screen_x; + return S_OK; } static HRESULT WINAPI DOMMouseEvent_get_screenY(IDOMMouseEvent *iface, LONG *p) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + INT32 screen_y; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMMouseEvent_GetScreenY(This->mouse_event, &screen_y); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = screen_y; + return S_OK; } static HRESULT WINAPI DOMMouseEvent_get_clientX(IDOMMouseEvent *iface, LONG *p) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + INT32 client_x; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMMouseEvent_GetClientX(This->mouse_event, &client_x); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = client_x; + return S_OK; } static HRESULT WINAPI DOMMouseEvent_get_clientY(IDOMMouseEvent *iface, LONG *p) { DOMEvent *This = impl_from_IDOMMouseEvent(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + INT32 client_y; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMMouseEvent_GetClientY(This->mouse_event, &client_y); + if(NS_FAILED(nsres)) + return E_FAIL; + + *p = client_y; + return S_OK; } static HRESULT WINAPI DOMMouseEvent_get_ctrlKey(IDOMMouseEvent *iface, VARIANT_BOOL *p)
1
0
0
0
Jacek Caban : mshtml: Use DispDOMEvent for DOMEvent object.
by Alexandre Julliard
05 Feb '18
05 Feb '18
Module: wine Branch: master Commit: aa2be899a68e96ad2c8024dbeb3740b09092f696 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aa2be899a68e96ad2c8024db…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Feb 5 17:29:50 2018 +0100 mshtml: Use DispDOMEvent for DOMEvent object. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlevent.c | 2 +- dlls/mshtml/mshtml_private.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index eb27a24..0cf69fb 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1476,7 +1476,7 @@ static const tid_t DOMEvent_iface_tids[] = { static dispex_static_data_t DOMEvent_dispex = { NULL, - IDOMEvent_tid, + DispDOMEvent_tid, DOMEvent_iface_tids }; diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index ea38a66..162367a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -80,6 +80,7 @@ typedef struct EventTarget EventTarget; XDIID(DispCEventObj) \ XDIID(DispCPlugins) \ XDIID(DispDOMChildrenCollection) \ + XDIID(DispDOMEvent) \ XDIID(DispHTMLAnchorElement) \ XDIID(DispHTMLAreaElement) \ XDIID(DispHTMLAttributeCollection) \
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
81
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
Results per page:
10
25
50
100
200