[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:50:52 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 4dbca1ea7439bba4f4000d62a09754b601289d27
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 28 03:39:02 2009 +0000

    2009-12-27  Jakub Wieczorek  <faw217 at gmail.com>
    
            Reviewed by Eric Seidel.
    
            [Qt] Support upload progress events in XMLHttpRequest
            https://bugs.webkit.org/show_bug.cgi?id=32969
    
            Make QNetworkReplyHandler report the upload progress to the client.
    
            Already covered by tests:
            http/tests/xmlhttprequest/upload-onload-event.html
            http/tests/xmlhttprequest/upload-onloadstart-event.html
            http/tests/xmlhttprequest/upload-progress-events.html
            http/tests/xmlhttprequest/upload-onprogress-event.html
    
            which have been unskipped.
    
            * platform/network/qt/QNetworkReplyHandler.cpp:
            (WebCore::QNetworkReplyHandler::uploadProgress):
            (WebCore::QNetworkReplyHandler::start):
            * platform/network/qt/QNetworkReplyHandler.h:
    2009-12-27  Jakub Wieczorek  <faw217 at gmail.com>
    
            Reviewed by Eric Seidel.
    
            [Qt] Support upload progress events in XMLHttpRequest
            https://bugs.webkit.org/show_bug.cgi?id=32969
    
            Make QNetworkReplyHandler report the upload progress to the client.
    
            Already covered by tests:
            http/tests/xmlhttprequest/upload-onload-event.html
            http/tests/xmlhttprequest/upload-onloadstart-event.html
            http/tests/xmlhttprequest/upload-progress-events.html
            http/tests/xmlhttprequest/upload-onprogress-event.html
    
            which have been unskipped.
    
            * platform/qt/Skipped:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52590 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c59a16a..2eb4014 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,22 @@
+2009-12-27  Jakub Wieczorek  <faw217 at gmail.com>
+
+        Reviewed by Eric Seidel.
+
+        [Qt] Support upload progress events in XMLHttpRequest
+        https://bugs.webkit.org/show_bug.cgi?id=32969
+
+        Make QNetworkReplyHandler report the upload progress to the client.
+
+        Already covered by tests:
+        http/tests/xmlhttprequest/upload-onload-event.html
+        http/tests/xmlhttprequest/upload-onloadstart-event.html
+        http/tests/xmlhttprequest/upload-progress-events.html
+        http/tests/xmlhttprequest/upload-onprogress-event.html
+
+        which have been unskipped.
+
+        * platform/qt/Skipped:
+
 2009-12-27  Maciej Stachowiak  <mjs at apple.com>
 
         Rubber stamped by Adam Barth.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 4dd2b4f..2bbdce5 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -4998,9 +4998,6 @@ http/tests/xmlhttprequest/re-login-async.html
 http/tests/xmlhttprequest/re-login.html
 http/tests/xmlhttprequest/redirect-cross-origin-tripmine.html
 http/tests/xmlhttprequest/state-after-network-error.html
-http/tests/xmlhttprequest/upload-onload-event.html
-http/tests/xmlhttprequest/upload-onprogress-event.html
-http/tests/xmlhttprequest/upload-progress-events.html
 http/tests/xmlhttprequest/workers/methods-async.html
 http/tests/xmlhttprequest/workers/methods.html
 http/tests/xmlhttprequest/workers/shared-worker-methods-async.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e9977c2..5858a4f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2009-12-27  Jakub Wieczorek  <faw217 at gmail.com>
+
+        Reviewed by Eric Seidel.
+
+        [Qt] Support upload progress events in XMLHttpRequest
+        https://bugs.webkit.org/show_bug.cgi?id=32969
+
+        Make QNetworkReplyHandler report the upload progress to the client.
+
+        Already covered by tests:
+        http/tests/xmlhttprequest/upload-onload-event.html
+        http/tests/xmlhttprequest/upload-onloadstart-event.html
+        http/tests/xmlhttprequest/upload-progress-events.html
+        http/tests/xmlhttprequest/upload-onprogress-event.html
+
+        which have been unskipped.
+
+        * platform/network/qt/QNetworkReplyHandler.cpp:
+        (WebCore::QNetworkReplyHandler::uploadProgress):
+        (WebCore::QNetworkReplyHandler::start):
+        * platform/network/qt/QNetworkReplyHandler.h:
+
 2009-12-27  Dirk Schulze  <krit at webkit.org>
 
         Reviewed by Nikolas Zimmermann.
diff --git a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 1edc5c6..559ef84 100644
--- a/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -383,6 +383,18 @@ void QNetworkReplyHandler::forwardData()
     }
 }
 
+void QNetworkReplyHandler::uploadProgress(qint64 bytesSent, qint64 bytesTotal)
+{
+    if (!m_resourceHandle)
+        return;
+
+    ResourceHandleClient* client = m_resourceHandle->client();
+    if (!client)
+        return;
+
+    client->didSendData(m_resourceHandle, bytesSent, bytesTotal);
+}
+
 void QNetworkReplyHandler::start()
 {
     m_shouldStart = false;
@@ -452,6 +464,11 @@ void QNetworkReplyHandler::start()
     connect(m_reply, SIGNAL(readyRead()),
             this, SLOT(forwardData()), SIGNAL_CONN);
 
+    if (m_resourceHandle->request().reportUploadProgress()) {
+        connect(m_reply, SIGNAL(uploadProgress(qint64, qint64)),
+                this, SLOT(uploadProgress(qint64, qint64)), SIGNAL_CONN);
+    }
+
     // Make this a direct function call once we require 4.6.1+.
     connect(this, SIGNAL(processQueuedItems()),
             this, SLOT(sendQueuedItems()), SIGNAL_CONN);
diff --git a/WebCore/platform/network/qt/QNetworkReplyHandler.h b/WebCore/platform/network/qt/QNetworkReplyHandler.h
index 2171083..eb5ae3c 100644
--- a/WebCore/platform/network/qt/QNetworkReplyHandler.h
+++ b/WebCore/platform/network/qt/QNetworkReplyHandler.h
@@ -62,6 +62,7 @@ private slots:
     void sendResponseIfNeeded();
     void forwardData();
     void sendQueuedItems();
+    void uploadProgress(qint64 bytesSent, qint64 bytesTotal);
 
 private:
     void start();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list