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
June 2016
----- 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
592 discussions
Start a n
N
ew thread
Alex Henrie : ucrtbase: Implement _calloc_base.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: fdc57d497bb305e90680c3b450fa172042fd79cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fdc57d497bb305e90680c3b45…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Jun 16 18:02:23 2016 -0600 ucrtbase: Implement _calloc_base. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec | 2 +- dlls/msvcrt/heap.c | 8 ++++++++ dlls/ucrtbase/ucrtbase.spec | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec b/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec index 18ca9d4..85b2b83 100644 --- a/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec +++ b/dlls/api-ms-win-crt-heap-l1-1-0/api-ms-win-crt-heap-l1-1-0.spec @@ -7,7 +7,7 @@ @ cdecl _aligned_realloc(ptr long long) ucrtbase._aligned_realloc @ stub _aligned_recalloc @ cdecl _callnewh(long) ucrtbase._callnewh -@ stub _calloc_base +@ cdecl _calloc_base(long long) ucrtbase._calloc_base @ cdecl _expand(ptr long) ucrtbase._expand @ stub _free_base @ cdecl _get_heap_handle() ucrtbase._get_heap_handle diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 3fe0227..ae663de 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -406,6 +406,14 @@ void* CDECL MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t size) } /********************************************************************* + * _calloc_base (UCRTBASE.@) + */ +void* CDECL _calloc_base(MSVCRT_size_t count, MSVCRT_size_t size) +{ + return MSVCRT_calloc(count, size); +} + +/********************************************************************* * free (MSVCRT.@) */ void CDECL MSVCRT_free(void* ptr) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 690072b..4ebf2c6 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -211,7 +211,7 @@ @ cdecl _c_exit() MSVCRT__c_exit @ cdecl _cabs(long) MSVCRT__cabs @ cdecl _callnewh(long) -@ stub _calloc_base +@ cdecl _calloc_base(long long) @ cdecl _cexit() MSVCRT__cexit @ cdecl _cgets(ptr) @ stub _cgets_s
1
0
0
0
Austin English : kernel32: Implement GetLargePageMinimum for arm.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: 7dca3d139cd52a3d0906c284465d4061fa4e7b17 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7dca3d139cd52a3d0906c2844…
Author: Austin English <austinenglish(a)gmail.com> Date: Fri Jun 17 03:46:34 2016 -0500 kernel32: Implement GetLargePageMinimum for arm. Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: André Hentschel <nerv(a)dawncrow.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 3a7a5e8..72a9d13 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -297,7 +297,7 @@ err: */ SIZE_T WINAPI GetLargePageMinimum(void) { -#if defined(__i386___) || defined(__x86_64__) +#if defined(__i386___) || defined(__x86_64__) || defined(__arm__) return 2 * 1024 * 1024; #endif FIXME("Not implemented on your platform/architecture.\n");
1
0
0
0
Alexandre Julliard : gdi32: Implement AngleArc in enhanced metafiles.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: ef3494c62351ff101e221398a103823557901ac5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ef3494c62351ff101e221398a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 17 16:24:54 2016 +0900 gdi32: Implement AngleArc in enhanced metafiles. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/enhmetafiledrv.h | 1 + dlls/gdi32/enhmfdrv/graphics.c | 18 ++++++++++++++++++ dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/tests/metafile.c | 16 ++++++++++------ 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h index c7e4489..22d3cc5 100644 --- a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h +++ b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h @@ -54,6 +54,7 @@ extern DWORD EMFDRV_CreateBrushIndirect( PHYSDEV dev, HBRUSH hBrush ) DECLSPEC_H /* Metafile driver functions */ extern BOOL EMFDRV_AbortPath( PHYSDEV dev ) DECLSPEC_HIDDEN; +extern BOOL EMFDRV_AngleArc( PHYSDEV dev, INT x, INT y, DWORD radius, FLOAT start, FLOAT sweep ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right, diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 80cca1f..55c3be5 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -299,6 +299,24 @@ BOOL EMFDRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom, } /*********************************************************************** + * EMFDRV_AngleArc + */ +BOOL EMFDRV_AngleArc( PHYSDEV dev, INT x, INT y, DWORD radius, FLOAT start, FLOAT sweep ) +{ + EMRANGLEARC emr; + + emr.emr.iType = EMR_ANGLEARC; + emr.emr.nSize = sizeof( emr ); + emr.ptlCenter.x = x; + emr.ptlCenter.y = y; + emr.nRadius = radius; + emr.eStartAngle = start; + emr.eSweepAngle = sweep; + + return EMFDRV_WriteRecord( dev, &emr.emr ); +} + +/*********************************************************************** * EMFDRV_Ellipse */ BOOL EMFDRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 1678f41..835cf2c 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -39,7 +39,7 @@ static const struct gdi_dc_funcs EMFDRV_Funcs = NULL, /* pAbortDoc */ EMFDRV_AbortPath, /* pAbortPath */ NULL, /* pAlphaBlend */ - NULL, /* pAngleArc */ + EMFDRV_AngleArc, /* pAngleArc */ EMFDRV_Arc, /* pArc */ EMFDRV_ArcTo, /* pArcTo */ EMFDRV_BeginPath, /* pBeginPath */ diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 2ad7206..dd35a0e 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3601,7 +3601,7 @@ static const unsigned char EMF_PATH_BITS[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xac, 0x02, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xc8, 0x02, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, @@ -3677,10 +3677,13 @@ static const unsigned char EMF_PATH_BITS[] = 0x14, 0x00, 0x1e, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x06, 0x02, 0x04, 0x04, 0x04, 0x02, 0x03, 0x06, 0x02, 0x00, 0x00, 0x00, - 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00 + 0x29, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x42, + 0x00, 0x00, 0x34, 0x43, 0x3c, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 }; static void test_emf_GetPath(void) @@ -3720,10 +3723,11 @@ static void test_emf_GetPath(void) PolylineTo(hdcMetafile, pts, 4); PolyPolyline(hdcMetafile, pts, counts, 2); PolyDraw(hdcMetafile, pts, types, 9); + AngleArc(hdcMetafile, 37, 36, 23, 90, 180); EndPath(hdcMetafile); size = GetPath(hdcMetafile, NULL, NULL, 0); - todo_wine ok( size == 102, "GetPath returned %d.\n", size); + todo_wine ok( size == 112, "GetPath returned %d.\n", size); hemf = CloseEnhMetaFile(hdcMetafile); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
1
0
0
0
Alexandre Julliard : gdi32: Implement PolyDraw in enhanced metafiles.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: b06e6147d1ba42e164cc183c8ebdf1c3987363a4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b06e6147d1ba42e164cc183c8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 17 15:08:57 2016 +0900 gdi32: Implement PolyDraw in enhanced metafiles. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/enhmetafiledrv.h | 1 + dlls/gdi32/enhmfdrv/graphics.c | 37 ++++++++++++++++++++++++++++++++++++ dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/tests/metafile.c | 27 +++++++++++++++++++------- 4 files changed, 59 insertions(+), 8 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h index f4ed165..c7e4489 100644 --- a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h +++ b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h @@ -94,6 +94,7 @@ extern BOOL EMFDRV_Pie( PHYSDEV dev, INT left, INT top, INT right, INT botto INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_PolyBezier( PHYSDEV dev, const POINT *pts, DWORD count ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_PolyBezierTo( PHYSDEV dev, const POINT *pts, DWORD count ) DECLSPEC_HIDDEN; +extern BOOL EMFDRV_PolyDraw( PHYSDEV dev, const POINT *pts, const BYTE *types, DWORD count ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polys) DECLSPEC_HIDDEN; extern BOOL EMFDRV_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polys) DECLSPEC_HIDDEN; extern BOOL EMFDRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 7c0aadb..80cca1f 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -576,6 +576,43 @@ BOOL EMFDRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT p /********************************************************************** + * EMFDRV_PolyDraw + */ +BOOL EMFDRV_PolyDraw( PHYSDEV dev, const POINT *pts, const BYTE *types, DWORD count ) +{ + EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE*) dev; + EMRPOLYDRAW *emr; + BOOL ret; + BYTE *types_dest; + BOOL use_small_emr = can_use_short_points( pts, count ); + DWORD size; + + size = use_small_emr ? offsetof( EMRPOLYDRAW16, apts[count] ) : offsetof( EMRPOLYDRAW, aptl[count] ); + size += (count + 3) & ~3; + + if (!(emr = HeapAlloc( GetProcessHeap(), 0, size ))) return FALSE; + + emr->emr.iType = use_small_emr ? EMR_POLYDRAW16 : EMR_POLYDRAW; + emr->emr.nSize = size; + emr->cptl = count; + + types_dest = store_points( emr->aptl, pts, count, use_small_emr ); + memcpy( types_dest, types, count ); + if (count & 3) memset( types_dest + count, 0, 4 - (count & 3) ); + + if (!physDev->path) + get_points_bounds( &emr->rclBounds, pts, count, 0 ); + else + emr->rclBounds = empty_bounds; + + ret = EMFDRV_WriteRecord( dev, &emr->emr ); + if (ret && !physDev->path) EMFDRV_UpdateBBox( dev, &emr->rclBounds ); + HeapFree( GetProcessHeap(), 0, emr ); + return ret; +} + + +/********************************************************************** * EMFDRV_ExtFloodFill */ BOOL EMFDRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType ) diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 8d6acf2..1678f41 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -106,7 +106,7 @@ static const struct gdi_dc_funcs EMFDRV_Funcs = EMFDRV_Pie, /* pPie */ EMFDRV_PolyBezier, /* pPolyBezier */ EMFDRV_PolyBezierTo, /* pPolyBezierTo */ - NULL, /* pPolyDraw */ + EMFDRV_PolyDraw, /* pPolyDraw */ EMFDRV_PolyPolygon, /* pPolyPolygon */ EMFDRV_PolyPolyline, /* pPolyPolyline */ EMFDRV_Polygon, /* pPolygon */ diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index f90a747..2ad7206 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3601,7 +3601,7 @@ static const unsigned char EMF_PATH_BITS[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0x60, 0x02, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, + 0xac, 0x02, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, @@ -3667,16 +3667,28 @@ static const unsigned char EMF_PATH_BITS[] = 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, - 0x14, 0x00, 0x14, 0x00, 0x3c, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 + 0x14, 0x00, 0x14, 0x00, 0x5c, 0x00, 0x00, 0x00, + 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x09, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00, + 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, + 0x1e, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x14, 0x00, + 0x14, 0x00, 0x1e, 0x00, 0x14, 0x00, 0x14, 0x00, + 0x14, 0x00, 0x0a, 0x00, 0x06, 0x02, 0x04, 0x04, + 0x04, 0x02, 0x03, 0x06, 0x02, 0x00, 0x00, 0x00, + 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00 }; static void test_emf_GetPath(void) { - POINT pts[4] = {{10, 10}, {20, 10}, {10, 20}, {20, 20}}; + POINT pts[9] = {{10, 10}, {20, 10}, {10, 20}, {20, 20}, {30, 30}, {40, 20}, {20, 30}, {20, 20}, {20, 10}}; DWORD counts[2] = {2, 2}; + BYTE types[9] = { PT_MOVETO, PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO, + PT_LINETO | PT_CLOSEFIGURE, PT_MOVETO, PT_LINETO }; HDC hdcMetafile; HENHMETAFILE hemf; BOOL ret; @@ -3707,10 +3719,11 @@ static void test_emf_GetPath(void) Polyline(hdcMetafile, pts, 4); PolylineTo(hdcMetafile, pts, 4); PolyPolyline(hdcMetafile, pts, counts, 2); + PolyDraw(hdcMetafile, pts, types, 9); EndPath(hdcMetafile); size = GetPath(hdcMetafile, NULL, NULL, 0); - todo_wine ok( size == 93, "GetPath returned %d.\n", size); + todo_wine ok( size == 102, "GetPath returned %d.\n", size); hemf = CloseEnhMetaFile(hdcMetafile); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
1
0
0
0
Alexandre Julliard : gdi32: Add a few helper functions to manipulate point arrays in enhanced metafiles.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: 1f004c42bf53db4cb7c6369332f0f7471b0d7e4d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1f004c42bf53db4cb7c636933…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 17 15:08:22 2016 +0900 gdi32: Add a few helper functions to manipulate point arrays in enhanced metafiles. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/graphics.c | 245 +++++++++++++---------------------------- 1 file changed, 79 insertions(+), 166 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1f004c42bf53db4cb7c63…
1
0
0
0
Alexandre Julliard : gdi32: Implement PolylineTo in enhanced metafiles.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: 91ef88a9e3272bdb2ad602c3d6c20e5808cb9da0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91ef88a9e3272bdb2ad602c3d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 17 14:00:17 2016 +0900 gdi32: Implement PolylineTo in enhanced metafiles. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/enhmetafiledrv.h | 1 + dlls/gdi32/enhmfdrv/graphics.c | 14 ++++++++++++-- dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/tests/metafile.c | 28 +++++++++++++++++----------- 4 files changed, 31 insertions(+), 14 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h index aa24913..f4ed165 100644 --- a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h +++ b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h @@ -98,6 +98,7 @@ extern BOOL EMFDRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* cou extern BOOL EMFDRV_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polys) DECLSPEC_HIDDEN; extern BOOL EMFDRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_Polyline( PHYSDEV dev, const POINT* pt,INT count) DECLSPEC_HIDDEN; +extern BOOL EMFDRV_PolylineTo( PHYSDEV dev, const POINT* pt,INT count) DECLSPEC_HIDDEN; extern BOOL EMFDRV_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN; extern BOOL EMFDRV_RestoreDC( PHYSDEV dev, INT level ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom, diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 6724c10..98be711 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -389,7 +389,7 @@ EMFDRV_Polylinegon( PHYSDEV dev, const POINT* pt, INT count, DWORD iType ) return ret; } - if(iType == EMR_POLYBEZIERTO) { + if(iType == EMR_POLYBEZIERTO || iType == EMR_POLYLINETO) { POINT cur_pt; GetCurrentPositionEx( dev->hdc, &cur_pt ); @@ -467,7 +467,7 @@ EMFDRV_Polylinegon16( PHYSDEV dev, const POINT* pt, INT count, DWORD iType ) return ret; } - if(iType == EMR_POLYBEZIERTO16) { + if(iType == EMR_POLYBEZIERTO16 || iType == EMR_POLYLINETO16) { POINT cur_pt; GetCurrentPositionEx( dev->hdc, &cur_pt ); @@ -512,6 +512,16 @@ BOOL EMFDRV_Polyline( PHYSDEV dev, const POINT* pt, INT count ) } /********************************************************************** + * EMFDRV_PolylineTo + */ +BOOL EMFDRV_PolylineTo( PHYSDEV dev, const POINT* pt, INT count ) +{ + if( EMFDRV_Polylinegon16( dev, pt, count, EMR_POLYLINETO16 ) ) + return TRUE; + return EMFDRV_Polylinegon( dev, pt, count, EMR_POLYLINETO ); +} + +/********************************************************************** * EMFDRV_Polygon */ BOOL EMFDRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 4d13c2b..8d6acf2 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -111,7 +111,7 @@ static const struct gdi_dc_funcs EMFDRV_Funcs = EMFDRV_PolyPolyline, /* pPolyPolyline */ EMFDRV_Polygon, /* pPolygon */ EMFDRV_Polyline, /* pPolyline */ - NULL, /* pPolylineTo */ + EMFDRV_PolylineTo, /* pPolylineTo */ NULL, /* pPutImage */ NULL, /* pRealizeDefaultPalette */ NULL, /* pRealizePalette */ diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 4cf61a2..f90a747 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3601,7 +3601,7 @@ static const unsigned char EMF_PATH_BITS[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0x34, 0x02, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, + 0x60, 0x02, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, @@ -3655,17 +3655,22 @@ static const unsigned char EMF_PATH_BITS[] = 0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, - 0x5a, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, + 0x59, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00, - 0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, - 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00 + 0x04, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, + 0x14, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, + 0x14, 0x00, 0x14, 0x00, 0x5a, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x0a, 0x00, + 0x14, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, + 0x14, 0x00, 0x14, 0x00, 0x3c, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 }; static void test_emf_GetPath(void) @@ -3700,11 +3705,12 @@ static void test_emf_GetPath(void) Ellipse(hdcMetafile, 10, 10, 20, 20); RoundRect(hdcMetafile, 10, 10, 20, 20, 3, 5); Polyline(hdcMetafile, pts, 4); + PolylineTo(hdcMetafile, pts, 4); PolyPolyline(hdcMetafile, pts, counts, 2); EndPath(hdcMetafile); size = GetPath(hdcMetafile, NULL, NULL, 0); - todo_wine ok( size == 88, "GetPath returned %d.\n", size); + todo_wine ok( size == 93, "GetPath returned %d.\n", size); hemf = CloseEnhMetaFile(hdcMetafile); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
1
0
0
0
Alexandre Julliard : gdi32: Implement ArcTo in enhanced metafiles.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: e92e5ec376e21c0c52b62ea8588b477d76b5be8a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e92e5ec376e21c0c52b62ea85…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 17 13:51:05 2016 +0900 gdi32: Implement ArcTo in enhanced metafiles. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdi32/enhmfdrv/enhmetafiledrv.h | 2 ++ dlls/gdi32/enhmfdrv/graphics.c | 19 +++++++++++++++++++ dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/tests/metafile.c | 16 +++++++++++----- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h index 8aa1b2d..aa24913 100644 --- a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h +++ b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h @@ -56,6 +56,8 @@ extern DWORD EMFDRV_CreateBrushIndirect( PHYSDEV dev, HBRUSH hBrush ) DECLSPEC_H extern BOOL EMFDRV_AbortPath( PHYSDEV dev ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; +extern BOOL EMFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right, + INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_BeginPath( PHYSDEV dev ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_BitBlt( PHYSDEV devDst, INT xDst, INT yDst, INT width, INT height, PHYSDEV devSrc, INT xSrc, INT ySrc, DWORD rop ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index b139305..6724c10 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -177,6 +177,15 @@ EMFDRV_ArcChordPie( PHYSDEV dev, INT left, INT top, INT right, INT bottom, if(bounds.top > yCentre) bounds.top = yCentre; else if(bounds.bottom < yCentre) bounds.bottom = yCentre; } + if (iType == EMR_ARCTO) + { + POINT pt; + GetCurrentPositionEx( dev->hdc, &pt ); + bounds.left = min( bounds.left, pt.x ); + bounds.top = min( bounds.top, pt.y ); + bounds.right = max( bounds.right, pt.x ); + bounds.bottom = max( bounds.bottom, pt.y ); + } if(!EMFDRV_WriteRecord( dev, &emr.emr )) return FALSE; if(!physDev->path) @@ -196,6 +205,16 @@ BOOL EMFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom, } /*********************************************************************** + * EMFDRV_ArcTo + */ +BOOL EMFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right, INT bottom, + INT xstart, INT ystart, INT xend, INT yend ) +{ + return EMFDRV_ArcChordPie( dev, left, top, right, bottom, xstart, ystart, + xend, yend, EMR_ARCTO ); +} + +/*********************************************************************** * EMFDRV_Pie */ BOOL EMFDRV_Pie( PHYSDEV dev, INT left, INT top, INT right, INT bottom, diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index f618e85..4d13c2b 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -41,7 +41,7 @@ static const struct gdi_dc_funcs EMFDRV_Funcs = NULL, /* pAlphaBlend */ NULL, /* pAngleArc */ EMFDRV_Arc, /* pArc */ - NULL, /* pArcTo */ + EMFDRV_ArcTo, /* pArcTo */ EMFDRV_BeginPath, /* pBeginPath */ NULL, /* pBlendImage */ EMFDRV_Chord, /* pChord */ diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 79f072b..4cf61a2 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3599,12 +3599,12 @@ static const unsigned char EMF_PATH_BITS[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xef, 0xff, 0xff, 0xff, 0xea, 0xff, 0xff, 0xff, + 0xd8, 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0x0c, 0x02, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, + 0x34, 0x02, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x07, 0x00, 0x00, 0x3e, 0x04, 0x00, 0x00, + 0x20, 0x03, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00, @@ -3627,7 +3627,12 @@ static const unsigned char EMF_PATH_BITS[] = 0x15, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, - 0x15, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00, + 0x28, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x1a, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, + 0x1b, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00, @@ -3689,6 +3694,7 @@ static void test_emf_GetPath(void) ok( ret, "LineTo error %d.\n", GetLastError()); Rectangle(hdcMetafile, 10, 10, 20, 20); Arc(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21); + ArcTo(hdcMetafile, 23, 23, 37, 27, 37, 27, 23, 23); Chord(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21); Pie(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21); Ellipse(hdcMetafile, 10, 10, 20, 20); @@ -3698,7 +3704,7 @@ static void test_emf_GetPath(void) EndPath(hdcMetafile); size = GetPath(hdcMetafile, NULL, NULL, 0); - todo_wine ok( size == 77, "GetPath returned %d.\n", size); + todo_wine ok( size == 88, "GetPath returned %d.\n", size); hemf = CloseEnhMetaFile(hdcMetafile); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
1
0
0
0
Nikolay Sivov : dwrite: Don' t bother going through fallback for non-visual runs.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: bee56c33c5d08af860ed52038cd4e3705bba780f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bee56c33c5d08af860ed52038…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Jun 16 20:47:10 2016 +0300 dwrite: Don't bother going through fallback for non-visual runs. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/layout.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 3fcf07a..926a2cf 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -789,17 +789,48 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout) /* resolve run fonts */ LIST_FOR_EACH_ENTRY(r, &layout->runs, struct layout_run, entry) { struct regular_layout_run *run = &r->u.regular; + IDWriteFont *font; UINT32 length; if (r->kind == LAYOUT_RUN_INLINE) continue; range = get_layout_range_by_pos(layout, run->descr.textPosition); + + if (run->sa.shapes == DWRITE_SCRIPT_SHAPES_NO_VISUAL) { + IDWriteFontCollection *collection; + + if (range->collection) { + collection = range->collection; + IDWriteFontCollection_AddRef(collection); + } + else + IDWriteFactory_GetSystemFontCollection((IDWriteFactory*)layout->factory, &collection, FALSE); + + hr = create_matching_font(range->collection, range->fontfamily, range->weight, + range->style, range->stretch, &font); + + IDWriteFontCollection_Release(collection); + + if (FAILED(hr)) { + WARN("%s: failed to create a font for non visual run, %s, collection %p\n", debugstr_rundescr(&run->descr), + debugstr_w(range->fontfamily), range->collection); + return hr; + } + + hr = IDWriteFont_CreateFontFace(font, &run->run.fontFace); + IDWriteFont_Release(font); + if (FAILED(hr)) + return hr; + + run->run.fontEmSize = range->fontsize; + continue; + } + length = run->descr.stringLength; while (length) { UINT32 mapped_length; - IDWriteFont *font; FLOAT scale; run = &r->u.regular;
1
0
0
0
Jacek Caban : mshtml: Added IHTMLButtonElement:: form property implementation.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: a963b6c8c82f8384459a623418c156a70236164f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a963b6c8c82f8384459a62341…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 16 19:30:27 2016 +0200 mshtml: Added IHTMLButtonElement::form property implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlinput.c | 60 ++++++++++++++++++++++++++++++++----------------- dlls/mshtml/tests/dom.c | 33 +++++++++++++++++++++++++-- 2 files changed, 71 insertions(+), 22 deletions(-) diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 5e0d53b..e92b3d8 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -45,6 +45,32 @@ typedef struct { static const WCHAR forW[] = {'f','o','r',0}; +static HRESULT return_nsform(HTMLElement *elem, nsIDOMHTMLFormElement *nsform, IHTMLFormElement **p) +{ + nsIDOMNode *form_node; + HTMLDOMNode *node; + nsresult nsres; + HRESULT hres; + + if(!nsform) { + *p = NULL; + return S_OK; + } + + nsres = nsIDOMHTMLFormElement_QueryInterface(nsform, &IID_nsIDOMNode, (void**)&form_node); + nsIDOMHTMLFormElement_Release(nsform); + assert(nsres == NS_OK); + + hres = get_node(elem->node.doc, form_node, TRUE, &node); + nsIDOMNode_Release(form_node); + if (FAILED(hres)) + return hres; + + hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p); + node_release(node); + return hres; +} + static inline HTMLInputElement *impl_from_IHTMLInputElement(IHTMLInputElement *iface) { return CONTAINING_RECORD(iface, HTMLInputElement, IHTMLInputElement_iface); @@ -256,33 +282,17 @@ static HRESULT WINAPI HTMLInputElement_get_form(IHTMLInputElement *iface, IHTMLF { HTMLInputElement *This = impl_from_IHTMLInputElement(iface); nsIDOMHTMLFormElement *nsform; - nsIDOMNode *form_node; - HTMLDOMNode *node; - HRESULT hres; nsresult nsres; TRACE("(%p)->(%p)\n", This, p); nsres = nsIDOMHTMLInputElement_GetForm(This->nsinput, &nsform); - if (NS_FAILED(nsres) || nsform == NULL) { + if (NS_FAILED(nsres)) { ERR("GetForm failed: %08x, nsform: %p\n", nsres, nsform); - *p = NULL; return E_FAIL; } - nsres = nsIDOMHTMLFormElement_QueryInterface(nsform, &IID_nsIDOMNode, (void**)&form_node); - nsIDOMHTMLFormElement_Release(nsform); - assert(nsres == NS_OK); - - hres = get_node(This->element.node.doc, form_node, TRUE, &node); - nsIDOMNode_Release(form_node); - if (FAILED(hres)) - return hres; - - hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p); - - node_release(node); - return hres; + return return_nsform(&This->element, nsform, p); } static HRESULT WINAPI HTMLInputElement_put_size(IHTMLInputElement *iface, LONG v) @@ -1746,8 +1756,18 @@ static HRESULT WINAPI HTMLButtonElement_get_disabled(IHTMLButtonElement *iface, static HRESULT WINAPI HTMLButtonElement_get_form(IHTMLButtonElement *iface, IHTMLFormElement **p) { HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsIDOMHTMLFormElement *nsform; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMHTMLButtonElement_GetForm(This->nsbutton, &nsform); + if (NS_FAILED(nsres)) { + ERR("GetForm failed: %08x, nsform: %p\n", nsres, nsform); + return E_FAIL; + } + + return return_nsform(&This->element, nsform, p); } static HRESULT WINAPI HTMLButtonElement_createTextRange(IHTMLButtonElement *iface, IHTMLTxtRange **range) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 27af54d..e5275e8 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -4550,7 +4550,7 @@ static void test_select_form(IUnknown *uselect, IUnknown *uform) ok(hres == S_OK, "get_form failed: %08x\n", hres); ok(form != NULL, "form == NULL\n"); - test_form_length((IUnknown*)form, 1); + test_form_length((IUnknown*)form, 2); test_form_elements((IUnknown*)form); test_form_name((IUnknown*)form, "form_name"); @@ -6976,14 +6976,33 @@ static void _set_button_value(unsigned line, IHTMLElement *elem, const char *val _test_button_value(line, elem, value); } +#define get_button_form(a) _get_button_form(__LINE__,a) +static IHTMLFormElement *_get_button_form(unsigned line, IHTMLElement *elem) +{ + IHTMLButtonElement *button = _get_button_iface(line, (IUnknown*)elem); + IHTMLFormElement *form; + HRESULT hres; + + hres = IHTMLButtonElement_get_form(button, &form); + ok_(__FILE__,line)(hres == S_OK, "get_form failed: %08x\n", hres); + IHTMLButtonElement_Release(button); + + return form; +} + static void test_button_elem(IHTMLElement *elem) { + IHTMLFormElement *form; + test_button_name(elem, NULL); set_button_name(elem, "button name"); test_button_type(elem, "submit"); test_button_value(elem, NULL); set_button_value(elem, "val"); + form = get_button_form(elem); + ok(!form, "form != NULL\n"); + test_elem_istextedit(elem, VARIANT_TRUE); } @@ -9062,10 +9081,12 @@ static void test_elems2(IHTMLDocument2 *doc) } test_elem_set_innerhtml((IUnknown*)div, - "<form id=\"form\" name=\"form_name\"><select id=\"sform\"><option id=\"oform\"></option></select></form>"); + "<form id=\"form\" name=\"form_name\"><select id=\"sform\"><option id=\"oform\"></option></select><button id=\"btnid\"></button></form>"); elem = get_elem_by_id(doc, "sform", TRUE); elem2 = get_elem_by_id(doc, "form", TRUE); if(elem && elem2) { + IHTMLFormElement *form; + test_select_form((IUnknown*)elem, (IUnknown*)elem2); IHTMLElement_Release(elem); @@ -9074,6 +9095,14 @@ static void test_elems2(IHTMLDocument2 *doc) test_option_form((IUnknown*)elem, (IUnknown*)elem2); IHTMLElement_Release(elem); } + + elem = get_elem_by_id(doc, "btnid", TRUE); + + form = get_button_form(elem); + ok(iface_cmp((IUnknown*)form, (IUnknown*)elem2), "form != elem2\n"); + IHTMLFormElement_Release(form); + + IHTMLElement_Release(elem); IHTMLElement_Release(elem2); }
1
0
0
0
Jacek Caban : mshtml: Added IHTMLButtonElement:: value property implementation.
by Alexandre Julliard
17 Jun '16
17 Jun '16
Module: wine Branch: master Commit: 5a07f80ebeef3aa164e6172eea79348589de17b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5a07f80ebeef3aa164e6172ee…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 16 19:30:18 2016 +0200 mshtml: Added IHTMLButtonElement::value property implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlinput.c | 26 ++++++++++++++++++++++---- dlls/mshtml/tests/dom.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlinput.c b/dlls/mshtml/htmlinput.c index 0b6eb33..5e0d53b 100644 --- a/dlls/mshtml/htmlinput.c +++ b/dlls/mshtml/htmlinput.c @@ -1634,15 +1634,33 @@ static HRESULT WINAPI HTMLButtonElement_get_type(IHTMLButtonElement *iface, BSTR static HRESULT WINAPI HTMLButtonElement_put_value(IHTMLButtonElement *iface, BSTR v) { HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - FIXME("(%p)->(%s)\n", This, debugstr_w(v)); - return E_NOTIMPL; + nsAString nsstr; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_w(v)); + + nsAString_InitDepend(&nsstr, v); + nsres = nsIDOMHTMLButtonElement_SetValue(This->nsbutton, &nsstr); + nsAString_Finish(&nsstr); + if(NS_FAILED(nsres)) { + ERR("SetValue failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLButtonElement_get_value(IHTMLButtonElement *iface, BSTR *p) { HTMLButtonElement *This = impl_from_IHTMLButtonElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString value_str; + nsresult nsres; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&value_str, NULL); + nsres = nsIDOMHTMLButtonElement_GetValue(This->nsbutton, &value_str); + return return_nsstr(nsres, &value_str, p); } static HRESULT WINAPI HTMLButtonElement_put_name(IHTMLButtonElement *iface, BSTR v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 9788e56..27af54d 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -6944,11 +6944,45 @@ static void _test_button_type(unsigned line, IHTMLElement *elem, const char *ext IHTMLButtonElement_Release(button); } +#define test_button_value(a,b) _test_button_value(__LINE__,a,b) +static void _test_button_value(unsigned line, IHTMLElement *elem, const char *exvalue) +{ + IHTMLButtonElement *button = _get_button_iface(line, (IUnknown*)elem); + BSTR str; + HRESULT hres; + + hres = IHTMLButtonElement_get_value(button, &str); + ok_(__FILE__,line)(hres == S_OK, "get_value failed: %08x\n", hres); + if(exvalue) + ok_(__FILE__,line)(!strcmp_wa(str, exvalue), "value = %s, expected %s\n", wine_dbgstr_w(str), exvalue); + else + ok_(__FILE__,line)(!str, "value = %s, expected NULL\n", wine_dbgstr_w(str)); + SysFreeString(str); + + IHTMLButtonElement_Release(button); +} + +#define set_button_value(a,b) _set_button_value(__LINE__,a,b) +static void _set_button_value(unsigned line, IHTMLElement *elem, const char *value) +{ + IHTMLButtonElement *button = _get_button_iface(line, (IUnknown*)elem); + BSTR str = a2bstr(value); + HRESULT hres; + + hres = IHTMLButtonElement_put_value(button, str); + ok_(__FILE__,line)(hres == S_OK, "put_value failed: %08x\n", hres); + IHTMLButtonElement_Release(button); + + _test_button_value(line, elem, value); +} + static void test_button_elem(IHTMLElement *elem) { test_button_name(elem, NULL); set_button_name(elem, "button name"); test_button_type(elem, "submit"); + test_button_value(elem, NULL); + set_button_value(elem, "val"); test_elem_istextedit(elem, VARIANT_TRUE); }
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
60
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
Results per page:
10
25
50
100
200