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 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
674 discussions
Start a n
N
ew thread
Vincent Povirk : gdiplus: Add tests for locked image bit reading/writing.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: 88ce03103b0567540e8ff9df73fe29e4879b4680 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=88ce03103b0567540e8ff9df7…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Feb 14 17:11:58 2011 -0600 gdiplus: Add tests for locked image bit reading/writing. --- dlls/gdiplus/tests/image.c | 104 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 104 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 41d9426..fb2ec28 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -516,6 +516,7 @@ static void test_LockBits(void) GpRect rect; BitmapData bd; const INT WIDTH = 10, HEIGHT = 20; + ARGB color; bm = NULL; stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); @@ -526,15 +527,33 @@ static void test_LockBits(void) rect.Width = 4; rect.Height = 5; + stat = GdipBitmapSetPixel(bm, 2, 3, 0xffc30000); + expect(Ok, stat); + + stat = GdipBitmapSetPixel(bm, 2, 8, 0xff480000); + expect(Ok, stat); + /* read-only */ stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd); expect(Ok, stat); if (stat == Ok) { + expect(0xc3, ((BYTE*)bd.Scan0)[2]); + expect(0x48, ((BYTE*)bd.Scan0)[2 + bd.Stride * 5]); + + ((char*)bd.Scan0)[2] = 0xff; + stat = GdipBitmapUnlockBits(bm, &bd); expect(Ok, stat); } + stat = GdipBitmapGetPixel(bm, 2, 3, &color); + expect(Ok, stat); + expect(0xffff0000, color); + + stat = GdipBitmapSetPixel(bm, 2, 3, 0xffc30000); + expect(Ok, stat); + /* read-only, with NULL rect -> whole bitmap lock */ stat = GdipBitmapLockBits(bm, NULL, ImageLockModeRead, PixelFormat24bppRGB, &bd); expect(Ok, stat); @@ -542,10 +561,16 @@ static void test_LockBits(void) expect(bd.Height, HEIGHT); if (stat == Ok) { + ((char*)bd.Scan0)[2 + 2*3 + 3*bd.Stride] = 0xff; + stat = GdipBitmapUnlockBits(bm, &bd); expect(Ok, stat); } + stat = GdipBitmapGetPixel(bm, 2, 3, &color); + expect(Ok, stat); + expect(0xffff0000, color); + /* read-only, consecutive */ stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd); expect(Ok, stat); @@ -574,6 +599,81 @@ static void test_LockBits(void) stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); expect(Ok, stat); + stat = GdipBitmapSetPixel(bm, 2, 3, 0xffff0000); + expect(Ok, stat); + + stat = GdipBitmapSetPixel(bm, 2, 8, 0xffc30000); + expect(Ok, stat); + + /* write, no conversion */ + stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat24bppRGB, &bd); + expect(Ok, stat); + + if (stat == Ok) { + /* all bits are readable, inside the rect or not */ + expect(0xff, ((BYTE*)bd.Scan0)[2]); + expect(0xc3, ((BYTE*)bd.Scan0)[2 + bd.Stride * 5]); + + stat = GdipBitmapUnlockBits(bm, &bd); + expect(Ok, stat); + } + + /* read, conversion */ + stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat32bppARGB, &bd); + expect(Ok, stat); + + if (stat == Ok) { + expect(0xff, ((BYTE*)bd.Scan0)[2]); + if (0) + /* Areas outside the rectangle appear to be uninitialized */ + ok(0xc3 != ((BYTE*)bd.Scan0)[2 + bd.Stride * 5], "original image bits are readable\n"); + + ((BYTE*)bd.Scan0)[2] = 0xc3; + + stat = GdipBitmapUnlockBits(bm, &bd); + expect(Ok, stat); + } + + /* writes do not work in read mode if there was a conversion */ + stat = GdipBitmapGetPixel(bm, 2, 3, &color); + expect(Ok, stat); + expect(0xffff0000, color); + + /* read/write, conversion */ + stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead|ImageLockModeWrite, PixelFormat32bppARGB, &bd); + expect(Ok, stat); + + if (stat == Ok) { + expect(0xff, ((BYTE*)bd.Scan0)[2]); + if (0) + /* Areas outside the rectangle appear to be uninitialized */ + ok(0xc3 != ((BYTE*)bd.Scan0)[2 + bd.Stride * 5], "original image bits are readable\n"); + + stat = GdipBitmapUnlockBits(bm, &bd); + expect(Ok, stat); + } + + /* write, conversion */ + stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat32bppARGB, &bd); + expect(Ok, stat); + + if (stat == Ok) { + if (0) + { + /* This is completely uninitialized. */ + ok(0xff != ((BYTE*)bd.Scan0)[2], "original image bits are readable\n"); + ok(0xc3 != ((BYTE*)bd.Scan0)[2 + bd.Stride * 5], "original image bits are readable\n"); + } + + stat = GdipBitmapUnlockBits(bm, &bd); + expect(Ok, stat); + } + + stat = GdipDisposeImage((GpImage*)bm); + expect(Ok, stat); + stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat24bppRGB, NULL, &bm); + expect(Ok, stat); + /* write, no modification */ stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat24bppRGB, &bd); expect(Ok, stat); @@ -609,6 +709,10 @@ static void test_LockBits(void) expect(Ok, stat); } + stat = GdipBitmapGetPixel(bm, 2, 3, &color); + expect(Ok, stat); + expect(0xffff0000, color); + stat = GdipDisposeImage((GpImage*)bm); expect(Ok, stat);
1
0
0
0
Vincent Povirk : gdiplus: Add test for ImageLockModeUserInputBuf.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: 732aa89c0814c2c19632f3f0d812e5c29ffd3eb4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=732aa89c0814c2c19632f3f0d…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Feb 14 16:39:35 2011 -0600 gdiplus: Add test for ImageLockModeUserInputBuf. --- dlls/gdiplus/tests/image.c | 85 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 85 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 6e62178..41d9426 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -621,6 +621,90 @@ static void test_LockBits(void) expect(Ok, stat); } +static void test_LockBits_UserBuf(void) +{ + GpStatus stat; + GpBitmap *bm; + GpRect rect; + BitmapData bd; + const INT WIDTH = 10, HEIGHT = 20; + DWORD bits[200]; + ARGB color; + + bm = NULL; + stat = GdipCreateBitmapFromScan0(WIDTH, HEIGHT, 0, PixelFormat32bppARGB, NULL, &bm); + expect(Ok, stat); + + memset(bits, 0xaa, sizeof(bits)); + + rect.X = 2; + rect.Y = 3; + rect.Width = 4; + rect.Height = 5; + + bd.Width = 4; + bd.Height = 6; + bd.Stride = WIDTH * 4; + bd.PixelFormat = PixelFormat32bppARGB; + bd.Scan0 = &bits[2+3*WIDTH]; + bd.Reserved = 0xaaaaaaaa; + + /* read-only */ + stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead|ImageLockModeUserInputBuf, PixelFormat32bppARGB, &bd); + todo_wine expect(Ok, stat); + + expect(0xaaaaaaaa, bits[0]); + todo_wine expect(0, bits[2+3*WIDTH]); + + bits[2+3*WIDTH] = 0xdeadbeef; + + if (stat == Ok) { + stat = GdipBitmapUnlockBits(bm, &bd); + expect(Ok, stat); + } + + stat = GdipBitmapGetPixel(bm, 2, 3, &color); + expect(Ok, stat); + expect(0, color); + + /* write-only */ + stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite|ImageLockModeUserInputBuf, PixelFormat32bppARGB, &bd); + todo_wine expect(Ok, stat); + + expect(0xdeadbeef, bits[2+3*WIDTH]); + bits[2+3*WIDTH] = 0x12345678; + + if (stat == Ok) { + stat = GdipBitmapUnlockBits(bm, &bd); + expect(Ok, stat); + } + + stat = GdipBitmapGetPixel(bm, 2, 3, &color); + expect(Ok, stat); + todo_wine expect(0x12345678, color); + + bits[2+3*WIDTH] = 0; + + /* read/write */ + stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead|ImageLockModeWrite|ImageLockModeUserInputBuf, PixelFormat32bppARGB, &bd); + todo_wine expect(Ok, stat); + + todo_wine expect(0x12345678, bits[2+3*WIDTH]); + bits[2+3*WIDTH] = 0xdeadbeef; + + if (stat == Ok) { + stat = GdipBitmapUnlockBits(bm, &bd); + expect(Ok, stat); + } + + stat = GdipBitmapGetPixel(bm, 2, 3, &color); + expect(Ok, stat); + todo_wine expect(0xdeadbeef, color); + + stat = GdipDisposeImage((GpImage*)bm); + expect(Ok, stat); +} + static void test_GdipCreateBitmapFromHBITMAP(void) { GpBitmap* gpbm = NULL; @@ -2295,6 +2379,7 @@ START_TEST(image) test_SavingImages(); test_encoders(); test_LockBits(); + test_LockBits_UserBuf(); test_GdipCreateBitmapFromHBITMAP(); test_GdipGetImageFlags(); test_GdipCloneImage();
1
0
0
0
Vincent Povirk : gdiplus: Store an ImageAttributes in texture brushes.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: 86d58dc6c8c09976a53b93ee2a77ed499d205db2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=86d58dc6c8c09976a53b93ee2…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Feb 14 15:35:47 2011 -0600 gdiplus: Store an ImageAttributes in texture brushes. --- dlls/gdiplus/brush.c | 66 +++++++++++++++++++++++++++++++-------- dlls/gdiplus/gdiplus_private.h | 2 +- 2 files changed, 53 insertions(+), 15 deletions(-) diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 480d0a3..6cc78e8 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -164,8 +164,14 @@ GpStatus WINGDIPAPI GdipCloneBrush(GpBrush *brush, GpBrush **clone) GpStatus stat; GpTexture *texture = (GpTexture*)brush; GpTexture *new_texture; + UINT width, height; - stat = GdipCreateTexture(texture->image, texture->wrap, &new_texture); + stat = GdipGetImageWidth(texture->image, &width); + if (stat != Ok) return stat; + stat = GdipGetImageHeight(texture->image, &height); + if (stat != Ok) return stat; + + stat = GdipCreateTextureIA(texture->image, texture->imageattributes, 0, 0, width, height, &new_texture); if (stat == Ok) { @@ -773,7 +779,7 @@ GpStatus WINGDIPAPI GdipCreateTexture(GpImage *image, GpWrapMode wrapmode, GpTexture **texture) { UINT width, height; - GpImageAttributes attributes; + GpImageAttributes *attributes; GpStatus stat; TRACE("%p, %d %p\n", image, wrapmode, texture); @@ -785,10 +791,20 @@ GpStatus WINGDIPAPI GdipCreateTexture(GpImage *image, GpWrapMode wrapmode, if (stat != Ok) return stat; stat = GdipGetImageHeight(image, &height); if (stat != Ok) return stat; - attributes.wrap = wrapmode; - return GdipCreateTextureIA(image, &attributes, 0, 0, width, height, + stat = GdipCreateImageAttributes(&attributes); + + if (stat == Ok) + { + attributes->wrap = wrapmode; + + stat = GdipCreateTextureIA(image, attributes, 0, 0, width, height, texture); + + GdipDisposeImageAttributes(attributes); + } + + return stat; } /****************************************************************************** @@ -797,14 +813,25 @@ GpStatus WINGDIPAPI GdipCreateTexture(GpImage *image, GpWrapMode wrapmode, GpStatus WINGDIPAPI GdipCreateTexture2(GpImage *image, GpWrapMode wrapmode, REAL x, REAL y, REAL width, REAL height, GpTexture **texture) { - GpImageAttributes attributes; + GpImageAttributes *attributes; + GpStatus stat; TRACE("%p %d %f %f %f %f %p\n", image, wrapmode, x, y, width, height, texture); - attributes.wrap = wrapmode; - return GdipCreateTextureIA(image, &attributes, x, y, width, height, - texture); + stat = GdipCreateImageAttributes(&attributes); + + if (stat == Ok) + { + attributes->wrap = wrapmode; + + stat = GdipCreateTextureIA(image, attributes, x, y, width, height, + texture); + + GdipDisposeImageAttributes(attributes); + } + + return stat; } /****************************************************************************** @@ -854,16 +881,25 @@ GpStatus WINGDIPAPI GdipCreateTextureIA(GpImage *image, goto exit; } + if (imageattr) + { + status = GdipCloneImageAttributes(imageattr, &(*texture)->imageattributes); + } + else + { + status = GdipCreateImageAttributes(&(*texture)->imageattributes); + if (status == Ok) + (*texture)->imageattributes->wrap = WrapModeTile; + } + if (status != Ok) + goto exit; + (*texture)->brush.lb.lbStyle = BS_PATTERN; (*texture)->brush.lb.lbColor = 0; (*texture)->brush.lb.lbHatch = (ULONG_PTR)hbm; (*texture)->brush.gdibrush = CreateBrushIndirect(&(*texture)->brush.lb); (*texture)->brush.bt = BrushTypeTextureFill; - if (imageattr) - (*texture)->wrap = imageattr->wrap; - else - (*texture)->wrap = WrapModeTile; (*texture)->image = new_image; exit: @@ -876,6 +912,7 @@ exit: if (*texture) { GdipDeleteMatrix((*texture)->transform); + GdipDisposeImageAttributes((*texture)->imageattributes); GdipFree(*texture); *texture = NULL; } @@ -984,6 +1021,7 @@ GpStatus WINGDIPAPI GdipDeleteBrush(GpBrush *brush) case BrushTypeTextureFill: GdipDeleteMatrix(((GpTexture*)brush)->transform); GdipDisposeImage(((GpTexture*)brush)->image); + GdipDisposeImageAttributes(((GpTexture*)brush)->imageattributes); break; default: break; @@ -1277,7 +1315,7 @@ GpStatus WINGDIPAPI GdipGetTextureWrapMode(GpTexture *brush, GpWrapMode *wrapmod if(!brush || !wrapmode) return InvalidParameter; - *wrapmode = brush->wrap; + *wrapmode = brush->imageattributes->wrap; return Ok; } @@ -1757,7 +1795,7 @@ GpStatus WINGDIPAPI GdipSetTextureWrapMode(GpTexture *brush, GpWrapMode wrapmode if(!brush) return InvalidParameter; - brush->wrap = wrapmode; + brush->imageattributes->wrap = wrapmode; return Ok; } diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h index 7665714..bdfb204 100644 --- a/dlls/gdiplus/gdiplus_private.h +++ b/dlls/gdiplus/gdiplus_private.h @@ -215,7 +215,7 @@ struct GpTexture{ GpBrush brush; GpMatrix *transform; GpImage *image; - WrapMode wrap; /* not used yet */ + GpImageAttributes *imageattributes; }; struct GpPath{
1
0
0
0
Nikolay Sivov : msxml3: Add a stub IXSLProcessor.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: 8fdf64e882ba874e739c23ad1299b5d9d208cf57 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8fdf64e882ba874e739c23ad1…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Feb 12 16:40:36 2011 +0300 msxml3: Add a stub IXSLProcessor. --- dlls/msxml3/dispex.c | 1 + dlls/msxml3/msxml_private.h | 1 + dlls/msxml3/stylesheet.c | 318 ++++++++++++++++++++++++++++++++++++++++++- dlls/msxml3/tests/domdoc.c | 9 ++ 4 files changed, 327 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8fdf64e882ba874e739c2…
1
0
0
0
Nikolay Sivov : msxml3: Add basic putref_stylesheet() implementation.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: 855ca45f295bcace966a603d354f6a9cb99ab596 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=855ca45f295bcace966a603d3…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Feb 12 15:42:15 2011 +0300 msxml3: Add basic putref_stylesheet() implementation. --- dlls/msxml3/stylesheet.c | 27 ++++++++++++++- dlls/msxml3/tests/domdoc.c | 75 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 97 insertions(+), 5 deletions(-) diff --git a/dlls/msxml3/stylesheet.c b/dlls/msxml3/stylesheet.c index 8455b30..446a97f 100644 --- a/dlls/msxml3/stylesheet.c +++ b/dlls/msxml3/stylesheet.c @@ -41,6 +41,8 @@ typedef struct _xsltemplate { IXSLTemplate IXSLTemplate_iface; LONG ref; + + IXMLDOMNode *node; } xsltemplate; static inline xsltemplate *impl_from_IXSLTemplate( IXSLTemplate *iface ) @@ -48,6 +50,13 @@ static inline xsltemplate *impl_from_IXSLTemplate( IXSLTemplate *iface ) return CONTAINING_RECORD(iface, xsltemplate, IXSLTemplate_iface); } +static void xsltemplate_set_node( xsltemplate *This, IXMLDOMNode *node ) +{ + if (This->node) IXMLDOMNode_Release(This->node); + This->node = node; + if (node) IXMLDOMNode_AddRef(node); +} + static HRESULT WINAPI xsltemplate_QueryInterface( IXSLTemplate *iface, REFIID riid, @@ -85,7 +94,10 @@ static ULONG WINAPI xsltemplate_Release( IXSLTemplate *iface ) ref = InterlockedDecrement( &This->ref ); if ( ref == 0 ) + { + if (This->node) IXMLDOMNode_Release( This->node ); heap_free( This ); + } return ref; } @@ -166,8 +178,18 @@ static HRESULT WINAPI xsltemplate_putref_stylesheet( IXSLTemplate *iface, { xsltemplate *This = impl_from_IXSLTemplate( iface ); - FIXME("(%p)->(%p): stub\n", This, node); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, node); + + if (!node) + { + xsltemplate_set_node(This, NULL); + return S_OK; + } + + /* FIXME: test for document type */ + xsltemplate_set_node(This, node); + + return S_OK; } static HRESULT WINAPI xsltemplate_get_stylesheet( IXSLTemplate *iface, @@ -217,6 +239,7 @@ HRESULT XSLTemplate_create(IUnknown *pUnkOuter, void **ppObj) This->IXSLTemplate_iface.lpVtbl = &xsltemplate_vtbl; This->ref = 1; + This->node = NULL; *ppObj = &This->IXSLTemplate_iface; diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c index 34cc322..c1b5bb4 100644 --- a/dlls/msxml3/tests/domdoc.c +++ b/dlls/msxml3/tests/domdoc.c @@ -627,12 +627,10 @@ static void* _create_object(const GUID *clsid, const char *name, const IID *iid, #define _create(cls) cls, #cls #define create_document(iid) _create_object(&_create(CLSID_DOMDocument), iid, __LINE__) - #define create_document_version(v, iid) _create_object(&_create(CLSID_DOMDocument ## v), iid, __LINE__) - #define create_cache(iid) _create_object(&_create(CLSID_XMLSchemaCache), iid, __LINE__) - #define create_cache_version(v, iid) _create_object(&_create(CLSID_XMLSchemaCache ## v), iid, __LINE__) +#define create_xsltemplate(iid) _create_object(&_create(CLSID_XSLTemplate), iid, __LINE__) static BSTR alloc_str_from_narrow(const char *str) { @@ -7660,6 +7658,76 @@ static void test_get_xml(void) free_bstrs(); } +static void test_xsltemplate(void) +{ + IXSLTemplate *template; + IXMLDOMDocument *doc; + VARIANT_BOOL b; + HRESULT hr; + ULONG ref1, ref2; + + template = create_xsltemplate(&IID_IXSLTemplate); + if (!template) return; + + /* works as reset */ + hr = IXSLTemplate_putref_stylesheet(template, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + + doc = create_document(&IID_IXMLDOMDocument); + + b = VARIANT_TRUE; + hr = IXMLDOMDocument_loadXML( doc, _bstr_("<a>test</a>"), &b ); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok( b == VARIANT_TRUE, "got %d\n", b); + + /* putref with non-xsl document */ + hr = IXSLTemplate_putref_stylesheet(template, (IXMLDOMNode*)doc); + todo_wine ok(hr == E_FAIL, "got 0x%08x\n", hr); + + b = VARIANT_TRUE; + hr = IXMLDOMDocument_loadXML( doc, _bstr_(szTransformSSXML), &b ); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok( b == VARIANT_TRUE, "got %d\n", b); + + /* not a freethreaded document */ + hr = IXSLTemplate_putref_stylesheet(template, (IXMLDOMNode*)doc); + todo_wine ok(hr == E_FAIL, "got 0x%08x\n", hr); + + IXMLDOMDocument_Release(doc); + + hr = CoCreateInstance(&CLSID_FreeThreadedDOMDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IXMLDOMDocument, (void**)&doc); + if (hr != S_OK) + { + win_skip("failed to create free threaded document instance: 0x%08x\n", hr); + IXSLTemplate_Release(template); + return; + } + + b = VARIANT_TRUE; + hr = IXMLDOMDocument_loadXML( doc, _bstr_(szTransformSSXML), &b ); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok( b == VARIANT_TRUE, "got %d\n", b); + + /* freethreaded document */ + ref1 = IXMLDOMDocument_AddRef(doc); + IXMLDOMDocument_Release(doc); + hr = IXSLTemplate_putref_stylesheet(template, (IXMLDOMNode*)doc); + ok(hr == S_OK, "got 0x%08x\n", hr); + ref2 = IXMLDOMDocument_AddRef(doc); + IXMLDOMDocument_Release(doc); + ok(ref2 > ref1, "got %d\n", ref2); + + /* drop reference */ + hr = IXSLTemplate_putref_stylesheet(template, NULL); + ok(hr == S_OK, "got 0x%08x\n", hr); + ref2 = IXMLDOMDocument_AddRef(doc); + IXMLDOMDocument_Release(doc); + ok(ref2 == ref1, "got %d\n", ref2); + + IXMLDOMDocument_Release(doc); + IXSLTemplate_Release(template); +} + START_TEST(domdoc) { IXMLDOMDocument *doc; @@ -7724,6 +7792,7 @@ START_TEST(domdoc) test_createProcessingInstruction(); test_put_nodeTypedValue(); test_get_xml(); + test_xsltemplate(); CoUninitialize(); }
1
0
0
0
Juan Lang : rsaenh: Fully initialize schannel algorithm information.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: 00ba1f606c0b393cdb44c83e867d99fe28640d3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=00ba1f606c0b393cdb44c83e8…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Feb 14 10:57:51 2011 -0800 rsaenh: Fully initialize schannel algorithm information. --- dlls/rsaenh/rsaenh.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index 0acf4c7..61d1b87 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -866,6 +866,8 @@ static HCRYPTKEY new_key(HCRYPTPROV hProv, ALG_ID aiAlgid, DWORD dwFlags, CRYPTK pCryptKey->dwSaltLen = 0; memset(pCryptKey->abKeyValue, 0, sizeof(pCryptKey->abKeyValue)); memset(pCryptKey->abInitVector, 0, sizeof(pCryptKey->abInitVector)); + memset(&pCryptKey->siSChannelInfo.saEncAlg, 0, sizeof(pCryptKey->siSChannelInfo.saEncAlg)); + memset(&pCryptKey->siSChannelInfo.saMACAlg, 0, sizeof(pCryptKey->siSChannelInfo.saMACAlg)); init_data_blob(&pCryptKey->siSChannelInfo.blobClientRandom); init_data_blob(&pCryptKey->siSChannelInfo.blobServerRandom); init_data_blob(&pCryptKey->blobHmacKey);
1
0
0
0
Alexandre Julliard : cabinet: Store the CCAB data as soon as it is available.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: 28fce46de7e41656e9dde3bf16cad60905a7a5ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=28fce46de7e41656e9dde3bf1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 15 14:11:22 2011 +0100 cabinet: Store the CCAB data as soon as it is available. Also add a helper function for the cabinet header size. --- dlls/cabinet/fci.c | 478 ++++++++++------------------------------------------ 1 files changed, 86 insertions(+), 392 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=28fce46de7e41656e9dde…
1
0
0
0
Alexandre Julliard : cabinet: Add helper functions for temp file manipulations.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: 5dc4986dab19bac50c94acff3e1bfbb6f2a562ff URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5dc4986dab19bac50c94acff3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Feb 15 12:58:07 2011 +0100 cabinet: Add helper functions for temp file manipulations. --- dlls/cabinet/fci.c | 399 ++++++++++++++++++---------------------------------- 1 files changed, 138 insertions(+), 261 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5dc4986dab19bac50c94a…
1
0
0
0
Alexandre Julliard : cabinet: Store files in a list in memory instead of in a temp file.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: 21aab68fbb7e64ca5dcefdf42831e445066ddc03 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=21aab68fbb7e64ca5dcefdf42…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 14 20:32:19 2011 +0100 cabinet: Store files in a list in memory instead of in a temp file. --- dlls/cabinet/fci.c | 734 ++++++++++++++++++---------------------------------- 1 files changed, 251 insertions(+), 483 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=21aab68fbb7e64ca5dcef…
1
0
0
0
Alexandre Julliard : cabinet: Store folders in a list in memory instead of in a temp file.
by Alexandre Julliard
15 Feb '11
15 Feb '11
Module: wine Branch: master Commit: f6ebe3b8b21d5dd6f7edef6aca877448ce14324e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6ebe3b8b21d5dd6f7edef6ac…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 14 20:05:46 2011 +0100 cabinet: Store folders in a list in memory instead of in a temp file. --- dlls/cabinet/fci.c | 367 ++++++++++++++++------------------------------------ 1 files changed, 114 insertions(+), 253 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f6ebe3b8b21d5dd6f7ede…
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
68
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
Results per page:
10
25
50
100
200