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
July 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
838 discussions
Start a n
N
ew thread
Hans Leidekker : winhttp: Implement IWinHttpRequest::get_ResponseBody.
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: a25c865cb8b9c6c640e80c7a2585c9bae07084f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a25c865cb8b9c6c640e80c7a2…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Sat Jul 23 18:15:09 2011 +0200 winhttp: Implement IWinHttpRequest::get_ResponseBody. --- dlls/winhttp/request.c | 27 +++++++++++++++++++++++++-- dlls/winhttp/tests/winhttp.c | 11 ++++++++++- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index b639f6c..65e0aa7 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -2724,8 +2724,31 @@ static HRESULT WINAPI winhttp_request_get_ResponseBody( IWinHttpRequest *iface, VARIANT *body ) { - FIXME("\n"); - return E_NOTIMPL; + struct winhttp_request *request = impl_from_IWinHttpRequest( iface ); + SAFEARRAY *sa; + HRESULT hr; + DWORD err; + char *ptr; + + TRACE("%p, %p\n", request, body); + + if ((err = request_read_body( request, INFINITE ))) return HRESULT_FROM_WIN32( err ); + + if (!(sa = SafeArrayCreateVector( VT_UI1, 0, request->offset ))) return E_OUTOFMEMORY; + if ((hr = SafeArrayAccessData( sa, (void **)&ptr )) != S_OK) + { + SafeArrayDestroy( sa ); + return hr; + } + memcpy( ptr, request->buffer, request->offset ); + if ((hr = SafeArrayUnaccessData( sa )) != S_OK) + { + SafeArrayDestroy( sa ); + return hr; + } + V_VT( body ) = VT_ARRAY|VT_UI1; + V_ARRAY( body ) = sa; + return S_OK; } static HRESULT WINAPI winhttp_request_get_ResponseStream( diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 8f2af5a..1227902 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -2107,7 +2107,7 @@ static void test_IWinHttpRequest(void) HRESULT hr; IWinHttpRequest *req; BSTR method, url, response = NULL, status_text = NULL; - VARIANT async, empty, timeout; + VARIANT async, empty, timeout, body; VARIANT_BOOL succeeded; LONG status; @@ -2241,6 +2241,15 @@ static void test_IWinHttpRequest(void) ok( hr == S_OK, "got %08x\n", hr ); SysFreeString( response ); + VariantInit( &body ); + V_VT( &body ) = VT_ERROR; + hr = IWinHttpRequest_get_ResponseBody( req, &body ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( V_VT( &body ) == (VT_ARRAY|VT_UI1), "got %08x\n", V_VT( &body ) ); + + hr = VariantClear( &body ); + ok( hr == S_OK, "got %08x\n", hr ); + hr = IWinHttpRequest_Send( req, empty ); ok( hr == S_OK, "got %08x\n", hr );
1
0
0
0
Hans Leidekker : winhttp: Use an offset instead of a pointer for the write position.
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: 73646d352901f8eea2d819485cda0cb139d8c678 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=73646d352901f8eea2d819485…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Sat Jul 23 18:14:52 2011 +0200 winhttp: Use an offset instead of a pointer for the write position. --- dlls/winhttp/request.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 5d10410..b639f6c 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -2157,7 +2157,7 @@ struct winhttp_request HANDLE wait; HANDLE cancel; char *buffer; - char *ptr; + DWORD offset; DWORD bytes_available; DWORD bytes_read; LONG resolve_timeout; @@ -2624,7 +2624,6 @@ static DWORD request_read_body( struct winhttp_request *request, DWORD timeout ) if (!(request->buffer = heap_alloc( buflen ))) return E_OUTOFMEMORY; size = total_bytes_read = 0; - request->ptr = request->buffer; do { wait_set_status_callback( request, WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE ); @@ -2648,14 +2647,15 @@ static DWORD request_read_body( struct winhttp_request *request, DWORD timeout ) request->buffer = tmp; } wait_set_status_callback( request, WINHTTP_CALLBACK_STATUS_READ_COMPLETE ); - if (!WinHttpReadData( request->hrequest, request->ptr, request->bytes_available, &request->bytes_read )) + if (!WinHttpReadData( request->hrequest, request->buffer + request->offset, + request->bytes_available, &request->bytes_read )) { err = GetLastError(); goto error; } wait_for_completion( request, timeout ); total_bytes_read += request->bytes_read; - request->ptr += request->bytes_read; + request->offset += request->bytes_read; } while (request->bytes_read); request->state = REQUEST_STATE_BODY_RECEIVED; @@ -2713,9 +2713,9 @@ static HRESULT WINAPI winhttp_request_get_ResponseText( if ((err = request_read_body( request, INFINITE ))) return HRESULT_FROM_WIN32( err ); if ((err = request_get_codepage( request, &codepage ))) return HRESULT_FROM_WIN32( err ); - len = MultiByteToWideChar( codepage, 0, request->buffer, request->ptr - request->buffer, NULL, 0 ); + len = MultiByteToWideChar( codepage, 0, request->buffer, request->offset, NULL, 0 ); if (!(*body = SysAllocStringLen( NULL, len ))) return E_OUTOFMEMORY; - MultiByteToWideChar( codepage, 0, request->buffer, request->ptr - request->buffer, *body, len ); + MultiByteToWideChar( codepage, 0, request->buffer, request->offset, *body, len ); (*body)[len] = 0; return S_OK; } @@ -2788,7 +2788,7 @@ static HRESULT WINAPI winhttp_request_Abort( request->wait = NULL; request->cancel = NULL; request->buffer = NULL; - request->ptr = NULL; + request->offset = 0; request->bytes_available = 0; request->bytes_read = 0; return S_OK;
1
0
0
0
Francois Gouget : d3dx9_36: Fix compilation on systems that don' t support nameless unions.
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: f87745d4976c3b897592e1fe251cff4b950b0100 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f87745d4976c3b897592e1fe2…
Author: Francois Gouget <fgouget(a)free.fr> Date: Sat Jul 23 13:42:39 2011 +0200 d3dx9_36: Fix compilation on systems that don't support nameless unions. --- dlls/d3dx9_36/effect.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index 499682c..47baf39 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -18,8 +18,10 @@ #include "config.h" #include "wine/port.h" +#define NONAMELESSUNION #include "wine/debug.h" #include "wine/unicode.h" + #include "windef.h" #include "wingdi.h" #include "d3dx9_36_private.h" @@ -897,9 +899,9 @@ static void get_matrix(struct d3dx_parameter *param, D3DXMATRIX *matrix) for (k = 0; k < 4; ++k) { if ((i < param->rows) && (k < param->columns)) - matrix->m[i][k] = get_float(param->type, (float *)param->data + i * param->columns + k); + matrix->u.m[i][k] = get_float(param->type, (float *)param->data + i * param->columns + k); else - matrix->m[i][k] = 0.0f; + matrix->u.m[i][k] = 0.0f; } } }
1
0
0
0
Jacek Caban : mshtml: Added javascript: URLs test.
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: 39b02829ea8e83830809bfb30bd1cafa1e790138 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=39b02829ea8e83830809bfb30…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jul 23 12:52:42 2011 +0200 mshtml: Added javascript: URLs test. --- dlls/mshtml/tests/htmldoc.c | 165 ++++++++++++++++++++++++++++--------------- 1 files changed, 109 insertions(+), 56 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=39b02829ea8e83830809b…
1
0
0
0
Jacek Caban : mshtml: Added support for javascript: URLs.
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: 5751441f39cbe1f20d885d879d86c30a556fd5c0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5751441f39cbe1f20d885d879…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jul 23 12:52:17 2011 +0200 mshtml: Added support for javascript: URLs. --- dlls/mshtml/htmlwindow.c | 100 ++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 87 insertions(+), 13 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 06ae7ae..ba292ab 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -27,6 +27,9 @@ #include "mshtmdid.h" #include "shlguid.h" +#define NO_SHLWAPI_REG +#include "shlwapi.h" + #include "wine/debug.h" #include "mshtml_private.h" @@ -1666,6 +1669,52 @@ static ULONG WINAPI HTMLPrivateWindow_Release(IHTMLPrivateWindow *iface) return IHTMLWindow2_Release(&This->IHTMLWindow2_iface); } +static void handle_javascript(HTMLWindow *window, const WCHAR *code) +{ + VARIANT v; + HRESULT hres; + + static const WCHAR jscriptW[] = {'j','s','c','r','i','p','t',0}; + + set_download_state(window->doc_obj, 1); + + V_VT(&v) = VT_EMPTY; + hres = exec_script(window, code, jscriptW, &v); + if(SUCCEEDED(hres) && V_VT(&v) != VT_EMPTY) { + FIXME("javascirpt URL returned %s\n", debugstr_variant(&v)); + VariantClear(&v); + } + + if(window->doc_obj->view_sink) + IAdviseSink_OnViewChange(window->doc_obj->view_sink, DVASPECT_CONTENT, -1); + + set_download_state(window->doc_obj, 0); +} + +typedef struct { + task_t header; + HTMLWindow *window; + IUri *uri; +} navigate_javascript_task_t; + +static void navigate_javascript_proc(task_t *_task) +{ + navigate_javascript_task_t *task = (navigate_javascript_task_t*)_task; + BSTR code; + HRESULT hres; + + task->window->readystate = READYSTATE_COMPLETE; + + hres = IUri_GetPath(task->uri, &code); + if(SUCCEEDED(hres)) { + handle_javascript(task->window, code); + SysFreeString(code); + } + + IHTMLWindow2_Release(&task->window->IHTMLWindow2_iface); + IUri_Release(task->uri); +} + typedef struct { task_t header; HTMLWindow *window; @@ -1691,12 +1740,12 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface, BSTR arg4, VARIANT *post_data_var, VARIANT *headers_var, ULONG flags) { HTMLWindow *This = impl_from_IHTMLPrivateWindow(iface); - navigate_task_t *task; DWORD post_data_size = 0; BYTE *post_data = NULL; WCHAR *headers = NULL; nsChannelBSC *bsc; IMoniker *mon; + DWORD scheme; BSTR new_url; IUri *uri; HRESULT hres; @@ -1740,7 +1789,6 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface, return hres; hres = CreateURLMonikerEx2(NULL, uri, &mon, URL_MK_UNIFORM); - IUri_Release(uri); if(FAILED(hres)) return hres; @@ -1771,22 +1819,48 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface, prepare_for_binding(&This->doc_obj->basedoc, mon, NULL, TRUE); + hres = IUri_GetScheme(uri, &scheme); + + if(scheme != URL_SCHEME_JAVASCRIPT) { + navigate_task_t *task; + + IUri_Release(uri); + + task = heap_alloc(sizeof(*task)); + if(!task) { + IUnknown_Release((IUnknown*)bsc); + IMoniker_Release(mon); + return E_OUTOFMEMORY; + } + + IHTMLWindow2_AddRef(&This->IHTMLWindow2_iface); + task->window = This; + task->bscallback = bsc; + task->mon = mon; + push_task(&task->header, navigate_proc, This->task_magic); + + /* Silently and repeated when real loading starts? */ + This->readystate = READYSTATE_LOADING; + }else { + navigate_javascript_task_t *task; - task = heap_alloc(sizeof(*task)); - if(!task) { IUnknown_Release((IUnknown*)bsc); IMoniker_Release(mon); - return E_OUTOFMEMORY; - } - IHTMLWindow2_AddRef(&This->IHTMLWindow2_iface); - task->window = This; - task->bscallback = bsc; - task->mon = mon; - push_task(&task->header, navigate_proc, This->task_magic); + task = heap_alloc(sizeof(*task)); + if(!task) { + IUri_Release(uri); + return E_OUTOFMEMORY; + } - /* Silently and repeated when real loading starts? */ - This->readystate = READYSTATE_LOADING; + IHTMLWindow2_AddRef(&This->IHTMLWindow2_iface); + task->window = This; + task->uri = uri; + push_task(&task->header, navigate_javascript_proc, This->task_magic); + + /* Why silently? */ + This->readystate = READYSTATE_COMPLETE; + } return S_OK; }
1
0
0
0
Jacek Caban : mshtml: Call set_moniker asynchronously in SuperNavigate.
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: 730299bae610581b4232953899ea308fd0521fb5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=730299bae610581b423295389…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jul 23 12:51:57 2011 +0200 mshtml: Call set_moniker asynchronously in SuperNavigate. --- dlls/mshtml/htmlwindow.c | 46 +++++++++++++++++++++++++++++++++++++----- dlls/mshtml/tests/htmldoc.c | 2 +- 2 files changed, 41 insertions(+), 7 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 911e1f2..06ae7ae 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -1666,10 +1666,32 @@ static ULONG WINAPI HTMLPrivateWindow_Release(IHTMLPrivateWindow *iface) return IHTMLWindow2_Release(&This->IHTMLWindow2_iface); } +typedef struct { + task_t header; + HTMLWindow *window; + nsChannelBSC *bscallback; + IMoniker *mon; +} navigate_task_t; + +static void navigate_proc(task_t *_task) +{ + navigate_task_t *task = (navigate_task_t*)_task; + HRESULT hres; + + hres = set_moniker(&task->window->doc_obj->basedoc, task->mon, NULL, task->bscallback, TRUE); + if(SUCCEEDED(hres)) + hres = start_binding(task->window, NULL, (BSCallback*)task->bscallback, NULL); + + IUnknown_Release((IUnknown*)task->bscallback); + IHTMLWindow2_Release(&task->window->IHTMLWindow2_iface); + IMoniker_Release(task->mon); +} + static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface, BSTR url, BSTR arg2, BSTR arg3, BSTR arg4, VARIANT *post_data_var, VARIANT *headers_var, ULONG flags) { HTMLWindow *This = impl_from_IHTMLPrivateWindow(iface); + navigate_task_t *task; DWORD post_data_size = 0; BYTE *post_data = NULL; WCHAR *headers = NULL; @@ -1748,13 +1770,25 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface, } prepare_for_binding(&This->doc_obj->basedoc, mon, NULL, TRUE); - hres = set_moniker(&This->doc_obj->basedoc, mon, NULL, bsc, TRUE); - if(SUCCEEDED(hres)) - hres = async_start_doc_binding(This, bsc); - IUnknown_Release((IUnknown*)bsc); - IMoniker_Release(mon); - return hres; + + task = heap_alloc(sizeof(*task)); + if(!task) { + IUnknown_Release((IUnknown*)bsc); + IMoniker_Release(mon); + return E_OUTOFMEMORY; + } + + IHTMLWindow2_AddRef(&This->IHTMLWindow2_iface); + task->window = This; + task->bscallback = bsc; + task->mon = mon; + push_task(&task->header, navigate_proc, This->task_magic); + + /* Silently and repeated when real loading starts? */ + This->readystate = READYSTATE_LOADING; + + return S_OK; } static HRESULT WINAPI HTMLPrivateWindow_GetPendingUrl(IHTMLPrivateWindow *iface, BSTR *url) diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index f22bdbd..88d0e8d 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -4306,7 +4306,7 @@ static void test_put_href(IHTMLDocument2 *doc, BOOL use_replace) SET_EXPECT(Invoke_OnReadyStateChange_Loading); test_download(DWL_VERBDONE); - todo_wine CHECK_CALLED(Invoke_OnReadyStateChange_Loading); + CHECK_CALLED(Invoke_OnReadyStateChange_Loading); hres = IHTMLPrivateWindow_GetAddressBarUrl(priv_window, &str2); ok(hres == S_OK, "GetAddressBarUrl failed: %08x\n", hres);
1
0
0
0
Jacek Caban : mshtml: Split set_moniker implementation.
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: b14fc2c9d1b98e1f99ba41806852b1169309b232 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b14fc2c9d1b98e1f99ba41806…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jul 23 12:51:38 2011 +0200 mshtml: Split set_moniker implementation. --- dlls/mshtml/binding.h | 1 + dlls/mshtml/htmlwindow.c | 1 + dlls/mshtml/persist.c | 60 ++++++++++++++++++++++++--------------------- 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/dlls/mshtml/binding.h b/dlls/mshtml/binding.h index f3c4d3e..3e8b87c 100644 --- a/dlls/mshtml/binding.h +++ b/dlls/mshtml/binding.h @@ -106,6 +106,7 @@ HRESULT hlink_frame_navigate(HTMLDocument*,LPCWSTR,nsChannel*,DWORD,BOOL*) DECLS HRESULT create_doc_uri(HTMLWindow*,WCHAR*,nsWineURI**) DECLSPEC_HIDDEN; HRESULT load_nsuri(HTMLWindow*,nsWineURI*,nsChannelBSC*,DWORD) DECLSPEC_HIDDEN; HRESULT set_moniker(HTMLDocument*,IMoniker*,IBindCtx*,nsChannelBSC*,BOOL) DECLSPEC_HIDDEN; +void prepare_for_binding(HTMLDocument*,IMoniker*,IBindCtx*,BOOL) DECLSPEC_HIDDEN; HRESULT create_channelbsc(IMoniker*,WCHAR*,BYTE*,DWORD,nsChannelBSC**) DECLSPEC_HIDDEN; HRESULT channelbsc_load_stream(nsChannelBSC*,IStream*) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 377825d..911e1f2 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -1747,6 +1747,7 @@ static HRESULT WINAPI HTMLPrivateWindow_SuperNavigate(IHTMLPrivateWindow *iface, return hres; } + prepare_for_binding(&This->doc_obj->basedoc, mon, NULL, TRUE); hres = set_moniker(&This->doc_obj->basedoc, mon, NULL, bsc, TRUE); if(SUCCEEDED(hres)) hres = async_start_doc_binding(This, bsc); diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 0907810..550414f 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -188,23 +188,10 @@ static void set_downloading_proc(task_t *_task) } } -HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannelBSC *async_bsc, BOOL set_download) +void prepare_for_binding(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BOOL navigated_binding) { - nsChannelBSC *bscallback; - docobj_task_t *task; - download_proc_task_t *download_task; - nsWineURI *nsuri; - LPOLESTR url; HRESULT hres; - hres = IMoniker_GetDisplayName(mon, pibc, NULL, &url); - if(FAILED(hres)) { - WARN("GetDiaplayName failed: %08x\n", hres); - return hres; - } - - TRACE("got url: %s\n", debugstr_w(url)); - if(This->doc_obj->client) { VARIANT silent, offline; @@ -233,8 +220,6 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel set_current_mon(This->window, mon); } - set_ready_state(This->window, READYSTATE_LOADING); - if(This->doc_obj->client) { IOleCommandTarget *cmdtrg = NULL; @@ -243,7 +228,7 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel if(SUCCEEDED(hres)) { VARIANT var, out; - if(!async_bsc) { + if(!navigated_binding) { V_VT(&var) = VT_I4; V_I4(&var) = 0; IOleCommandTarget_Exec(cmdtrg, &CGID_ShellDocView, 37, 0, &var, NULL); @@ -259,24 +244,39 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel IOleCommandTarget_Release(cmdtrg); } } +} - hres = create_doc_uri(This->window, url, &nsuri); +HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannelBSC *async_bsc, BOOL set_download) +{ + download_proc_task_t *download_task; + nsChannelBSC *bscallback; + nsWineURI *nsuri; + LPOLESTR url; + HRESULT hres; - if(SUCCEEDED(hres)) - { - if(async_bsc) { + hres = IMoniker_GetDisplayName(mon, pibc, NULL, &url); + if(FAILED(hres)) { + WARN("GetDiaplayName failed: %08x\n", hres); + return hres; + } + + TRACE("got url: %s\n", debugstr_w(url)); + + set_ready_state(This->window, READYSTATE_LOADING); + + hres = create_doc_uri(This->window, url, &nsuri); + if(SUCCEEDED(hres)) { + if(async_bsc) bscallback = async_bsc; - }else { + else hres = create_channelbsc(mon, NULL, NULL, 0, &bscallback); - } } - if(SUCCEEDED(hres)) - { + if(SUCCEEDED(hres)) { remove_target_tasks(This->task_magic); abort_document_bindings(This->doc_node); - hres = load_nsuri(This->window, nsuri, bscallback, LOAD_INITIAL_DOCUMENT_URI); + hres = load_nsuri(This->window, nsuri, bscallback, 0/*LOAD_INITIAL_DOCUMENT_URI*/); nsISupports_Release((nsISupports*)nsuri); /* FIXME */ if(SUCCEEDED(hres)) set_window_bscallback(This->window, bscallback); @@ -284,8 +284,7 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel IUnknown_Release((IUnknown*)bscallback); } - if(FAILED(hres)) - { + if(FAILED(hres)) { CoTaskMemFree(url); return hres; } @@ -293,6 +292,8 @@ HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, nsChannel HTMLDocument_LockContainer(This->doc_obj, TRUE); if(This->doc_obj->frame) { + docobj_task_t *task; + task = heap_alloc(sizeof(docobj_task_t)); task->doc = This->doc_obj; push_task(&task->header, set_progress_proc, This->doc_obj->basedoc.task_magic); @@ -433,6 +434,7 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva } } + prepare_for_binding(This, pimkName, pibc, FALSE); hres = set_moniker(This, pimkName, pibc, NULL, TRUE); if(FAILED(hres)) return hres; @@ -703,6 +705,7 @@ static HRESULT WINAPI PersistStreamInit_Load(IPersistStreamInit *iface, LPSTREAM return hres; } + prepare_for_binding(This, mon, NULL, FALSE); hres = set_moniker(This, mon, NULL, NULL, TRUE); IMoniker_Release(mon); if(FAILED(hres)) @@ -761,6 +764,7 @@ static HRESULT WINAPI PersistStreamInit_InitNew(IPersistStreamInit *iface) return hres; } + prepare_for_binding(This, mon, NULL, FALSE); hres = set_moniker(This, mon, NULL, NULL, FALSE); IMoniker_Release(mon); if(FAILED(hres))
1
0
0
0
Jacek Caban : mshtml: Downgrade GetAsciiHost FIXME to WARN.
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: bccd8997d116c0581dd977b7a743af88305ad902 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bccd8997d116c0581dd977b7a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jul 23 12:51:19 2011 +0200 mshtml: Downgrade GetAsciiHost FIXME to WARN. --- dlls/mshtml/nsio.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 7d26529..fdfa44f 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -2174,7 +2174,7 @@ static nsresult NSAPI nsURI_GetAsciiHost(nsIURL *iface, nsACString *aAsciiHost) if(This->nsuri) return nsIURI_GetAsciiHost(This->nsuri, aAsciiHost); - FIXME("Use Uri_PUNYCODE_IDN_HOST flag\n"); + WARN("Use Uri_PUNYCODE_IDN_HOST flag\n"); return get_uri_string(This, Uri_PROPERTY_HOST, aAsciiHost); }
1
0
0
0
Jacek Caban : mshtml: Moved script mode out of get_script_host to allow exec_script calls in Gecko script mode .
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: ddf46bbe9f86996a37a46e743cfe339b85ef79f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ddf46bbe9f86996a37a46e743…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jul 23 12:51:06 2011 +0200 mshtml: Moved script mode out of get_script_host to allow exec_script calls in Gecko script mode. --- dlls/mshtml/script.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index 01a849c..003413e 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -795,11 +795,6 @@ static ScriptHost *get_script_host(HTMLWindow *window, const GUID *guid) { ScriptHost *iter; - if(IsEqualGUID(&CLSID_JScript, guid) && window->scriptmode != SCRIPTMODE_ACTIVESCRIPT) { - TRACE("Ignoring JScript\n"); - return NULL; - } - LIST_FOR_EACH_ENTRY(iter, &window->script_hosts, ScriptHost, entry) { if(IsEqualGUID(guid, &iter->guid)) return iter; @@ -818,6 +813,11 @@ void doc_insert_script(HTMLWindow *window, nsIDOMHTMLScriptElement *nsscript) return; } + if(IsEqualGUID(&CLSID_JScript, &guid) && window->scriptmode != SCRIPTMODE_ACTIVESCRIPT) { + TRACE("Ignoring JScript\n"); + return; + } + script_host = get_script_host(window, &guid); if(!script_host) return; @@ -859,6 +859,11 @@ IDispatch *script_parse_event(HTMLWindow *window, LPCWSTR text) ptr = text; } + if(IsEqualGUID(&CLSID_JScript, &guid) && window->scriptmode != SCRIPTMODE_ACTIVESCRIPT) { + TRACE("Ignoring JScript\n"); + return NULL; + } + script_host = get_script_host(window, &guid); if(!script_host || !script_host->parse_proc) return NULL;
1
0
0
0
Jacek Caban : mshtml: Moved OLECMDID_SETDOWNLOADSTATE call to separated function.
by Alexandre Julliard
25 Jul '11
25 Jul '11
Module: wine Branch: master Commit: 402c87569969493bc4a3533d9973c3b3de86bb10 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=402c87569969493bc4a3533d9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sat Jul 23 12:50:49 2011 +0200 mshtml: Moved OLECMDID_SETDOWNLOADSTATE call to separated function. --- dlls/mshtml/mshtml_private.h | 1 + dlls/mshtml/nsevents.c | 45 ++++++++++++++++++++--------------------- dlls/mshtml/persist.c | 42 +++++++++++++++++++++++--------------- 3 files changed, 48 insertions(+), 40 deletions(-) diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 6344b0e..dfa627b 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -692,6 +692,7 @@ void set_current_mon(HTMLWindow*,IMoniker*) DECLSPEC_HIDDEN; HRESULT start_binding(HTMLWindow*,HTMLDocumentNode*,BSCallback*,IBindCtx*) DECLSPEC_HIDDEN; HRESULT async_start_doc_binding(HTMLWindow*,nsChannelBSC*) DECLSPEC_HIDDEN; void abort_document_bindings(HTMLDocumentNode*) DECLSPEC_HIDDEN; +void set_download_state(HTMLDocumentObj*,int) DECLSPEC_HIDDEN; HRESULT bind_mon_to_buffer(HTMLDocumentNode*,IMoniker*,void**,DWORD*) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/nsevents.c b/dlls/mshtml/nsevents.c index bd6faf6..c3b6e95 100644 --- a/dlls/mshtml/nsevents.c +++ b/dlls/mshtml/nsevents.c @@ -184,6 +184,7 @@ static nsresult NSAPI handle_keypress(nsIDOMEventListener *iface, static void handle_docobj_load(HTMLDocumentObj *doc) { + IOleCommandTarget *olecmd = NULL; HRESULT hres; if(doc->nscontainer->editor_controller) { @@ -195,33 +196,31 @@ static void handle_docobj_load(HTMLDocumentObj *doc) handle_edit_load(&doc->basedoc); if(doc->client) { - IOleCommandTarget *olecmd = NULL; - hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd); - if(SUCCEEDED(hres)) { - if(doc->download_state) { - VARIANT state, progress; - - V_VT(&progress) = VT_I4; - V_I4(&progress) = 0; - IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS, - OLECMDEXECOPT_DONTPROMPTUSER, &progress, NULL); - - V_VT(&state) = VT_I4; - V_I4(&state) = 0; - IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE, - OLECMDEXECOPT_DONTPROMPTUSER, &state, NULL); - } - - IOleCommandTarget_Exec(olecmd, &CGID_ShellDocView, 103, 0, NULL, NULL); - IOleCommandTarget_Exec(olecmd, &CGID_MSHTML, IDM_PARSECOMPLETE, 0, NULL, NULL); - IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_HTTPEQUIV_DONE, 0, NULL, NULL); - - IOleCommandTarget_Release(olecmd); + if(FAILED(hres)) + olecmd = NULL; + } + + if(doc->download_state) { + if(olecmd) { + VARIANT progress; + + V_VT(&progress) = VT_I4; + V_I4(&progress) = 0; + IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETPROGRESSPOS, + OLECMDEXECOPT_DONTPROMPTUSER, &progress, NULL); } + + set_download_state(doc, 0); } - doc->download_state = 0; + if(olecmd) { + IOleCommandTarget_Exec(olecmd, &CGID_ShellDocView, 103, 0, NULL, NULL); + IOleCommandTarget_Exec(olecmd, &CGID_MSHTML, IDM_PARSECOMPLETE, 0, NULL, NULL); + IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_HTTPEQUIV_DONE, 0, NULL, NULL); + + IOleCommandTarget_Release(olecmd); + } } static nsresult NSAPI handle_load(nsIDOMEventListener *iface, nsIDOMEvent *event) diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 64e27ed..0907810 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -94,6 +94,28 @@ void set_current_mon(HTMLWindow *This, IMoniker *mon) set_script_mode(This, use_gecko_script(This) ? SCRIPTMODE_GECKO : SCRIPTMODE_ACTIVESCRIPT); } +void set_download_state(HTMLDocumentObj *doc, int state) +{ + if(doc->client) { + IOleCommandTarget *olecmd; + HRESULT hres; + + hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd); + if(SUCCEEDED(hres)) { + VARIANT var; + + V_VT(&var) = VT_I4; + V_I4(&var) = state; + + IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE, + OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL); + IOleCommandTarget_Release(olecmd); + } + } + + doc->download_state = state; +} + static void set_progress_proc(task_t *_task) { docobj_task_t *task = (docobj_task_t*)_task; @@ -139,7 +161,6 @@ static void set_downloading_proc(task_t *_task) { download_proc_task_t *task = (download_proc_task_t*)_task; HTMLDocumentObj *doc = task->doc; - IOleCommandTarget *olecmd; HRESULT hres; TRACE("(%p)\n", doc); @@ -147,25 +168,12 @@ static void set_downloading_proc(task_t *_task) set_statustext(doc, IDS_STATUS_DOWNLOADINGFROM, task->url); CoTaskMemFree(task->url); + if(task->set_download) + set_download_state(doc, 1); + if(!doc->client) return; - if(task->set_download) { - hres = IOleClientSite_QueryInterface(doc->client, &IID_IOleCommandTarget, (void**)&olecmd); - if(SUCCEEDED(hres)) { - VARIANT var; - - V_VT(&var) = VT_I4; - V_I4(&var) = 1; - - IOleCommandTarget_Exec(olecmd, NULL, OLECMDID_SETDOWNLOADSTATE, - OLECMDEXECOPT_DONTPROMPTUSER, &var, NULL); - IOleCommandTarget_Release(olecmd); - } - - doc->download_state = 1; - } - if(doc->view_sink) IAdviseSink_OnViewChange(doc->view_sink, DVASPECT_CONTENT, -1);
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
84
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
Results per page:
10
25
50
100
200