Title: [87797] trunk/Source/WebKit/qt
Revision
87797
Author
[email protected]
Date
2011-06-01 05:39:46 -0700 (Wed, 01 Jun 2011)

Log Message

2011-06-01  Andreas Kling  <[email protected]>

        Reviewed by Benjamin Poulain.

        REGRESSION: [Qt] QNetworkReply delivered by the unsupportedContent() signal does not contain downloaded data
        https://bugs.webkit.org/show_bug.cgi?id=49650

        Defer emission of QWebPage::unsupportedContent() until we're back in the event loop.
        This lets the QNAM backend finish with the reply without handing over ownership to the user code.

        No new tests since this doesn't fail for qrc:// or file:// URLs and our tests can't depend on http:// URLs.

        To correctly solve this issue, we need changes to Qt, tracked here:
        http://bugreports.qt.nokia.com/browse/QTBUG-18718

        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::setFrame):
        (WebCore::FrameLoaderClientQt::download):
        * WebCoreSupport/FrameLoaderClientQt.h:

Modified Paths

Diff

Modified: trunk/Source/WebKit/qt/ChangeLog (87796 => 87797)


--- trunk/Source/WebKit/qt/ChangeLog	2011-06-01 12:16:09 UTC (rev 87796)
+++ trunk/Source/WebKit/qt/ChangeLog	2011-06-01 12:39:46 UTC (rev 87797)
@@ -1,3 +1,23 @@
+2011-06-01  Andreas Kling  <[email protected]>
+
+        Reviewed by Benjamin Poulain.
+
+        REGRESSION: [Qt] QNetworkReply delivered by the unsupportedContent() signal does not contain downloaded data
+        https://bugs.webkit.org/show_bug.cgi?id=49650
+
+        Defer emission of QWebPage::unsupportedContent() until we're back in the event loop.
+        This lets the QNAM backend finish with the reply without handing over ownership to the user code.
+
+        No new tests since this doesn't fail for qrc:// or file:// URLs and our tests can't depend on http:// URLs.
+
+        To correctly solve this issue, we need changes to Qt, tracked here:
+        http://bugreports.qt.nokia.com/browse/QTBUG-18718
+
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::setFrame):
+        (WebCore::FrameLoaderClientQt::download):
+        * WebCoreSupport/FrameLoaderClientQt.h:
+
 2011-06-01  Caio Marcelo de Oliveira Filho  <[email protected]>
 
         Reviewed by Tor Arne Vestbø.

Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp (87796 => 87797)


--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2011-06-01 12:16:09 UTC (rev 87796)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp	2011-06-01 12:39:46 UTC (rev 87797)
@@ -238,6 +238,12 @@
             m_webFrame->page(), SIGNAL(loadProgress(int)));
     connect(this, SIGNAL(loadFinished(bool)),
             m_webFrame->page(), SIGNAL(loadFinished(bool)));
+
+    // FIXME: The queued connection here is needed because of a problem with QNetworkAccessManager.
+    //        See http://bugreports.qt.nokia.com/browse/QTBUG-18718
+    connect(this, SIGNAL(unsupportedContent(QNetworkReply*)),
+            m_webFrame->page(), SIGNAL(unsupportedContent(QNetworkReply*)), Qt::QueuedConnection);
+
     connect(this, SIGNAL(loadFinished(bool)),
             m_webFrame, SIGNAL(loadFinished(bool)));
     connect(this, SIGNAL(titleChanged(QString)),
@@ -1017,7 +1023,7 @@
     if (reply) {
         QWebPage* page = m_webFrame->page();
         if (page->forwardUnsupportedContent())
-            emit page->unsupportedContent(reply);
+            emit unsupportedContent(reply);
         else
             reply->abort();
     }

Modified: trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h (87796 => 87797)


--- trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h	2011-06-01 12:16:09 UTC (rev 87796)
+++ trunk/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h	2011-06-01 12:39:46 UTC (rev 87797)
@@ -43,6 +43,8 @@
 #include <QUrl>
 #include <qobject.h>
 #include <wtf/Forward.h>
+
+class QNetworkReply;
 class QWebFrame;
 
 namespace WebCore {
@@ -68,6 +70,7 @@
     void loadProgress(int d);
     void loadFinished(bool);
     void titleChanged(const QString& title);
+    void unsupportedContent(QNetworkReply*);
 
 public:
     FrameLoaderClientQt();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to