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
March 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
849 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Try loading library in IInternetProtocolInfo:: ParseUrl(PARSE_INTERNET_URL) for res protocol to work around library name difference for winelib libraries .
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: 643c66ba752a6274178cd9c574896395cf063f7c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=643c66ba752a6274178cd9c57…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Mar 29 12:50:52 2011 +0200 mshtml: Try loading library in IInternetProtocolInfo::ParseUrl(PARSE_INTERNET_URL) for res protocol to work around library name difference for winelib libraries. --- dlls/mshtml/protocol.c | 16 ++++++++++++++-- dlls/mshtml/tests/protocol.c | 6 ++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/protocol.c b/dlls/mshtml/protocol.c index dad93ba..456c3fd 100644 --- a/dlls/mshtml/protocol.c +++ b/dlls/mshtml/protocol.c @@ -865,8 +865,20 @@ static HRESULT WINAPI ResProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPC len = SearchPathW(NULL, file_part, NULL, sizeof(full_path)/sizeof(WCHAR), full_path, NULL); if(!len) { - WARN("Could not find file %s\n", debugstr_w(file_part)); - return MK_E_SYNTAX; + HMODULE module; + + /* SearchPath does not work well with winelib files (like our test executable), + * so we also try to load the library here */ + module = LoadLibraryExW(file_part, NULL, LOAD_LIBRARY_AS_DATAFILE); + if(!module) { + WARN("Could not find file %s\n", debugstr_w(file_part)); + return MK_E_SYNTAX; + } + + len = GetModuleFileNameW(module, full_path, sizeof(full_path)/sizeof(WCHAR)); + FreeLibrary(module); + if(!len) + return E_FAIL; } size = sizeof(wszFile)/sizeof(WCHAR) + len + 1; diff --git a/dlls/mshtml/tests/protocol.c b/dlls/mshtml/tests/protocol.c index 7504927..07f424f 100644 --- a/dlls/mshtml/tests/protocol.c +++ b/dlls/mshtml/tests/protocol.c @@ -315,6 +315,8 @@ static void test_res_protocol(void) {'r','e','s',':','/','/','x','x','.','d','l','l','/','b','l','a','n','k','.','h','t','m',0}; static const WCHAR wrong_url5[] = {'r','e','s',':','/','/','s','h','t','m','l','.','d','l','l','/','b','l','a','n','k','.','h','t','m',0}; + static const WCHAR wrong_url6[] = + {'r','e','s',':','/','/','c',':','\\','d','i','r','\\','f','i','l','e','.','d','l','l','/','b','l','a','n','k','.','h','t','m',0}; static const WCHAR mshtml_dllW[] = {'m','s','h','t','m','l','.','d','l','l',0}; hres = CoGetClassObject(&CLSID_ResProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk); @@ -366,6 +368,10 @@ static void test_res_protocol(void) sizeof(buf)/sizeof(buf[0]), &size, 0); ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres); + hres = IInternetProtocolInfo_ParseUrl(protocol_info, wrong_url6, PARSE_SECURITY_URL, 0, buf, + sizeof(buf)/sizeof(buf[0]), &size, 0); + ok(hres == MK_E_SYNTAX, "ParseUrl failed: %08x, expected MK_E_SYNTAX\n", hres); + size = 0xdeadbeef; buf[0] = '?'; hres = IInternetProtocolInfo_ParseUrl(protocol_info, blank_url, PARSE_DOMAIN, 0, buf,
1
0
0
0
Dmitry Timoshkov : user32: Add the SW_SHOWDEFAULT case to WINPOS_MinMaximize().
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: 5fea02e8c2c83003f9b5278b8ba0dd48c9530449 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5fea02e8c2c83003f9b5278b8…
Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Tue Mar 29 15:00:39 2011 +0900 user32: Add the SW_SHOWDEFAULT case to WINPOS_MinMaximize(). --- dlls/user32/winpos.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c index 03c16c9..a8324e8 100644 --- a/dlls/user32/winpos.c +++ b/dlls/user32/winpos.c @@ -955,6 +955,7 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect ) /* fall through */ case SW_SHOWNORMAL: case SW_RESTORE: + case SW_SHOWDEFAULT: /* FIXME: should have its own handler */ old_style = WIN_SetStyle( hwnd, 0, WS_MINIMIZE | WS_MAXIMIZE ); if (old_style & WS_MINIMIZE) {
1
0
0
0
Bart Van Assche : ntdll: Fix race condition in RtlCreateHeap().
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: c0913ed064f86d9cc2ddf6efc7f6f6a9db446934 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0913ed064f86d9cc2ddf6efc…
Author: Bart Van Assche <bvanassche(a)acm.org> Date: Mon Feb 28 11:39:57 2011 +0100 ntdll: Fix race condition in RtlCreateHeap(). --- dlls/ntdll/heap.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index df94410..2e945e9 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -1538,6 +1538,8 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c if (!(subheap = HEAP_CreateSubHeap( NULL, addr, flags, commitSize, totalSize ))) return 0; + heap_set_debug_flags( subheap->heap ); + /* link it into the per-process heap list */ if (processHeap) { @@ -1552,7 +1554,6 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, PVOID addr, SIZE_T totalSize, SIZE_T c list_init( &processHeap->entry ); } - heap_set_debug_flags( subheap->heap ); return subheap->heap; }
1
0
0
0
Vincent Povirk : gdiplus: Add test for GdipSetTextRenderingHint and make it pass.
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: b3dfe973adaf1a9cbe92f53838fa468c45d6d0ea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3dfe973adaf1a9cbe92f5383…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Mar 28 17:38:38 2011 -0500 gdiplus: Add test for GdipSetTextRenderingHint and make it pass. --- dlls/gdiplus/graphics.c | 2 +- dlls/gdiplus/tests/graphics.c | 49 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index eb74021..163aaac 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -5023,7 +5023,7 @@ GpStatus WINGDIPAPI GdipSetTextRenderingHint(GpGraphics *graphics, { TRACE("(%p, %d)\n", graphics, hint); - if(!graphics) + if(!graphics || hint > TextRenderingHintClearTypeGridFit) return InvalidParameter; if(graphics->busy) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index d42b37a..3adf6c6 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -3113,6 +3113,54 @@ static void test_get_set_interpolation(void) ReleaseDC(hwnd, hdc); } +static void test_get_set_textrenderinghint(void) +{ + GpGraphics *graphics; + HDC hdc = GetDC( hwnd ); + GpStatus status; + TextRenderingHint hint; + + ok(hdc != NULL, "Expected HDC to be initialized\n"); + status = GdipCreateFromHDC(hdc, &graphics); + expect(Ok, status); + ok(graphics != NULL, "Expected graphics to be initialized\n"); + + status = GdipGetTextRenderingHint(NULL, &hint); + expect(InvalidParameter, status); + + status = GdipGetTextRenderingHint(graphics, NULL); + expect(InvalidParameter, status); + + status = GdipSetTextRenderingHint(NULL, TextRenderingHintAntiAlias); + expect(InvalidParameter, status); + + /* out of range */ + status = GdipSetTextRenderingHint(graphics, TextRenderingHintClearTypeGridFit+1); + expect(InvalidParameter, status); + + status = GdipGetTextRenderingHint(graphics, &hint); + expect(Ok, status); + expect(TextRenderingHintSystemDefault, hint); + + status = GdipSetTextRenderingHint(graphics, TextRenderingHintSystemDefault); + expect(Ok, status); + + status = GdipGetTextRenderingHint(graphics, &hint); + expect(Ok, status); + expect(TextRenderingHintSystemDefault, hint); + + status = GdipSetTextRenderingHint(graphics, TextRenderingHintAntiAliasGridFit); + expect(Ok, status); + + status = GdipGetTextRenderingHint(graphics, &hint); + expect(Ok, status); + expect(TextRenderingHintAntiAliasGridFit, hint); + + GdipDeleteGraphics(graphics); + + ReleaseDC(hwnd, hdc); +} + START_TEST(graphics) { struct GdiplusStartupInput gdiplusStartupInput; @@ -3172,6 +3220,7 @@ START_TEST(graphics) test_fromMemoryBitmap(); test_string_functions(); test_get_set_interpolation(); + test_get_set_textrenderinghint(); GdiplusShutdown(gdiplusToken); DestroyWindow( hwnd );
1
0
0
0
Vincent Povirk : gdiplus: Add test for GdipDrawDriverString.
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: 204253b6babd179759a494d17fcb8af857ee5f2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=204253b6babd179759a494d17…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Mar 28 16:40:19 2011 -0500 gdiplus: Add test for GdipDrawDriverString. --- dlls/gdiplus/tests/graphics.c | 32 ++++++++++++++++++++++++++++++++ include/gdiplusenums.h | 9 +++++++++ 2 files changed, 41 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/graphics.c b/dlls/gdiplus/tests/graphics.c index bd14ab6..d42b37a 100644 --- a/dlls/gdiplus/tests/graphics.c +++ b/dlls/gdiplus/tests/graphics.c @@ -1954,6 +1954,8 @@ static void test_GdipDrawString(void) LOGFONTA logfont; HDC hdc = GetDC( hwnd ); static const WCHAR string[] = {'T','e','s','t',0}; + static const PointF positions[4] = {{0,0}, {1,1}, {2,2}, {3,3}}; + GpMatrix *matrix; memset(&logfont,0,sizeof(logfont)); strcpy(logfont.lfFaceName,"Arial"); @@ -1985,6 +1987,36 @@ static void test_GdipDrawString(void) status = GdipDrawString(graphics, string, 4, fnt, &rect, format, brush); expect(Ok, status); + status = GdipCreateMatrix(&matrix); + expect(Ok, status); + +todo_wine { + status = GdipDrawDriverString(NULL, string, 4, fnt, brush, positions, DriverStringOptionsCmapLookup, matrix); + expect(InvalidParameter, status); + + status = GdipDrawDriverString(graphics, NULL, 4, fnt, brush, positions, DriverStringOptionsCmapLookup, matrix); + expect(InvalidParameter, status); + + status = GdipDrawDriverString(graphics, string, 4, NULL, brush, positions, DriverStringOptionsCmapLookup, matrix); + expect(InvalidParameter, status); + + status = GdipDrawDriverString(graphics, string, 4, fnt, NULL, positions, DriverStringOptionsCmapLookup, matrix); + expect(InvalidParameter, status); + + status = GdipDrawDriverString(graphics, string, 4, fnt, brush, NULL, DriverStringOptionsCmapLookup, matrix); + expect(InvalidParameter, status); + + status = GdipDrawDriverString(graphics, string, 4, fnt, brush, positions, DriverStringOptionsCmapLookup|0x10, matrix); + expect(Ok, status); + + status = GdipDrawDriverString(graphics, string, 4, fnt, brush, positions, DriverStringOptionsCmapLookup, NULL); + expect(Ok, status); + + status = GdipDrawDriverString(graphics, string, 4, fnt, brush, positions, DriverStringOptionsCmapLookup, matrix); + expect(Ok, status); +} + + GdipDeleteMatrix(matrix); GdipDeleteGraphics(graphics); GdipDeleteBrush(brush); GdipDeleteFont(fnt); diff --git a/include/gdiplusenums.h b/include/gdiplusenums.h index dc03b29..69c8154 100644 --- a/include/gdiplusenums.h +++ b/include/gdiplusenums.h @@ -42,6 +42,14 @@ enum BrushType BrushTypeLinearGradient = 4 }; +enum DriverStringOptions +{ + DriverStringOptionsCmapLookup = 1, + DriverStringOptionsVertical = 2, + DriverStringOptionsRealizedAdvance = 4, + DriverStringOptionsLimitSubpixel = 4 +}; + enum FillMode { FillModeAlternate = 0, @@ -707,6 +715,7 @@ enum EmfPlusRecordType { typedef enum Unit Unit; typedef enum BrushType BrushType; +typedef enum DriverStringOptions DriverStringOptions; typedef enum FillMode FillMode; typedef enum LineCap LineCap; typedef enum PathPointType PathPointType;
1
0
0
0
Piotr Caban : urlmon/tests: Added IWinInetHttpInfo tests.
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: 319a748f7b361dd98b9e1a83aab5409412c6ccaf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=319a748f7b361dd98b9e1a83a…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 28 23:38:27 2011 +0200 urlmon/tests: Added IWinInetHttpInfo tests. --- dlls/urlmon/tests/url.c | 50 +++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 48 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c index 17a797b..b606b90 100644 --- a/dlls/urlmon/tests/url.c +++ b/dlls/urlmon/tests/url.c @@ -1352,6 +1352,51 @@ static IServiceProvider ServiceProvider = { &ServiceProviderVtbl }; static IBindStatusCallbackEx objbsc; +static void test_WinInetHttpInfo(IWinInetHttpInfo *http_info, DWORD progress) +{ + DWORD status, size; + HRESULT hres, expect; + + /* QueryInfo changes it's behavior during this request */ + if(progress == BINDSTATUS_SENDINGREQUEST) + return; + + if(test_protocol==FTP_TEST && download_state==BEFORE_DOWNLOAD + && progress!=BINDSTATUS_MIMETYPEAVAILABLE) + expect = E_FAIL; + else if(test_protocol == FTP_TEST) + expect = S_FALSE; + else + expect = S_OK; + + size = sizeof(DWORD); + hres = IWinInetHttpInfo_QueryInfo(http_info, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, + &status, &size, NULL, NULL); + ok(hres == expect, "hres = %x, expected %x\n", hres, expect); + if(hres == S_OK) { + if(download_state==BEFORE_DOWNLOAD && progress!=BINDSTATUS_MIMETYPEAVAILABLE) + ok(status == 0, "status = %d\n", status); + else + ok(status == HTTP_STATUS_OK, "status = %d\n", status); + ok(size == sizeof(DWORD), "size = %d\n", size); + } + + size = sizeof(DWORD); + hres = IWinInetHttpInfo_QueryOption(http_info, INTERNET_OPTION_HANDLE_TYPE, &status, &size); + if(test_protocol == FTP_TEST) { + if(download_state==BEFORE_DOWNLOAD && progress!=BINDSTATUS_MIMETYPEAVAILABLE) + ok(hres == E_FAIL, "hres = %x\n", hres); + else + ok(hres == S_OK, "hres = %x\n", hres); + + if(hres == S_OK) + ok(status == INTERNET_HANDLE_TYPE_FTP_FILE, "status = %d\n", status); + } else { + ok(hres == S_OK, "hres = %x\n", hres); + ok(status == INTERNET_HANDLE_TYPE_HTTP_REQUEST, "status = %d\n", status); + } +} + static HRESULT WINAPI statusclb_QueryInterface(IBindStatusCallbackEx *iface, REFIID riid, void **ppv) { ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId()); @@ -1658,9 +1703,10 @@ static HRESULT WINAPI statusclb_OnProgress(IBindStatusCallbackEx *iface, ULONG u HRESULT hres; hres = IBinding_QueryInterface(current_binding, &IID_IWinInetHttpInfo, (void**)&http_info); - if(!emulate_protocol && test_protocol != FILE_TEST && is_urlmon_protocol(test_protocol)) + if(!emulate_protocol && test_protocol != FILE_TEST && is_urlmon_protocol(test_protocol)) { ok(hres == S_OK, "Could not get IWinInetHttpInfo iface: %08x\n", hres); - else + test_WinInetHttpInfo(http_info, ulStatusCode); + } else ok(hres == E_NOINTERFACE, "QueryInterface(IID_IWinInetHttpInfo) returned: %08x, expected E_NOINTERFACE\n", hres); if(SUCCEEDED(hres))
1
0
0
0
Piotr Caban : urlmon: Added IWinInetHttpInfo_{QueryOption, QueryInfo} implementation.
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: 1041f61e68f34fc632ceeb2a2966b4e667a38db8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1041f61e68f34fc632ceeb2a2…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 28 23:38:16 2011 +0200 urlmon: Added IWinInetHttpInfo_{QueryOption,QueryInfo} implementation. --- dlls/urlmon/ftp.c | 20 ++++++++++++++++---- dlls/urlmon/http.c | 23 +++++++++++++++++++---- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/dlls/urlmon/ftp.c b/dlls/urlmon/ftp.c index c9d43b8..04cf49c 100644 --- a/dlls/urlmon/ftp.c +++ b/dlls/urlmon/ftp.c @@ -384,16 +384,28 @@ static HRESULT WINAPI HttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOpti void *pBuffer, DWORD *pcbBuffer) { FtpProtocol *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); + + if(!This->base.request) + return E_FAIL; + + if(!InternetQueryOptionW(This->base.request, dwOption, pBuffer, pcbBuffer)) + return S_FALSE; + return S_OK; } static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved) { FtpProtocol *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); + + if(!This->base.request) + return E_FAIL; + + if(!HttpQueryInfoW(This->base.request, dwOption, pBuffer, pcbBuffer, pdwFlags)) + return S_FALSE; + return S_OK; } static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c index 23f6e69..846c790 100644 --- a/dlls/urlmon/http.c +++ b/dlls/urlmon/http.c @@ -836,16 +836,31 @@ static HRESULT WINAPI HttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD dwOpti void *pBuffer, DWORD *pcbBuffer) { HttpProtocol *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); + + if(!This->base.request) + return E_FAIL; + + if(!InternetQueryOptionW(This->base.request, dwOption, pBuffer, pcbBuffer)) + return S_FALSE; + return S_OK; } static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved) { HttpProtocol *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); + + if(!This->base.request) + return E_FAIL; + + if(!HttpQueryInfoW(This->base.request, dwOption, pBuffer, pcbBuffer, pdwFlags)) { + if(pBuffer) + memset(pBuffer, 0, *pcbBuffer); + return S_OK; + } + return S_OK; } static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = {
1
0
0
0
Piotr Caban : urlmon: Forward IWinInetHttpInfo calls to protocol implementations.
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: e1c1b937ebbc4c91ea2415d60e985ea0cead0c09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e1c1b937ebbc4c91ea2415d60…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 28 23:38:07 2011 +0200 urlmon: Forward IWinInetHttpInfo calls to protocol implementations. --- dlls/urlmon/binding.c | 28 +++++++++++++++------------- dlls/urlmon/bindprot.c | 6 +++++- dlls/urlmon/urlmon_main.h | 1 + 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c index 0d6043c..be72ee1 100644 --- a/dlls/urlmon/binding.c +++ b/dlls/urlmon/binding.c @@ -762,19 +762,11 @@ static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void *ppv = &This->IWinInetHttpInfo_iface; }else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) { - IWinInetHttpInfo *http_info; - HRESULT hres; - TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv); - if(!This->protocol->wininet_info) + if(!This->protocol->wininet_http_info) return E_NOINTERFACE; - hres = IWinInetInfo_QueryInterface(This->protocol->wininet_info, &IID_IWinInetHttpInfo, (void**)&http_info); - if(FAILED(hres)) - return E_NOINTERFACE; - - IWinInetHttpInfo_Release(http_info); *ppv = &This->IWinInetHttpInfo_iface; } @@ -1259,16 +1251,26 @@ static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD void *pBuffer, DWORD *pcbBuffer) { Binding *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer); + + if(!This->protocol->wininet_info) + return E_FAIL; + + return IWinInetInfo_QueryOption(This->protocol->wininet_info, + dwOption, pBuffer, pcbBuffer); } static HRESULT WINAPI WinInetHttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD dwOption, void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD *pdwReserved) { Binding *This = impl_from_IWinInetHttpInfo(iface); - FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); - return E_NOTIMPL; + TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); + + if(!This->protocol->wininet_http_info) + return E_FAIL; + + return IWinInetHttpInfo_QueryInfo(This->protocol->wininet_http_info, + dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved); } static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = { diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index 01a1b90..45cf14c 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -329,6 +329,8 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocolEx *iface) if(!ref) { if(This->wininet_info) IWinInetInfo_Release(This->wininet_info); + if(This->wininet_http_info) + IWinInetHttpInfo_Release(This->wininet_http_info); if(This->protocol) IInternetProtocol_Release(This->protocol); if(This->bind_info) @@ -523,8 +525,10 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr This->protocol = protocol; - if(urlmon_protocol) + if(urlmon_protocol) { IInternetProtocol_QueryInterface(protocol, &IID_IWinInetInfo, (void**)&This->wininet_info); + IInternetProtocol_QueryInterface(protocol, &IID_IWinInetHttpInfo, (void**)&This->wininet_http_info); + } set_binding_sink(This, pOIProtSink, pOIBindInfo); diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h index 00247c8..2691622 100644 --- a/dlls/urlmon/urlmon_main.h +++ b/dlls/urlmon/urlmon_main.h @@ -180,6 +180,7 @@ typedef struct { IInternetProtocolSink *protocol_sink; IServiceProvider *service_provider; IWinInetInfo *wininet_info; + IWinInetHttpInfo *wininet_http_info; struct { IInternetProtocol IInternetProtocol_iface;
1
0
0
0
Piotr Caban : shdocvw: Report navigation error depending on HTTP status code.
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: d55ebe0a4b6c421356aabfee88971473cb729cc5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d55ebe0a4b6c421356aabfee8…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 28 23:37:36 2011 +0200 shdocvw: Report navigation error depending on HTTP status code. --- dlls/shdocvw/navigate.c | 35 ++++++++++++++++++++++++++++++++++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/dlls/shdocvw/navigate.c b/dlls/shdocvw/navigate.c index a6899b0..09135a8 100644 --- a/dlls/shdocvw/navigate.c +++ b/dlls/shdocvw/navigate.c @@ -40,6 +40,7 @@ typedef struct { LONG ref; DocHost *doc_host; + IBinding *binding; LPWSTR url; HGLOBAL post_data; @@ -176,6 +177,8 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface) if(!ref) { if(This->doc_host) IOleClientSite_Release(&This->doc_host->IOleClientSite_iface); + if(This->binding) + IBinding_Release(This->binding); if(This->post_data) GlobalFree(This->post_data); SysFreeString(This->headers); @@ -193,6 +196,9 @@ static HRESULT WINAPI BindStatusCallback_OnStartBinding(IBindStatusCallback *ifa TRACE("(%p)->(%d %p)\n", This, dwReserved, pbind); + This->binding = pbind; + IBinding_AddRef(This->binding); + return S_OK; } @@ -212,10 +218,30 @@ static HRESULT WINAPI BindStatusCallback_OnLowResource(IBindStatusCallback *ifac return E_NOTIMPL; } +static DWORD get_http_status_code(IBinding *binding) +{ + IWinInetHttpInfo *http_info; + DWORD status, size = sizeof(DWORD); + HRESULT hres; + + hres = IBinding_QueryInterface(binding, &IID_IWinInetHttpInfo, (void**)&http_info); + if(FAILED(hres)) + return HTTP_STATUS_OK; + + hres = IWinInetHttpInfo_QueryInfo(http_info, HTTP_QUERY_STATUS_CODE|HTTP_QUERY_FLAG_NUMBER, + &status, &size, NULL, NULL); + IWinInetHttpInfo_Release(http_info); + + if(FAILED(hres)) + return HTTP_STATUS_OK; + return status; +} + static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText) { BindStatusCallback *This = impl_from_IBindStatusCallback(iface); + DWORD status_code; TRACE("(%p)->(%d %d %d %s)\n", This, ulProgress, ulProgressMax, ulStatusCode, debugstr_w(szStatusText)); @@ -225,6 +251,9 @@ static HRESULT WINAPI BindStatusCallback_OnProgress(IBindStatusCallback *iface, return set_dochost_url(This->doc_host, szStatusText); case BINDSTATUS_BEGINDOWNLOADDATA: set_status_text(This, szStatusText); /* FIXME: "Start downloading from site: %s" */ + status_code = get_http_status_code(This->binding); + if(status_code != HTTP_STATUS_OK) + handle_navigation_error(This->doc_host, status_code, This->url, NULL); return S_OK; case BINDSTATUS_ENDDOWNLOADDATA: set_status_text(This, szStatusText); /* FIXME: "Downloading from site: %s" */ @@ -298,13 +327,15 @@ static HRESULT WINAPI BindStatusCallback_OnStopBinding(IBindStatusCallback *ifac if(!This->doc_host) return S_OK; - /* FIXME: Check HTTP status code */ if(FAILED(hresult)) handle_navigation_error(This->doc_host, hresult, This->url, NULL); IOleClientSite_Release(&This->doc_host->IOleClientSite_iface); This->doc_host = NULL; + IBinding_Release(This->binding); + This->binding = NULL; + return S_OK; } @@ -438,6 +469,8 @@ static BindStatusCallback *create_callback(DocHost *doc_host, LPCWSTR url, PBYTE ret->doc_host = doc_host; IOleClientSite_AddRef(&doc_host->IOleClientSite_iface); + ret->binding = NULL; + if(post_data) { ret->post_data = GlobalAlloc(0, post_data_len); memcpy(ret->post_data, post_data, post_data_len);
1
0
0
0
Piotr Caban : mshtml/tests: Added connection error handling tests.
by Alexandre Julliard
29 Mar '11
29 Mar '11
Module: wine Branch: master Commit: 2790f363c57e283ad7b4979f52f199bbd466b5af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2790f363c57e283ad7b4979f5…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 28 23:36:45 2011 +0200 mshtml/tests: Added connection error handling tests. --- dlls/mshtml/tests/htmldoc.c | 68 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 65 insertions(+), 3 deletions(-) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 843b9cc..2df4e74 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -1212,6 +1212,10 @@ static void continue_binding(IBindStatusCallback *callback) hres = IBindStatusCallback_OnProgress(callback, sizeof(html_page)-1, sizeof(html_page)-1, BINDSTATUS_BEGINDOWNLOADDATA, doc_url); ok(hres == S_OK, "OnProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres); + if(status_code != HTTP_STATUS_OK) { + CHECK_CALLED(IsErrorUrl); + SET_EXPECT(IsErrorUrl); + } SET_EXPECT(Read); stgmedium.tymed = TYMED_ISTREAM; @@ -2752,6 +2756,57 @@ static HRESULT WINAPI OleCommandTarget_Exec(IOleCommandTarget *iface, const GUID ok(V_VT(pvaIn) == VT_UNKNOWN, "V_VT(pvaIn) != VT_UNKNOWN\n"); /* FIXME: test V_UNKNOWN(pvaIn) == window */ return S_OK; + case 1: { + SAFEARRAY *sa; + UINT dim; + LONG ind=0; + VARIANT var; + HRESULT hres; + + ok(pvaIn != NULL, "pvaIn == NULL\n"); + ok(pvaOut != NULL, "pvaOut != NULL\n"); + ok(V_VT(pvaIn) == VT_ARRAY, "V_VT(pvaIn) = %d\n", V_VT(pvaIn)); + ok(V_VT(pvaOut) == VT_BOOL, "V_VT(pvaOut) = %d\n", V_VT(pvaOut)); + sa = V_ARRAY(pvaIn); + + dim = SafeArrayGetDim(sa); + ok(dim == 1, "dim = %d\n", dim); + hres = SafeArrayGetLBound(sa, 1, &ind); + ok(hres == S_OK, "SafeArrayGetLBound failed: %x\n", hres); + ok(ind == 0, "Lower bound = %d\n", ind); + hres = SafeArrayGetUBound(sa, 1, &ind); + ok(hres == S_OK, "SafeArrayGetUBound failed: %x\n", hres); + ok(ind == 7 || broken(ind == 5), "Upper bound = %d\n", ind); + + ind = 0; + SafeArrayGetElement(sa, &ind, &var); + ok(V_VT(&var) == VT_I4, "Incorrect data type: %d\n", V_VT(&var)); + ok(V_I4(&var) == status_code, "Incorrect error code: %d\n", V_I4(&var)); + VariantClear(&var); + ind = 1; + SafeArrayGetElement(sa, &ind, &var); + ok(V_VT(&var) == VT_BSTR, "Incorrect data type: %d\n", V_VT(&var)); + ok(!strcmp_wa(V_BSTR(&var), "winetest:doc"), "Page address: %s\n", wine_dbgstr_w(V_BSTR(&var))); + VariantClear(&var); + ind = 2; + SafeArrayGetElement(sa, &ind, &var); + ok(V_VT(&var) == VT_UNKNOWN, "Incorrect data type: %d\n", V_VT(&var)); + VariantClear(&var); + ind = 3; + SafeArrayGetElement(sa, &ind, &var); + ok(V_VT(&var) == VT_UNKNOWN, "Incorrect data type: %d\n", V_VT(&var)); + VariantClear(&var); + ind = 4; + SafeArrayGetElement(sa, &ind, &var); + ok(V_VT(&var) == VT_BOOL, "Incorrect data type: %d\n", V_VT(&var)); + ok(!V_BOOL(&var), "Unknown value is incorrect\n"); + VariantClear(&var); + ind = 5; + SafeArrayGetElement(sa, &ind, &var); + ok(V_VT(&var) == VT_BOOL, "Incorrect data type: %d\n", V_VT(&var)); + ok(!V_BOOL(&var), "Unknown value is incorrect\n"); + VariantClear(&var); + } default: return E_FAIL; /* TODO */ } @@ -2967,7 +3022,8 @@ static HRESULT WINAPI DocObjectService_IsErrorUrl( BOOL *pfIsError) { CHECK_EXPECT(IsErrorUrl); - return E_NOTIMPL; + *pfIsError = FALSE; + return S_OK; } static IDocObjectServiceVtbl DocObjectServiceVtbl = { @@ -5353,7 +5409,7 @@ static void test_HTMLDocument(BOOL do_load) ok(!IsWindow(hwnd), "hwnd is not destroyed\n"); } -static void test_HTMLDocument_hlink(void) +static void test_HTMLDocument_hlink(DWORD status) { IHTMLDocument2 *doc; @@ -5372,7 +5428,9 @@ static void test_HTMLDocument_hlink(void) test_Persist(doc, &Moniker); test_Navigate(doc); + status_code = status; test_download(DWL_CSS|DWL_TRYCSS); + status_code = HTTP_STATUS_OK; test_IsDirty(doc, S_FALSE); test_MSHTML_QueryStatus(doc, OLECMDF_SUPPORTED); @@ -6000,7 +6058,11 @@ START_TEST(htmldoc) container_hwnd = create_container_window(); register_protocol(); - test_HTMLDocument_hlink(); + asynchronous_binding = TRUE; + test_HTMLDocument_hlink(HTTP_STATUS_NOT_FOUND); + + asynchronous_binding = FALSE; + test_HTMLDocument_hlink(HTTP_STATUS_OK); test_HTMLDocument(FALSE); test_HTMLDocument(TRUE); test_HTMLDocument_StreamLoad();
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
85
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Results per page:
10
25
50
100
200