[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

chang.shu at nokia.com chang.shu at nokia.com
Wed Dec 22 18:25:50 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit eff3dea4cb699a6406e8395139c16c69903f7ef0
Author: chang.shu at nokia.com <chang.shu at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 10 21:01:31 2010 +0000

    2010-12-10  Krithigassree Sambamurthy  <krithigassree.sambamurthy at nokia.com>
    
            Reviewed by Joseph Pecoraro.
    
            Bug 43455 - [Qt]: Implement Application Cache Quotas
            https://bugs.webkit.org/show_bug.cgi?id=43455
    
            Added new signal to report ApplicationCache Database
            quota.
    
            * Api/qwebpage.cpp:
            * Api/qwebpage.h:
    
            Added new functions to accomodate new appcache layout
            test origin-quota.html.
    
            * Api/qwebsecurityorigin.cpp:
            (QWebSecurityOrigin::setApplicationCacheQuota):
            * Api/qwebsecurityorigin.h:
            * WebCoreSupport/ChromeClientQt.cpp:
            (WebCore::ChromeClientQt::reachedApplicationCacheOriginQuota):
            * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
            (DumpRenderTreeSupportQt::clearAllApplicationCaches):
            * WebCoreSupport/DumpRenderTreeSupportQt.h:
    
    2010-12-10  Krithigassree Sambamurthy  <krithigassree.sambamurthy at nokia.com>
    
            Reviewed by Joseph Pecoraro.
    
            [Qt]: Implement Application Cache Quotas
            https://bugs.webkit.org/show_bug.cgi?id=43455
    
            * platform/qt/Skipped: Unskip now passing test origin-quota.html
    
    2010-12-10  Krithigassree Sambamurthy  <krithigassree.sambamurthy at nokia.com>
    
            Reviewed by Joseph Pecoraro.
    
            Bug 43455 - [Qt]: Implement Application Cache Quotas
            https://bugs.webkit.org/show_bug.cgi?id=43455
    
            Introduce functions to allow new appcache layout test origin-quota.html
            to work correctly under Qt.
    
            * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
            (WebCore::DumpRenderTree::DumpRenderTree):
            (WebCore::DumpRenderTree::dumpApplicationCacheQuota):
            * DumpRenderTree/qt/DumpRenderTreeQt.h:
    
            Introduce functions to allow new appcache layout test origin-quota.html
            to be successful under qt. Changes required because LayoutTestControllerQt
            does not inherit from LayoutController.
    
            * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
            (LayoutTestController::reset):
            (LayoutTestController::clearAllApplicationCaches):
            (LayoutTestController::setApplicationCacheOriginQuota):
            * DumpRenderTree/qt/LayoutTestControllerQt.h:
            (LayoutTestController::shouldDumpApplicationCacheDelegateCallbacks):
            (LayoutTestController::dumpApplicationCacheDelegateCallbacks):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73789 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 12248e5..6f63e26 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-12-10  Krithigassree Sambamurthy  <krithigassree.sambamurthy at nokia.com>
+
+        Reviewed by Joseph Pecoraro.
+
+        [Qt]: Implement Application Cache Quotas
+        https://bugs.webkit.org/show_bug.cgi?id=43455
+
+        * platform/qt/Skipped: Unskip now passing test origin-quota.html
+
 2010-12-09  Jenn Braithwaite  <jennb at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 5145283..e36387c 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -1508,11 +1508,6 @@ animations/animation-drt-api.html
 animations/animation-drt-api-multiple-keyframes.html
 
 # ============================================================================= #
-# failing application cache quota tests
-# ============================================================================= #
-http/tests/appcache/origin-quota.html
-
-# ============================================================================= #
 # Failing CSS Tests
 # ============================================================================= #
 css1/classification/white_space.html
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 7eda04f..6fae04f 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -4121,6 +4121,13 @@ quint64 QWebPage::bytesReceived() const
 
     \sa QWebDatabase
 */
+/*!
+    \fn void QWebPage::applicationCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 defaultOriginQuota);
+
+    This signal is emitted whenever the web site is asking to store data to the application cache
+    database databaseName and the quota allocated to that web site is exceeded.
+
+*/
 
 /*!
   \since 4.5
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index f1f5d24..1e0b3b7 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -48,6 +48,7 @@ class QWebHitTestResult;
 class QWebNetworkInterface;
 class QWebPagePrivate;
 class QWebPluginFactory;
+class QWebSecurityOrigin;
 class QtViewportAttributesPrivate;
 
 namespace WebCore {
@@ -387,6 +388,7 @@ Q_SIGNALS:
     void microFocusChanged();
     void contentsChanged();
     void databaseQuotaExceeded(QWebFrame* frame, QString databaseName);
+    void applicationCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 defaultOriginQuota);
 
     void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item);
     void restoreFrameStateRequested(QWebFrame* frame);
diff --git a/WebKit/qt/Api/qwebsecurityorigin.cpp b/WebKit/qt/Api/qwebsecurityorigin.cpp
index e8c8f33..08e8f69 100644
--- a/WebKit/qt/Api/qwebsecurityorigin.cpp
+++ b/WebKit/qt/Api/qwebsecurityorigin.cpp
@@ -19,14 +19,15 @@
 
 #include "config.h"
 #include "qwebsecurityorigin.h"
-#include "qwebsecurityorigin_p.h"
-#include "qwebdatabase.h"
-#include "qwebdatabase_p.h"
 
+#include "ApplicationCacheStorage.h"
 #include "DatabaseTracker.h"
 #include "KURL.h"
 #include "SchemeRegistry.h"
 #include "SecurityOrigin.h"
+#include "qwebdatabase.h"
+#include "qwebdatabase_p.h"
+#include "qwebsecurityorigin_p.h"
 #include <QStringList>
 
 using namespace WebCore;
@@ -152,6 +153,12 @@ void QWebSecurityOrigin::setDatabaseQuota(qint64 quota)
 #endif
 }
 
+void QWebSecurityOrigin::setApplicationCacheQuota(qint64 quota)
+{
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+    WebCore::cacheStorage().storeUpdatedQuotaForOrigin(d->origin.get(), quota);
+#endif
+}
 /*!
     Destroys the security origin.
 */
diff --git a/WebKit/qt/Api/qwebsecurityorigin.h b/WebKit/qt/Api/qwebsecurityorigin.h
index 16f8bc1..7328680 100644
--- a/WebKit/qt/Api/qwebsecurityorigin.h
+++ b/WebKit/qt/Api/qwebsecurityorigin.h
@@ -51,6 +51,7 @@ public:
     qint64 databaseQuota() const;
 
     void setDatabaseQuota(qint64 quota);
+    void setApplicationCacheQuota(qint64 quota);
 
     QList<QWebDatabase> databases() const;
 
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 91a02d6..964c484 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,28 @@
+2010-12-10  Krithigassree Sambamurthy  <krithigassree.sambamurthy at nokia.com>
+
+        Reviewed by Joseph Pecoraro.
+
+        Bug 43455 - [Qt]: Implement Application Cache Quotas
+        https://bugs.webkit.org/show_bug.cgi?id=43455
+
+        Added new signal to report ApplicationCache Database
+        quota.
+
+        * Api/qwebpage.cpp:
+        * Api/qwebpage.h:
+
+        Added new functions to accomodate new appcache layout
+        test origin-quota.html.
+
+        * Api/qwebsecurityorigin.cpp:
+        (QWebSecurityOrigin::setApplicationCacheQuota):
+        * Api/qwebsecurityorigin.h:
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::reachedApplicationCacheOriginQuota):
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        (DumpRenderTreeSupportQt::clearAllApplicationCaches):
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
 2010-12-10  Jocelyn Turcotte  <jocelyn.turcotte at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index e72ef3e..9d3673f 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -30,6 +30,7 @@
 #include "config.h"
 #include "ChromeClientQt.h"
 
+#include "ApplicationCacheStorage.h"
 #include "DatabaseTracker.h"
 #include "FileChooser.h"
 #include "Frame.h"
@@ -518,9 +519,18 @@ void ChromeClientQt::reachedMaxAppCacheSize(int64_t)
     notImplemented();
 }
 
-void ChromeClientQt::reachedApplicationCacheOriginQuota(SecurityOrigin*)
+void ChromeClientQt::reachedApplicationCacheOriginQuota(SecurityOrigin* origin)
 {
-    notImplemented();
+    int64_t quota;
+    quint64 defaultOriginQuota = WebCore::cacheStorage().defaultOriginQuota();
+
+    QWebSecurityOriginPrivate* priv = new QWebSecurityOriginPrivate(origin);
+    QWebSecurityOrigin* securityOrigin = new QWebSecurityOrigin(priv);
+
+    if (!WebCore::cacheStorage().quotaForOrigin(origin, quota))
+       WebCore::cacheStorage().storeUpdatedQuotaForOrigin(origin, defaultOriginQuota);
+
+    emit m_webPage->applicationCacheQuotaExceeded(securityOrigin, defaultOriginQuota);
 }
 #endif
 
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index a2863b1..f18894d 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -23,6 +23,7 @@
 #include "config.h"
 #include "DumpRenderTreeSupportQt.h"
 
+#include "ApplicationCacheStorage.h"
 #include "CSSComputedStyleDeclaration.h"
 #include "ChromeClientQt.h"
 #include "ContextMenu.h"
@@ -585,6 +586,14 @@ void DumpRenderTreeSupportQt::setEditingBehavior(QWebPage* page, const QString&
     corePage->settings()->setEditingBehaviorType(coreEditingBehavior);
 }
 
+void DumpRenderTreeSupportQt::clearAllApplicationCaches()
+{
+#if ENABLE(OFFLINE_WEB_APPLICATIONS)
+    WebCore::cacheStorage().empty();
+    WebCore::cacheStorage().vacuumDatabaseFile();
+#endif
+}
+
 void DumpRenderTreeSupportQt::dumpFrameLoader(bool b)
 {
     FrameLoaderClientQt::dumpFrameLoaderCallbacks = b;
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 98f2b94..184d822 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -88,6 +88,8 @@ public:
     static bool elementDoesAutoCompleteForElementWithId(QWebFrame* frame, const QString& elementId);
     static void setEditingBehavior(QWebPage* page, const QString& editingBehavior);
 
+    static void clearAllApplicationCaches();
+
     static void whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
     static void removeWhiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
     static void resetOriginAccessWhiteLists();
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 836c326..a86e7ab 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,30 @@
+2010-12-10  Krithigassree Sambamurthy  <krithigassree.sambamurthy at nokia.com>
+
+        Reviewed by Joseph Pecoraro.
+
+        Bug 43455 - [Qt]: Implement Application Cache Quotas
+        https://bugs.webkit.org/show_bug.cgi?id=43455
+
+        Introduce functions to allow new appcache layout test origin-quota.html
+        to work correctly under Qt.
+
+        * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+        (WebCore::DumpRenderTree::DumpRenderTree):
+        (WebCore::DumpRenderTree::dumpApplicationCacheQuota):
+        * DumpRenderTree/qt/DumpRenderTreeQt.h:
+
+        Introduce functions to allow new appcache layout test origin-quota.html
+        to be successful under qt. Changes required because LayoutTestControllerQt
+        does not inherit from LayoutController.
+
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        (LayoutTestController::reset):
+        (LayoutTestController::clearAllApplicationCaches):
+        (LayoutTestController::setApplicationCacheOriginQuota):
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+        (LayoutTestController::shouldDumpApplicationCacheDelegateCallbacks):
+        (LayoutTestController::dumpApplicationCacheDelegateCallbacks):
+
 2010-12-10  Eric Seidel  <eric at webkit.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index 23546f0..c287152 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -480,6 +480,8 @@ DumpRenderTree::DumpRenderTree()
             SLOT(titleChanged(const QString&)));
     connect(m_page, SIGNAL(databaseQuotaExceeded(QWebFrame*,QString)),
             this, SLOT(dumpDatabaseQuota(QWebFrame*,QString)));
+    connect(m_page, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin *, quint64)),
+            this, SLOT(dumpApplicationCacheQuota(QWebSecurityOrigin *, quint64)));
     connect(m_page, SIGNAL(statusBarMessage(const QString&)),
             this, SLOT(statusBarMessage(const QString&)));
 
@@ -1022,6 +1024,19 @@ void DumpRenderTree::dumpDatabaseQuota(QWebFrame* frame, const QString& dbName)
     origin.setDatabaseQuota(5 * 1024 * 1024);
 }
 
+void DumpRenderTree::dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota)
+{
+    if (!m_controller->shouldDumpApplicationCacheDelegateCallbacks())
+        return;
+
+    printf("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{%s, %s, %i}\n",
+           origin->scheme().toUtf8().data(),
+           origin->host().toUtf8().data(),
+           origin->port()
+           );
+    origin->setApplicationCacheQuota(defaultOriginQuota);
+}
+
 void DumpRenderTree::statusBarMessage(const QString& message)
 {
     if (!m_controller->shouldDumpStatusCallbacks())
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
index 283ebd9..ef95bfc 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
@@ -116,6 +116,7 @@ public Q_SLOTS:
     void titleChanged(const QString &s);
     void connectFrame(QWebFrame *frame);
     void dumpDatabaseQuota(QWebFrame* frame, const QString& dbName);
+    void dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota);
     void statusBarMessage(const QString& message);
     void windowCloseRequested();
 
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 8b495be..9e6efc0 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -58,6 +58,7 @@ void LayoutTestController::reset()
     m_waitForDone = false;
     m_dumpTitleChanges = false;
     m_dumpDatabaseCallbacks = false;
+    m_dumpApplicationCacheDelegateCallbacks = false;
     m_dumpStatusCallbacks = false;
     m_timeoutTimer.stop();
     m_topLoadingFrame = 0;
@@ -541,12 +542,14 @@ void LayoutTestController::dispatchPendingLoadRequests()
 
 void LayoutTestController::clearAllApplicationCaches()
 {
-    // FIXME: implement to support Application Cache quotas.
+    DumpRenderTreeSupportQt::clearAllApplicationCaches();
 }
 
 void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota)
 {
-    // FIXME: implement to support Application Cache quotas.
+    if (!m_topLoadingFrame)
+        return;
+    m_topLoadingFrame->securityOrigin().setApplicationCacheQuota(quota);
 }
 
 void LayoutTestController::setDatabaseQuota(int size)
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 9ba2364..5fddef1 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -64,6 +64,7 @@ public:
     bool shouldDumpChildrenAsText() const { return m_dumpChildrenAsText; }
     bool shouldDumpChildFrameScrollPositions() const { return m_dumpChildFrameScrollPositions; }
     bool shouldDumpDatabaseCallbacks() const { return m_dumpDatabaseCallbacks; }
+    bool shouldDumpApplicationCacheDelegateCallbacks() const { return m_dumpApplicationCacheDelegateCallbacks; }
     bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
     bool shouldWaitUntilDone() const { return m_waitForDone; }
     bool shouldHandleErrorPages() const { return m_handleErrorPages; }
@@ -94,6 +95,7 @@ public slots:
     void dumpChildFramesAsText() { m_dumpChildrenAsText = true; }
     void dumpChildFrameScrollPositions() { m_dumpChildFrameScrollPositions = true; }
     void dumpDatabaseCallbacks() { m_dumpDatabaseCallbacks = true; }
+    void dumpApplicationCacheDelegateCallbacks() { m_dumpApplicationCacheDelegateCallbacks = true;}
     void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }
     void setCanOpenWindows() { m_canOpenWindows = true; }
     void setPrinting() { m_isPrinting = true; }
@@ -263,6 +265,7 @@ private:
     bool m_waitForDone;
     bool m_dumpTitleChanges;
     bool m_dumpDatabaseCallbacks;
+    bool m_dumpApplicationCacheDelegateCallbacks;
     bool m_dumpStatusCallbacks;
     bool m_waitForPolicy;
     bool m_handleErrorPages;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list