Jacek Caban : mshtml: Fixed the first ReportData invocation when binding from objects created by BindToObject .

Alexandre Julliard julliard at winehq.org
Thu Oct 14 10:56:21 CDT 2010


Module: wine
Branch: master
Commit: e0ef2d177443d7768c565e7c401e74b3be2feab8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e0ef2d177443d7768c565e7c401e74b3be2feab8

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Oct 14 00:51:18 2010 +0200

mshtml: Fixed the first ReportData invocation when binding from objects created by BindToObject.

---

 dlls/urlmon/binding.c   |    3 ++-
 dlls/urlmon/tests/url.c |    6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index ca2b91d..99aaf02 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -1566,7 +1566,8 @@ static HRESULT start_binding(IMoniker *mon, Binding *binding_ctx, LPCWSTR url, I
         set_binding_sink(binding->protocol, PROTSINK(binding), BINDINF(binding));
         if(binding_ctx->redirect_url)
             IBindStatusCallback_OnProgress(binding->callback, 0, 0, BINDSTATUS_REDIRECTING, binding_ctx->redirect_url);
-        report_data(binding, 0, 0, 0);
+        report_data(binding, BSCF_FIRSTDATANOTIFICATION | (binding_ctx->download_state == END_DOWNLOAD ? BSCF_LASTDATANOTIFICATION : 0),
+                0, 0);
     }else {
         hres = IInternetProtocol_Start(binding->protocol, url, PROTSINK(binding),
                  BINDINF(binding), PI_APARTMENTTHREADED|PI_MIMEVERIFICATION, 0);
diff --git a/dlls/urlmon/tests/url.c b/dlls/urlmon/tests/url.c
index 03a95fd..818fff9 100644
--- a/dlls/urlmon/tests/url.c
+++ b/dlls/urlmon/tests/url.c
@@ -189,7 +189,7 @@ static IInternetProtocolSink *protocol_sink = NULL;
 static IBinding *current_binding;
 static HANDLE complete_event, complete_event2;
 static HRESULT binding_hres;
-static BOOL have_IHttpNegotiate2, use_bscex;
+static BOOL have_IHttpNegotiate2, use_bscex, is_async_prot;
 static BOOL test_redirect, use_cache_file, callback_read, no_callback, test_abort;
 static WCHAR cache_file_name[MAX_PATH];
 
@@ -1601,6 +1601,9 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW
        download_state);
     data_available = TRUE;
 
+    if(bind_to_object && !is_async_prot)
+        ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION), "grfBSCF = %x\n", grfBSCF);
+
     ok(pformatetc != NULL, "pformatetx == NULL\n");
     if(pformatetc) {
         if (mime_type[0]) {
@@ -2452,6 +2455,7 @@ static void init_bind_test(int protocol, DWORD flags, DWORD t)
     callback_read = !(flags & BINDTEST_NO_CALLBACK_READ);
     no_callback = (flags & BINDTEST_NO_CALLBACK) != 0;
     test_abort = (flags & BINDTEST_ABORT) != 0;
+    is_async_prot = protocol == HTTP_TEST || protocol == HTTPS_TEST || protocol == FTP_TEST || protocol == WINETEST_TEST;
 }
 
 static void test_BindToStorage(int protocol, DWORD flags, DWORD t)




More information about the wine-cvs mailing list