Changeset 129692 in webkit


Ignore:
Timestamp:
Sep 26, 2012 1:10:16 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[Qt] load event fires on XMLHttpRequestUpload twice with Qt5
https://bugs.webkit.org/show_bug.cgi?id=92669

Patch by Marcelo Lira <marcelo.lira@openbossa.org> on 2012-09-26
Reviewed by Kenneth Rohde Christiansen.

When finishing, after the upload have already been done, Qt5's
QNetworkReply emits an uploadProgress signal with total bytes set to
zero. Since 0 of 0 bytes doesn't make any sense as progress, a
conditional was added to QNetworkReplyHandler::uploadProgress to make
do nothing with such values.

Unskip XMLHttpRequestUpload tests.

Source/WebCore:

  • platform/network/qt/QNetworkReplyHandler.cpp:

(WebCore::QNetworkReplyHandler::uploadProgress):

LayoutTests:

  • platform/qt-5.0/Skipped:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r129691 r129692  
     12012-09-26  Marcelo Lira  <marcelo.lira@openbossa.org>
     2
     3        [Qt] load event fires on XMLHttpRequestUpload twice with Qt5
     4        https://bugs.webkit.org/show_bug.cgi?id=92669
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        When finishing, after the upload have already been done, Qt5's
     9        QNetworkReply emits an uploadProgress signal with total bytes set to
     10        zero. Since 0 of 0 bytes doesn't make any sense as progress, a
     11        conditional was added to QNetworkReplyHandler::uploadProgress to make
     12        do nothing with such values.
     13
     14        Unskip XMLHttpRequestUpload tests.
     15
     16        * platform/qt-5.0/Skipped:
     17
    1182012-09-26  Filip Pizlo  <fpizlo@apple.com>
    219
  • trunk/LayoutTests/platform/qt-5.0/Skipped

    r129234 r129692  
    1 # [Qt] load event fires on XMLHttpRequestUpload twice with Qt5
    2 # https://bugs.webkit.org/show_bug.cgi?id=92669
    3 http/tests/xmlhttprequest/upload-onprogress-event.html
    4 http/tests/xmlhttprequest/upload-progress-events.html
    5 
    61# timeout
    72fast/events/bogus-dropEffect-effectAllowed.html
  • trunk/Source/WebCore/ChangeLog

    r129689 r129692  
     12012-09-26  Marcelo Lira  <marcelo.lira@openbossa.org>
     2
     3        [Qt] load event fires on XMLHttpRequestUpload twice with Qt5
     4        https://bugs.webkit.org/show_bug.cgi?id=92669
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        When finishing, after the upload have already been done, Qt5's
     9        QNetworkReply emits an uploadProgress signal with total bytes set to
     10        zero. Since 0 of 0 bytes doesn't make any sense as progress, a
     11        conditional was added to QNetworkReplyHandler::uploadProgress to make
     12        do nothing with such values.
     13
     14        Unskip XMLHttpRequestUpload tests.
     15
     16        * platform/network/qt/QNetworkReplyHandler.cpp:
     17        (WebCore::QNetworkReplyHandler::uploadProgress):
     18
    1192012-09-26  Bear Travis  <betravis@adobe.com>
    220
  • trunk/Source/WebCore/platform/network/qt/QNetworkReplyHandler.cpp

    r129647 r129692  
    582582    if (!client)
    583583        return;
     584
     585    if (!bytesTotal) {
     586        // When finished QNetworkReply emits a progress of 0 bytes.
     587        // Ignore that, to avoid firing twice.
     588        return;
     589    }
    584590
    585591    client->didSendData(m_resourceHandle, bytesSent, bytesTotal);
Note: See TracChangeset for help on using the changeset viewer.