[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.20-204-g221d8e8

yael.aharon at nokia.com yael.aharon at nokia.com
Wed Feb 10 22:11:28 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 0e10edd47821996cc8e19f8cd1456b97bd8f26ec
Author: yael.aharon at nokia.com <yael.aharon at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 3 22:00:21 2010 +0000

    [Qt] WebSockets : Buffer the data in WebKit instead of QtNetwork
    https://bugs.webkit.org/show_bug.cgi?id=34425
    
    Reviewed by Kenneth Rohde Christiansen.
    
    Reverting r54279, it was a misunderstanding.
    
    * platform/network/qt/SocketStreamHandlePrivate.h:
    * platform/network/qt/SocketStreamHandleQt.cpp:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54298 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index fbacc54..b485ac3 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-02-03  Yael Aharon  <yael.aharon at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] WebSockets : Buffer the data in WebKit instead of QtNetwork
+        https://bugs.webkit.org/show_bug.cgi?id=34425
+
+        Reverting r54279, it was a misunderstanding.
+
+        * platform/network/qt/SocketStreamHandlePrivate.h:
+        * platform/network/qt/SocketStreamHandleQt.cpp:
+        (WebCore::SocketStreamHandlePrivate::SocketStreamHandlePrivate):
+        (WebCore::SocketStreamHandlePrivate::send):
+        (WebCore::SocketStreamHandlePrivate::close):
+
 2010-02-03  Drew Wilson  <atwilson at chromium.org>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/platform/network/qt/SocketStreamHandlePrivate.h b/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
index db72c6c..235f1b1 100644
--- a/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
+++ b/WebCore/platform/network/qt/SocketStreamHandlePrivate.h
@@ -55,7 +55,6 @@ public slots:
     int send(const char* data, int len);
     void close();
     void socketSentdata();
-    void socketBytesWritten(qint64);
     void socketClosed();
     void socketError(QAbstractSocket::SocketError);
     void socketClosedCallback();
@@ -66,7 +65,6 @@ public slots:
 public:
     QTcpSocket* m_socket;
     SocketStreamHandle* m_streamHandle;
-    QByteArray m_data;
 };
 
 }
diff --git a/WebCore/platform/network/qt/SocketStreamHandleQt.cpp b/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
index 5c2cd0a..e666ff7 100644
--- a/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
+++ b/WebCore/platform/network/qt/SocketStreamHandleQt.cpp
@@ -56,15 +56,7 @@ SocketStreamHandlePrivate::SocketStreamHandlePrivate(SocketStreamHandle* streamH
     if (!m_socket)
         return;
 
-    if (isSecure) {
-#ifndef QT_NO_OPENSSL
-        connect(m_socket, SIGNAL(encrypted()), this, SLOT(socketConnected()));
-        connect(m_socket, SIGNAL(encryptedBytesWritten(qint64)), this, SLOT(socketBytesWritten(qint64)));
-#endif
-    } else {
-        connect(m_socket, SIGNAL(connected()), this, SLOT(socketConnected()));
-        connect(m_socket, SIGNAL(bytesWritten(qint64)), this, SLOT(socketBytesWritten(qint64)));
-    }
+    connect(m_socket, SIGNAL(connected()), this, SLOT(socketConnected()));
     connect(m_socket, SIGNAL(readyRead()), this, SLOT(socketReadyRead()));
     connect(m_socket, SIGNAL(disconnected()), this, SLOT(socketClosed()));
     connect(m_socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
@@ -107,17 +99,14 @@ int SocketStreamHandlePrivate::send(const char* data, int len)
 {
     if (!m_socket || m_socket->state() != QAbstractSocket::ConnectedState)
         return 0;
-    // If we are already sending something, then m_data is not empty.
-    bool sending = m_data.length() > 0;
-    m_data.append(data, len);
-    if (!sending)
-        m_socket->write(m_data);
-    return len;
+    quint64 sentSize = m_socket->write(data, len);
+    QMetaObject::invokeMethod(this, "socketSentData", Qt::QueuedConnection);
+    return sentSize;
 }
 
 void SocketStreamHandlePrivate::close()
 {
-    if (m_socket)
+    if (m_socket && m_socket->state() == QAbstractSocket::ConnectedState)
         m_socket->close();
 }
 
@@ -127,18 +116,6 @@ void SocketStreamHandlePrivate::socketSentdata()
         m_streamHandle->sendPendingData();
 }
 
-void SocketStreamHandlePrivate::socketBytesWritten(qint64 written)
-{
-    if (!m_socket || m_socket->state() != QAbstractSocket::ConnectedState || written < 0)
-        return;
-    m_data.remove(0, written);
-    // If we are done sending all the data, then m_data is now empty
-    if (m_data.isEmpty())
-        QMetaObject::invokeMethod(this, "socketSentdata", Qt::QueuedConnection);
-    else
-        m_socket->write(m_data);
-}
-
 void SocketStreamHandlePrivate::socketClosed()
 {
     QMetaObject::invokeMethod(this, "socketClosedCallback", Qt::QueuedConnection);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list