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 2010
----- 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
783 discussions
Start a n
N
ew thread
Piotr Caban : oleaut32: Added partial ICreateTypeInfo2_LayOut implementation.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: 99992630bd92eb6a8a3158c7b65e85aebb140caf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99992630bd92eb6a8a3158c7b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Feb 22 01:57:30 2010 +0100 oleaut32: Added partial ICreateTypeInfo2_LayOut implementation. --- dlls/oleaut32/typelib2.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 42 insertions(+), 2 deletions(-) diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 347ab7a..0f5d57f 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -1958,8 +1958,48 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetTypeIdldesc( static HRESULT WINAPI ICreateTypeInfo2_fnLayOut( ICreateTypeInfo2* iface) { - TRACE("(%p), stub!\n", iface); -/* return E_OUTOFMEMORY; */ + ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; + CyclicList *iter, *iter2; + int i; + + TRACE("(%p)\n", iface); + + if(!This->typedata) + return S_OK; + + /* Assign IDs and VTBL entries */ + i = 0; + This->typeinfo->cbSizeVft = 0; + for(iter=This->typedata->next->next; iter!=This->typedata->next; iter=iter->next) { + if(iter->indice == MEMBERID_NIL) + FIXME("MEMBERID_NIL handling not yet implemented\n"); + + iter->u.data[0] = (iter->u.data[0]&0xffff) | (i<<16); + + if((This->typeinfo->typekind&0xf) != TKIND_MODULE) { + iter->u.data[3] = (iter->u.data[3]&0xffff0000) | This->typeinfo->cbSizeVft; + This->typeinfo->cbSizeVft += 4; + } + + /* Construct a list of elements with the same memberid */ + iter->u.data[4] = (iter->u.data[4]&0xffff) | (i<<16); + for(iter2=This->typedata->next->next; iter2!=iter; iter2=iter2->next) { + if(iter->indice == iter2->indice) { + int v1, v2; + + v1 = iter->u.data[4] >> 16; + v2 = iter2->u.data[4] >> 16; + + iter->u.data[4] = (iter->u.data[4]&0xffff) | (v2<<16); + iter2->u.data[4] = (iter2->u.data[4]&0xffff) | (v1<<16); + break; + } + } + + i++; + } + + FIXME("Typeinfo validation not implemented\n"); return S_OK; }
1
0
0
0
Roderick Colenbrander : winex11: Also take into account source offsets when a mask is around.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: d11b99b3aa6df80d2819df14a93691bbb2d8694c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d11b99b3aa6df80d2819df14a…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Mon Feb 22 00:18:34 2010 +0100 winex11: Also take into account source offsets when a mask is around. --- dlls/winex11.drv/xrender.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 5bbc886..041e151 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1862,7 +1862,7 @@ static void xrender_blit(Picture src_pict, Picture mask_pict, Picture dst_pict, if(xscale != 1.0 || yscale != 1.0) { if(mask_pict) - set_xrender_transformation(mask_pict, xscale, yscale, x_offset, y_offset); + set_xrender_transformation(mask_pict, xscale, yscale, x_src + x_offset, y_src + y_offset); else set_xrender_transformation(src_pict, xscale, yscale, x_src + x_offset, y_src + y_offset);
1
0
0
0
Roderick Colenbrander : winex11: When a mask picture is active, the source offsets should be relative to mask_pict instead of src_pict.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: c6a290fa9456cae575622a79d0f18b4f3de8fb04 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c6a290fa9456cae575622a79d…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Mon Feb 22 00:14:31 2010 +0100 winex11: When a mask picture is active, the source offsets should be relative to mask_pict instead of src_pict. --- dlls/winex11.drv/xrender.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index d3600b7..5bbc886 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1871,11 +1871,16 @@ static void xrender_blit(Picture src_pict, Picture mask_pict, Picture dst_pict, else { if(mask_pict) + { set_xrender_transformation(mask_pict, 1, 1, 0, 0); + /* Note since the 'source data' is in the mask picture, we have to pass x_src / y_src using mask_x / mask_y */ + pXRenderComposite(gdi_display, op, src_pict, mask_pict, dst_pict, 0, 0, x_src, y_src, 0, 0, width, height); + } else + { set_xrender_transformation(src_pict, 1, 1, 0, 0); - - pXRenderComposite(gdi_display, op, src_pict, mask_pict, dst_pict, x_src, y_src, 0, 0, 0, 0, width, height); + pXRenderComposite(gdi_display, op, src_pict, mask_pict, dst_pict, x_src, y_src, 0, 0, 0, 0, width, height); + } } }
1
0
0
0
Vincent Povirk : gdiplus: Add a test for GdipImageRotateFlip.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: 0c319b07d7bd37d038503dbab4cdad69c79f2d11 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0c319b07d7bd37d038503dbab…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Sun Feb 21 13:30:00 2010 -0600 gdiplus: Add a test for GdipImageRotateFlip. --- dlls/gdiplus/tests/image.c | 121 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 121 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index e7747e3..9d5c051 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -1625,6 +1625,126 @@ static void test_multiframegif(void) IStream_Release(stream); } +static void test_rotateflip(void) +{ + GpImage *bitmap; + GpStatus stat; + BYTE bits[24]; + static const BYTE orig_bits[24] = { + 0,0,0xff, 0,0xff,0, 0xff,0,0, 23,23,23, + 0xff,0xff,0, 0xff,0,0xff, 0,0xff,0xff, 23,23,23}; + UINT width, height; + ARGB color; + + memcpy(bits, orig_bits, sizeof(bits)); + stat = GdipCreateBitmapFromScan0(3, 2, 12, PixelFormat24bppRGB, bits, (GpBitmap**)&bitmap); + expect(Ok, stat); + + stat = GdipImageRotateFlip(bitmap, Rotate90FlipNone); + todo_wine expect(Ok, stat); + + stat = GdipGetImageWidth(bitmap, &width); + expect(Ok, stat); + stat = GdipGetImageHeight(bitmap, &height); + expect(Ok, stat); + todo_wine expect(2, width); + todo_wine expect(3, height); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 0, &color); + expect(Ok, stat); + todo_wine expect(0xff00ffff, color); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 1, 0, &color); + expect(Ok, stat); + todo_wine expect(0xffff0000, color); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 2, &color); + todo_wine expect(Ok, stat); + todo_wine expect(0xffffff00, color); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 1, 2, &color); + todo_wine expect(Ok, stat); + todo_wine expect(0xff0000ff, color); + + expect(0, bits[0]); + expect(0, bits[1]); + expect(0xff, bits[2]); + + GdipDisposeImage(bitmap); + + memcpy(bits, orig_bits, sizeof(bits)); + stat = GdipCreateBitmapFromScan0(3, 2, 12, PixelFormat24bppRGB, bits, (GpBitmap**)&bitmap); + expect(Ok, stat); + + stat = GdipImageRotateFlip(bitmap, RotateNoneFlipX); + todo_wine expect(Ok, stat); + + stat = GdipGetImageWidth(bitmap, &width); + expect(Ok, stat); + stat = GdipGetImageHeight(bitmap, &height); + expect(Ok, stat); + expect(3, width); + expect(2, height); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 0, &color); + expect(Ok, stat); + todo_wine expect(0xff0000ff, color); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 2, 0, &color); + expect(Ok, stat); + todo_wine expect(0xffff0000, color); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 1, &color); + expect(Ok, stat); + todo_wine expect(0xffffff00, color); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 2, 1, &color); + expect(Ok, stat); + todo_wine expect(0xff00ffff, color); + + expect(0, bits[0]); + expect(0, bits[1]); + expect(0xff, bits[2]); + + GdipDisposeImage(bitmap); + + memcpy(bits, orig_bits, sizeof(bits)); + stat = GdipCreateBitmapFromScan0(3, 2, 12, PixelFormat24bppRGB, bits, (GpBitmap**)&bitmap); + expect(Ok, stat); + + stat = GdipImageRotateFlip(bitmap, RotateNoneFlipY); + todo_wine expect(Ok, stat); + + stat = GdipGetImageWidth(bitmap, &width); + expect(Ok, stat); + stat = GdipGetImageHeight(bitmap, &height); + expect(Ok, stat); + expect(3, width); + expect(2, height); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 0, &color); + expect(Ok, stat); + todo_wine expect(0xff00ffff, color); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 2, 0, &color); + expect(Ok, stat); + todo_wine expect(0xffffff00, color); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 0, 1, &color); + expect(Ok, stat); + todo_wine expect(0xffff0000, color); + + stat = GdipBitmapGetPixel((GpBitmap*)bitmap, 2, 1, &color); + expect(Ok, stat); + todo_wine expect(0xff0000ff, color); + + expect(0, bits[0]); + expect(0, bits[1]); + expect(0xff, bits[2]); + + GdipDisposeImage(bitmap); +} + START_TEST(image) { struct GdiplusStartupInput gdiplusStartupInput; @@ -1659,6 +1779,7 @@ START_TEST(image) test_colormatrix(); test_gamma(); test_multiframegif(); + test_rotateflip(); GdiplusShutdown(gdiplusToken); }
1
0
0
0
Jacek Caban : mshtml: Get rid of nsIWineURI interface.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: 6b46c9e5ade2e113177c64a99e4516ca5bed7f8f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b46c9e5ade2e113177c64a99…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Feb 21 21:10:15 2010 +0100 mshtml: Get rid of nsIWineURI interface. --- dlls/mshtml/nsiface.idl | 15 ----- dlls/mshtml/nsio.c | 138 ++++++++++++++++++++++++----------------------- 2 files changed, 70 insertions(+), 83 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6b46c9e5ade2e113177c6…
1
0
0
0
Jacek Caban : mshtml: Get rid of nsIWineURI::[GS]etNSContainer.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: 0f6f96ea63b7539a1ffee16468d752c9a3d21a8a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f6f96ea63b7539a1ffee1646…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Feb 21 21:09:11 2010 +0100 mshtml: Get rid of nsIWineURI::[GS]etNSContainer. --- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/nsiface.idl | 4 --- dlls/mshtml/nsio.c | 55 +++++++++++++----------------------------- 3 files changed, 18 insertions(+), 42 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 604c80a..778f290 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -176,6 +176,7 @@ typedef struct HTMLWindow HTMLWindow; typedef struct HTMLDocumentNode HTMLDocumentNode; typedef struct HTMLDocumentObj HTMLDocumentObj; typedef struct HTMLFrameBase HTMLFrameBase; +typedef struct NSContainer NSContainer; typedef enum { SCRIPTMODE_GECKO, diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index a2bee26..0ab0f7c 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -2834,8 +2834,4 @@ interface nsIDocumentObserver : nsIMutationObserver ] interface nsIWineURI : nsIURL { - typedef struct NSContainer NSContainer; - - nsresult GetNSContainer(NSContainer **aNSContainer); - nsresult SetNSContainer(NSContainer *aNSContainer); } diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index c2652c5..2d1ae9e 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -268,6 +268,20 @@ HRESULT set_wine_url(nsWineURI *This, LPCWSTR url) return S_OK; } +static void set_uri_nscontainer(nsWineURI *This, NSContainer *nscontainer) +{ + if(This->container) { + if(This->container == nscontainer) + return; + TRACE("Changing %p -> %p\n", This->container, nscontainer); + nsIWebBrowserChrome_Release(NSWBCHROME(This->container)); + } + + if(nscontainer) + nsIWebBrowserChrome_AddRef(NSWBCHROME(nscontainer)); + This->container = nscontainer; +} + static void set_uri_window(nsWineURI *This, HTMLWindow *window) { if(This->window_ref) { @@ -282,7 +296,7 @@ static void set_uri_window(nsWineURI *This, HTMLWindow *window) This->window_ref = window->window_ref; if(window->doc_obj) - nsIWineURI_SetNSContainer(NSWINEURI(This), window->doc_obj->nscontainer); + set_uri_nscontainer(This, window->doc_obj->nscontainer); }else { This->window_ref = NULL; } @@ -2096,39 +2110,6 @@ static nsresult NSAPI nsURL_GetRelativeSpec(nsIWineURI *iface, nsIURI *aURIToCom return NS_ERROR_NOT_IMPLEMENTED; } -static nsresult NSAPI nsURI_GetNSContainer(nsIWineURI *iface, NSContainer **aContainer) -{ - nsWineURI *This = NSURI_THIS(iface); - - TRACE("(%p)->(%p)\n", This, aContainer); - - if(This->container) - nsIWebBrowserChrome_AddRef(NSWBCHROME(This->container)); - *aContainer = This->container; - - return NS_OK; -} - -static nsresult NSAPI nsURI_SetNSContainer(nsIWineURI *iface, NSContainer *aContainer) -{ - nsWineURI *This = NSURI_THIS(iface); - - TRACE("(%p)->(%p)\n", This, aContainer); - - if(This->container) { - if(This->container == aContainer) - return NS_OK; - TRACE("Changing %p -> %p\n", This->container, aContainer); - nsIWebBrowserChrome_Release(NSWBCHROME(This->container)); - } - - if(aContainer) - nsIWebBrowserChrome_AddRef(NSWBCHROME(aContainer)); - This->container = aContainer; - - return NS_OK; -} - #undef NSURI_THIS static const nsIWineURIVtbl nsWineURIVtbl = { @@ -2178,9 +2159,7 @@ static const nsIWineURIVtbl nsWineURIVtbl = { nsURL_GetFileExtension, nsURL_SetFileExtension, nsURL_GetCommonBaseSpec, - nsURL_GetRelativeSpec, - nsURI_GetNSContainer, - nsURI_SetNSContainer, + nsURL_GetRelativeSpec }; static nsresult create_uri(nsIURI *uri, HTMLWindow *window, NSContainer *container, nsWineURI **_retval) @@ -2191,7 +2170,7 @@ static nsresult create_uri(nsIURI *uri, HTMLWindow *window, NSContainer *contain ret->ref = 1; ret->uri = uri; - nsIWineURI_SetNSContainer(NSWINEURI(ret), container); + set_uri_nscontainer(ret, container); set_uri_window(ret, window); if(uri)
1
0
0
0
Jacek Caban : mshtml: Get rid of nsIWineURI::[GS]etWindow.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: a42bc25d554aef412135af589897b1f0eb6c2f65 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a42bc25d554aef412135af589…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Feb 21 21:08:39 2010 +0100 mshtml: Get rid of nsIWineURI::[GS]etWindow. --- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/nsiface.idl | 3 - dlls/mshtml/nsio.c | 90 +++++++++++++++++------------------------- 3 files changed, 37 insertions(+), 57 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index c22c89a..604c80a 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -172,6 +172,7 @@ BOOL dispex_query_interface(DispatchEx*,REFIID,void**); HRESULT dispex_get_dprop_ref(DispatchEx*,const WCHAR*,BOOL,VARIANT**); HRESULT get_dispids(tid_t,DWORD*,DISPID**); +typedef struct HTMLWindow HTMLWindow; typedef struct HTMLDocumentNode HTMLDocumentNode; typedef struct HTMLDocumentObj HTMLDocumentObj; typedef struct HTMLFrameBase HTMLFrameBase; diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl index 26e9ae1..a2bee26 100644 --- a/dlls/mshtml/nsiface.idl +++ b/dlls/mshtml/nsiface.idl @@ -2835,10 +2835,7 @@ interface nsIDocumentObserver : nsIMutationObserver interface nsIWineURI : nsIURL { typedef struct NSContainer NSContainer; - typedef struct HTMLWindow HTMLWindow; nsresult GetNSContainer(NSContainer **aNSContainer); nsresult SetNSContainer(NSContainer *aNSContainer); - nsresult GetWindow(HTMLWindow **aHTMLWindow); - nsresult SetWindow(HTMLWindow *aHTMLWindow); } diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 081019a..c2652c5 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -268,6 +268,26 @@ HRESULT set_wine_url(nsWineURI *This, LPCWSTR url) return S_OK; } +static void set_uri_window(nsWineURI *This, HTMLWindow *window) +{ + if(This->window_ref) { + if(This->window_ref->window == window) + return; + TRACE("Changing %p -> %p\n", This->window_ref->window, window); + windowref_release(This->window_ref); + } + + if(window) { + windowref_addref(window->window_ref); + This->window_ref = window->window_ref; + + if(window->doc_obj) + nsIWineURI_SetNSContainer(NSWINEURI(This), window->doc_obj->nscontainer); + }else { + This->window_ref = NULL; + } +} + static inline BOOL is_http_channel(nsChannel *This) { return This->url_scheme == URL_SCHEME_HTTP || This->url_scheme == URL_SCHEME_HTTP; @@ -676,7 +696,7 @@ static HTMLWindow *get_window_from_load_group(nsChannel *This) HTMLWindow *window; nsIChannel *channel; nsIRequest *req; - nsIWineURI *wine_uri; + nsWineURI *wine_uri; nsIURI *uri; nsresult nsres; @@ -710,8 +730,10 @@ static HTMLWindow *get_window_from_load_group(nsChannel *This) return NULL; } - nsIWineURI_GetWindow(wine_uri, &window); - nsIWineURI_Release(wine_uri); + window = wine_uri->window_ref ? wine_uri->window_ref->window : NULL; + if(window) + IHTMLWindow2_AddRef(HTMLWINDOW2(window)); + nsIURI_Release(NSURI(wine_uri)); return window; } @@ -838,7 +860,7 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen if(This->uri->is_doc_uri) { window = get_channel_window(This); if(window) { - nsIWineURI_SetWindow(NSWINEURI(This->uri), window); + set_uri_window(This->uri, window); }else if(This->uri->container) { BOOL b; @@ -854,12 +876,13 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen } if(!window) { - nsIWineURI_GetWindow(NSWINEURI(This->uri), &window); - - if(!window && This->load_group) { + if(This->uri->window_ref && This->uri->window_ref->window) { + window = This->uri->window_ref->window; + IHTMLWindow2_AddRef(HTMLWINDOW2(window)); + }else if(This->load_group) { window = get_window_from_load_group(This); if(window) - nsIWineURI_SetWindow(NSWINEURI(This->uri), window); + set_uri_window(This->uri, window); } } @@ -2106,48 +2129,6 @@ static nsresult NSAPI nsURI_SetNSContainer(nsIWineURI *iface, NSContainer *aCont return NS_OK; } -static nsresult NSAPI nsURI_GetWindow(nsIWineURI *iface, HTMLWindow **aHTMLWindow) -{ - nsWineURI *This = NSURI_THIS(iface); - - TRACE("(%p)->(%p)\n", This, aHTMLWindow); - - if(This->window_ref && This->window_ref->window) { - IHTMLWindow2_AddRef(HTMLWINDOW2(This->window_ref->window)); - *aHTMLWindow = This->window_ref->window; - }else { - *aHTMLWindow = NULL; - } - - return NS_OK; -} - -static nsresult NSAPI nsURI_SetWindow(nsIWineURI *iface, HTMLWindow *aHTMLWindow) -{ - nsWineURI *This = NSURI_THIS(iface); - - TRACE("(%p)->(%p)\n", This, aHTMLWindow); - - if(This->window_ref) { - if(This->window_ref->window == aHTMLWindow) - return NS_OK; - TRACE("Changing %p -> %p\n", This->window_ref->window, aHTMLWindow); - windowref_release(This->window_ref); - } - - if(aHTMLWindow) { - windowref_addref(aHTMLWindow->window_ref); - This->window_ref = aHTMLWindow->window_ref; - - if(aHTMLWindow->doc_obj) - nsIWineURI_SetNSContainer(NSWINEURI(This), aHTMLWindow->doc_obj->nscontainer); - }else { - This->window_ref = NULL; - } - - return NS_OK; -} - #undef NSURI_THIS static const nsIWineURIVtbl nsWineURIVtbl = { @@ -2200,8 +2181,6 @@ static const nsIWineURIVtbl nsWineURIVtbl = { nsURL_GetRelativeSpec, nsURI_GetNSContainer, nsURI_SetNSContainer, - nsURI_GetWindow, - nsURI_SetWindow, }; static nsresult create_uri(nsIURI *uri, HTMLWindow *window, NSContainer *container, nsWineURI **_retval) @@ -2213,7 +2192,7 @@ static nsresult create_uri(nsIURI *uri, HTMLWindow *window, NSContainer *contain ret->uri = uri; nsIWineURI_SetNSContainer(NSWINEURI(ret), container); - nsIWineURI_SetWindow(NSWINEURI(ret), window); + set_uri_window(ret, window); if(uri) nsIURI_QueryInterface(uri, &IID_nsIURL, (void**)&ret->nsurl); @@ -2492,7 +2471,10 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString * nsres = nsIURI_QueryInterface(aBaseURI, &IID_nsIWineURI, (void**)&base_wine_uri); if(NS_SUCCEEDED(nsres)) { base_wine_url = base_wine_uri->wine_url; - nsIWineURI_GetWindow(NSWINEURI(base_wine_uri), &window); + if(base_wine_uri->window_ref && base_wine_uri->window_ref->window) { + window = base_wine_uri->window_ref->window; + IHTMLWindow2_AddRef(HTMLWINDOW2(window)); + } TRACE("base url: %s window: %p\n", debugstr_w(base_wine_url), window); }else if(FAILED(ParseURLA(spec, &parsed_url))) { TRACE("not wraping\n");
1
0
0
0
Jacek Caban : mshtml: Get rid of most nsIWineURI methods.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: 043af028b927ffcafb9cf138babd19618542ae7f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=043af028b927ffcafb9cf138b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Feb 21 21:07:43 2010 +0100 mshtml: Get rid of most nsIWineURI methods. --- dlls/mshtml/mshtml_private.h | 2 + dlls/mshtml/nsiface.idl | 7 -- dlls/mshtml/nsio.c | 169 ++++++++++++----------------------------- 3 files changed, 52 insertions(+), 126 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=043af028b927ffcafb9cf…
1
0
0
0
Jacek Caban : mshtml: Use nsWineURL structure directly in load_nsuri.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: ba1db4c199ad19bf65e0e931cb83d8cac9819986 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba1db4c199ad19bf65e0e931c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Feb 21 21:06:51 2010 +0100 mshtml: Use nsWineURL structure directly in load_nsuri. --- dlls/mshtml/mshtml_private.h | 4 +- dlls/mshtml/navigate.c | 35 ++---------------------- dlls/mshtml/nsio.c | 60 ++++++++++++++++++++++++++++++++--------- dlls/mshtml/persist.c | 7 ++--- 4 files changed, 55 insertions(+), 51 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 827b812..0b665bc 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -701,12 +701,12 @@ void release_nsio(void); BOOL install_wine_gecko(BOOL); HRESULT nsuri_to_url(LPCWSTR,BOOL,BSTR*); -HRESULT create_doc_uri(HTMLWindow*,WCHAR*,nsIWineURI**); +HRESULT create_doc_uri(HTMLWindow*,WCHAR*,nsWineURI**); +HRESULT load_nsuri(HTMLWindow*,nsWineURI*,nsChannelBSC*,DWORD); HRESULT hlink_frame_navigate(HTMLDocument*,LPCWSTR,nsIInputStream*,DWORD); HRESULT navigate_url(HTMLWindow*,const WCHAR*,const WCHAR*); HRESULT set_frame_doc(HTMLFrameBase*,nsIDOMDocument*); -HRESULT load_nsuri(HTMLWindow*,nsIWineURI*,DWORD); void call_property_onchanged(ConnectionPoint*,DISPID); HRESULT call_set_active_object(IOleInPlaceUIWindow*,IOleInPlaceActiveObject*); diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index b0620d5..f660c98 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -1253,39 +1253,10 @@ HRESULT hlink_frame_navigate(HTMLDocument *doc, LPCWSTR url, return hres; } -HRESULT load_nsuri(HTMLWindow *window, nsIWineURI *uri, DWORD flags) -{ - nsIWebNavigation *web_navigation; - nsIDocShell *doc_shell; - nsresult nsres; - - nsres = get_nsinterface((nsISupports*)window->nswindow, &IID_nsIWebNavigation, (void**)&web_navigation); - if(NS_FAILED(nsres)) { - ERR("Could not get nsIWebNavigation interface: %08x\n", nsres); - return E_FAIL; - } - - nsres = nsIWebNavigation_QueryInterface(web_navigation, &IID_nsIDocShell, (void**)&doc_shell); - nsIWebNavigation_Release(web_navigation); - if(NS_FAILED(nsres)) { - ERR("Could not get nsIDocShell: %08x\n", nsres); - return E_FAIL; - } - - nsres = nsIDocShell_LoadURI(doc_shell, (nsIURI*)uri, NULL, flags, FALSE); - nsIDocShell_Release(doc_shell); - if(NS_FAILED(nsres)) { - WARN("LoadURI failed: %08x\n", nsres); - return E_FAIL; - } - - return S_OK; -} - HRESULT navigate_url(HTMLWindow *window, const WCHAR *new_url, const WCHAR *base_url) { WCHAR url[INTERNET_MAX_URL_LENGTH]; - nsIWineURI *uri; + nsWineURI *uri; HRESULT hres; if(!new_url) { @@ -1323,7 +1294,7 @@ HRESULT navigate_url(HTMLWindow *window, const WCHAR *new_url, const WCHAR *base if(FAILED(hres)) return hres; - hres = load_nsuri(window, uri, LOAD_FLAGS_NONE); - nsIWineURI_Release(uri); + hres = load_nsuri(window, uri, NULL, LOAD_FLAGS_NONE); + nsISupports_Release((nsISupports*)uri); return hres; } diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index c286673..b2d18c1 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -67,7 +67,7 @@ struct nsWineURI { #define NSURI(x) ((nsIURI*) &(x)->lpWineURIVtbl) #define NSWINEURI(x) ((nsIWineURI*) &(x)->lpWineURIVtbl) -static nsresult create_uri(nsIURI*,HTMLWindow*,NSContainer*,nsIWineURI**); +static nsresult create_uri(nsIURI*,HTMLWindow*,NSContainer*,nsWineURI**); static const char *debugstr_nsacstr(const nsACString *nsstr) { @@ -150,6 +150,38 @@ static BOOL before_async_open(nsChannel *channel, NSContainer *container) return hres != S_OK; } +HRESULT load_nsuri(HTMLWindow *window, nsWineURI *uri, nsChannelBSC *channelbsc, DWORD flags) +{ + nsIWebNavigation *web_navigation; + nsIDocShell *doc_shell; + nsresult nsres; + + nsres = get_nsinterface((nsISupports*)window->nswindow, &IID_nsIWebNavigation, (void**)&web_navigation); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIWebNavigation interface: %08x\n", nsres); + return E_FAIL; + } + + nsres = nsIWebNavigation_QueryInterface(web_navigation, &IID_nsIDocShell, (void**)&doc_shell); + nsIWebNavigation_Release(web_navigation); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDocShell: %08x\n", nsres); + return E_FAIL; + } + + + uri->channel_bsc = channelbsc; + nsres = nsIDocShell_LoadURI(doc_shell, NSURI(uri), NULL, flags, FALSE); + uri->channel_bsc = NULL; + nsIDocShell_Release(doc_shell); + if(NS_FAILED(nsres)) { + WARN("LoadURI failed: %08x\n", nsres); + return E_FAIL; + } + + return S_OK; +} + static BOOL translate_url(HTMLDocumentObj *doc, nsWineURI *uri) { OLECHAR *new_url = NULL, *url; @@ -200,6 +232,7 @@ nsresult on_start_uri_open(NSContainer *nscontainer, nsIURI *uri, PRBool *_retva nsIURI_Release(NSURI(wine_uri)); return NS_OK; } + HRESULT set_wine_url(nsWineURI *This, LPCWSTR url) { nsIWineURI_SetWineURL(NSWINEURI(This), url); @@ -1654,7 +1687,7 @@ static nsresult NSAPI nsURI_Clone(nsIWineURI *iface, nsIURI **_retval) { nsWineURI *This = NSURI_THIS(iface); nsIURI *nsuri = NULL; - nsIWineURI *wine_uri; + nsWineURI *wine_uri; nsresult nsres; TRACE("(%p)->(%p)\n", This, _retval); @@ -1673,8 +1706,8 @@ static nsresult NSAPI nsURI_Clone(nsIWineURI *iface, nsIURI **_retval) return nsres; } - *_retval = (nsIURI*)wine_uri; - return nsIWineURI_SetWineURL(wine_uri, This->wine_url); + *_retval = NSURI(wine_uri); + return nsIWineURI_SetWineURL(NSWINEURI(wine_uri), This->wine_url); } static nsresult NSAPI nsURI_Resolve(nsIWineURI *iface, const nsACString *arelativePath, @@ -2239,7 +2272,7 @@ static const nsIWineURIVtbl nsWineURIVtbl = { nsURI_SetWineURL }; -static nsresult create_uri(nsIURI *uri, HTMLWindow *window, NSContainer *container, nsIWineURI **_retval) +static nsresult create_uri(nsIURI *uri, HTMLWindow *window, NSContainer *container, nsWineURI **_retval) { nsWineURI *ret = heap_alloc_zero(sizeof(nsWineURI)); @@ -2256,21 +2289,21 @@ static nsresult create_uri(nsIURI *uri, HTMLWindow *window, NSContainer *contain ret->nsurl = NULL; TRACE("retval=%p\n", ret); - *_retval = NSWINEURI(ret); + *_retval = ret; return NS_OK; } -HRESULT create_doc_uri(HTMLWindow *window, WCHAR *url, nsIWineURI **ret) +HRESULT create_doc_uri(HTMLWindow *window, WCHAR *url, nsWineURI **ret) { - nsIWineURI *uri; + nsWineURI *uri; nsresult nsres; nsres = create_uri(NULL, window, window->doc_obj->nscontainer, &uri); if(NS_FAILED(nsres)) return E_FAIL; - nsIWineURI_SetWineURL(uri, url); - nsIWineURI_SetIsDocumentURI(uri, TRUE); + nsIWineURI_SetWineURL(NSWINEURI(uri), url); + uri->is_doc_uri = TRUE; *ret = uri; return S_OK; @@ -2504,7 +2537,8 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString * HTMLWindow *window = NULL; nsIURI *uri = NULL; LPCWSTR base_wine_url = NULL; - nsIWineURI *base_wine_uri = NULL, *wine_uri; + nsIWineURI *base_wine_uri = NULL; + nsWineURI *wine_uri; BOOL is_wine_uri = FALSE; nsresult nsres; @@ -2558,14 +2592,14 @@ static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString * URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, url, sizeof(url)/sizeof(WCHAR), &len, 0); if(SUCCEEDED(hres)) - nsIWineURI_SetWineURL(wine_uri, url); + set_wine_url(wine_uri, url); else WARN("CoCombineUrl failed: %08x\n", hres); }else if(is_wine_uri) { WCHAR url[INTERNET_MAX_URL_LENGTH]; MultiByteToWideChar(CP_ACP, 0, spec, -1, url, sizeof(url)/sizeof(WCHAR)); - nsIWineURI_SetWineURL(wine_uri, url); + set_wine_url(wine_uri, url); } if(base_wine_uri) diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index d3014b8..86b0f02 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -172,7 +172,7 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO LPOLESTR url = NULL; docobj_task_t *task; download_proc_task_t *download_task; - nsIWineURI *nsuri; + nsWineURI *nsuri; HRESULT hres; if(pibc) { @@ -261,9 +261,8 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO bscallback = create_channelbsc(mon); - nsIWineURI_SetChannelBSC(nsuri, bscallback); - hres = load_nsuri(This->window, nsuri, LOAD_INITIAL_DOCUMENT_URI); - nsIWineURI_SetChannelBSC(nsuri, NULL); + hres = load_nsuri(This->window, nsuri, bscallback, LOAD_INITIAL_DOCUMENT_URI); + nsISupports_Release((nsISupports*)nsuri); /* FIXME */ if(SUCCEEDED(hres)) set_window_bscallback(This->window, bscallback); IUnknown_Release((IUnknown*)bscallback);
1
0
0
0
Jacek Caban : mshtml: Moved OnStartURIOpen implementation to nsio.c.
by Alexandre Julliard
22 Feb '10
22 Feb '10
Module: wine Branch: master Commit: 61121cefcbafe20dabe4e035067a91d0ceb36a2a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=61121cefcbafe20dabe4e0350…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Feb 21 21:05:59 2010 +0100 mshtml: Moved OnStartURIOpen implementation to nsio.c. --- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/nsembed.c | 48 ++------------------------------------- dlls/mshtml/nsio.c | 50 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 45 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 019f66f..827b812 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -437,6 +437,7 @@ struct NSContainer { typedef struct nsWineURI nsWineURI; HRESULT set_wine_url(nsWineURI*,LPCWSTR); +nsresult on_start_uri_open(NSContainer*,nsIURI*,PRBool*); typedef struct { const nsIHttpChannelVtbl *lpHttpChannelVtbl; diff --git a/dlls/mshtml/nsembed.c b/dlls/mshtml/nsembed.c index 3415657..fa8aa41 100644 --- a/dlls/mshtml/nsembed.c +++ b/dlls/mshtml/nsembed.c @@ -1124,41 +1124,12 @@ static nsrefcnt NSAPI nsURIContentListener_Release(nsIURIContentListener *iface) return nsIWebBrowserChrome_Release(NSWBCHROME(This)); } -static BOOL translate_url(HTMLDocumentObj *doc, nsIWineURI *nsuri) -{ - OLECHAR *new_url = NULL, *url; - BOOL ret = FALSE; - LPCWSTR wine_url; - HRESULT hres; - - if(!doc->hostui) - return FALSE; - - nsIWineURI_GetWineURL(nsuri, &wine_url); - - url = heap_strdupW(wine_url); - hres = IDocHostUIHandler_TranslateUrl(doc->hostui, 0, url, &new_url); - heap_free(url); - if(hres != S_OK || !new_url) - return FALSE; - - if(strcmpW(url, new_url)) { - FIXME("TranslateUrl returned new URL %s -> %s\n", debugstr_w(url), debugstr_w(new_url)); - ret = TRUE; - } - - CoTaskMemFree(new_url); - return ret; -} - static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener *iface, nsIURI *aURI, PRBool *_retval) { NSContainer *This = NSURICL_THIS(iface); - nsIWineURI *wine_uri; nsACString spec_str; const char *spec; - BOOL is_doc_uri; nsresult nsres; nsACString_Init(&spec_str, NULL); @@ -1169,22 +1140,9 @@ static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener nsACString_Finish(&spec_str); - nsres = nsIURI_QueryInterface(aURI, &IID_nsIWineURI, (void**)&wine_uri); - if(NS_FAILED(nsres)) { - WARN("Could not get nsIWineURI interface: %08x\n", nsres); - return NS_ERROR_NOT_IMPLEMENTED; - } - - nsIWineURI_GetIsDocumentURI(wine_uri, &is_doc_uri); - - if(!is_doc_uri) { - nsIWineURI_SetNSContainer(wine_uri, This); - nsIWineURI_SetIsDocumentURI(wine_uri, TRUE); - - *_retval = translate_url(This->doc->basedoc.doc_obj, wine_uri); - } - - nsIWineURI_Release(wine_uri); + nsres = on_start_uri_open(This, aURI, _retval); + if(NS_FAILED(nsres)) + return nsres; return !*_retval && This->content_listener ? nsIURIContentListener_OnStartURIOpen(This->content_listener, aURI, _retval) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index b9e1e60..c286673 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -150,6 +150,56 @@ static BOOL before_async_open(nsChannel *channel, NSContainer *container) return hres != S_OK; } +static BOOL translate_url(HTMLDocumentObj *doc, nsWineURI *uri) +{ + OLECHAR *new_url = NULL, *url; + BOOL ret = FALSE; + HRESULT hres; + + if(!doc->hostui) + return FALSE; + + url = heap_strdupW(uri->wine_url); + hres = IDocHostUIHandler_TranslateUrl(doc->hostui, 0, url, &new_url); + heap_free(url); + if(hres != S_OK || !new_url) + return FALSE; + + if(strcmpW(url, new_url)) { + FIXME("TranslateUrl returned new URL %s -> %s\n", debugstr_w(url), debugstr_w(new_url)); + ret = TRUE; + } + + CoTaskMemFree(new_url); + return ret; +} + +nsresult on_start_uri_open(NSContainer *nscontainer, nsIURI *uri, PRBool *_retval) +{ + nsWineURI *wine_uri; + nsresult nsres; + + *_retval = FALSE; + + nsres = nsIURI_QueryInterface(uri, &IID_nsIWineURI, (void**)&wine_uri); + if(NS_FAILED(nsres)) { + WARN("Could not get nsWineURI: %08x\n", nsres); + return NS_ERROR_NOT_IMPLEMENTED; + } + + if(!wine_uri->is_doc_uri) { + if(!wine_uri->container) { + nsIWebBrowserChrome_AddRef(NSWBCHROME(nscontainer)); + wine_uri->container = nscontainer; + } + + wine_uri->is_doc_uri = TRUE; + *_retval = translate_url(nscontainer->doc->basedoc.doc_obj, wine_uri); + } + + nsIURI_Release(NSURI(wine_uri)); + return NS_OK; +} HRESULT set_wine_url(nsWineURI *This, LPCWSTR url) { nsIWineURI_SetWineURL(NSWINEURI(This), url);
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
79
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
Results per page:
10
25
50
100
200