Changeset 73789 in webkit
- Timestamp:
- Dec 10, 2010 1:01:31 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r73756 r73789 1 2010-12-10 Krithigassree Sambamurthy <krithigassree.sambamurthy@nokia.com> 2 3 Reviewed by Joseph Pecoraro. 4 5 [Qt]: Implement Application Cache Quotas 6 https://bugs.webkit.org/show_bug.cgi?id=43455 7 8 * platform/qt/Skipped: Unskip now passing test origin-quota.html 9 1 10 2010-12-09 Jenn Braithwaite <jennb@chromium.org> 2 11 -
trunk/LayoutTests/platform/qt/Skipped
r73642 r73789 1507 1507 animations/animation-drt-api.html 1508 1508 animations/animation-drt-api-multiple-keyframes.html 1509 1510 # ============================================================================= #1511 # failing application cache quota tests1512 # ============================================================================= #1513 http/tests/appcache/origin-quota.html1514 1509 1515 1510 # ============================================================================= # -
trunk/WebKit/qt/Api/qwebpage.cpp
r73535 r73789 4122 4122 \sa QWebDatabase 4123 4123 */ 4124 /*! 4125 \fn void QWebPage::applicationCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 defaultOriginQuota); 4126 4127 This signal is emitted whenever the web site is asking to store data to the application cache 4128 database databaseName and the quota allocated to that web site is exceeded. 4129 4130 */ 4124 4131 4125 4132 /*! -
trunk/WebKit/qt/Api/qwebpage.h
r72603 r73789 49 49 class QWebPagePrivate; 50 50 class QWebPluginFactory; 51 class QWebSecurityOrigin; 51 52 class QtViewportAttributesPrivate; 52 53 … … 388 389 void contentsChanged(); 389 390 void databaseQuotaExceeded(QWebFrame* frame, QString databaseName); 391 void applicationCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 defaultOriginQuota); 390 392 391 393 void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item); -
trunk/WebKit/qt/Api/qwebsecurityorigin.cpp
r73002 r73789 20 20 #include "config.h" 21 21 #include "qwebsecurityorigin.h" 22 #include "qwebsecurityorigin_p.h" 23 #include "qwebdatabase.h" 24 #include "qwebdatabase_p.h" 25 22 23 #include "ApplicationCacheStorage.h" 26 24 #include "DatabaseTracker.h" 27 25 #include "KURL.h" 28 26 #include "SchemeRegistry.h" 29 27 #include "SecurityOrigin.h" 28 #include "qwebdatabase.h" 29 #include "qwebdatabase_p.h" 30 #include "qwebsecurityorigin_p.h" 30 31 #include <QStringList> 31 32 … … 153 154 } 154 155 156 void QWebSecurityOrigin::setApplicationCacheQuota(qint64 quota) 157 { 158 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 159 WebCore::cacheStorage().storeUpdatedQuotaForOrigin(d->origin.get(), quota); 160 #endif 161 } 155 162 /*! 156 163 Destroys the security origin. -
trunk/WebKit/qt/Api/qwebsecurityorigin.h
r50166 r73789 52 52 53 53 void setDatabaseQuota(qint64 quota); 54 void setApplicationCacheQuota(qint64 quota); 54 55 55 56 QList<QWebDatabase> databases() const; -
trunk/WebKit/qt/ChangeLog
r73710 r73789 1 2010-12-10 Krithigassree Sambamurthy <krithigassree.sambamurthy@nokia.com> 2 3 Reviewed by Joseph Pecoraro. 4 5 Bug 43455 - [Qt]: Implement Application Cache Quotas 6 https://bugs.webkit.org/show_bug.cgi?id=43455 7 8 Added new signal to report ApplicationCache Database 9 quota. 10 11 * Api/qwebpage.cpp: 12 * Api/qwebpage.h: 13 14 Added new functions to accomodate new appcache layout 15 test origin-quota.html. 16 17 * Api/qwebsecurityorigin.cpp: 18 (QWebSecurityOrigin::setApplicationCacheQuota): 19 * Api/qwebsecurityorigin.h: 20 * WebCoreSupport/ChromeClientQt.cpp: 21 (WebCore::ChromeClientQt::reachedApplicationCacheOriginQuota): 22 * WebCoreSupport/DumpRenderTreeSupportQt.cpp: 23 (DumpRenderTreeSupportQt::clearAllApplicationCaches): 24 * WebCoreSupport/DumpRenderTreeSupportQt.h: 25 1 26 2010-12-10 Jocelyn Turcotte <jocelyn.turcotte@nokia.com> 2 27 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r72954 r73789 31 31 #include "ChromeClientQt.h" 32 32 33 #include "ApplicationCacheStorage.h" 33 34 #include "DatabaseTracker.h" 34 35 #include "FileChooser.h" … … 519 520 } 520 521 521 void ChromeClientQt::reachedApplicationCacheOriginQuota(SecurityOrigin*) 522 { 523 notImplemented(); 522 void ChromeClientQt::reachedApplicationCacheOriginQuota(SecurityOrigin* origin) 523 { 524 int64_t quota; 525 quint64 defaultOriginQuota = WebCore::cacheStorage().defaultOriginQuota(); 526 527 QWebSecurityOriginPrivate* priv = new QWebSecurityOriginPrivate(origin); 528 QWebSecurityOrigin* securityOrigin = new QWebSecurityOrigin(priv); 529 530 if (!WebCore::cacheStorage().quotaForOrigin(origin, quota)) 531 WebCore::cacheStorage().storeUpdatedQuotaForOrigin(origin, defaultOriginQuota); 532 533 emit m_webPage->applicationCacheQuotaExceeded(securityOrigin, defaultOriginQuota); 524 534 } 525 535 #endif -
trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
r73007 r73789 24 24 #include "DumpRenderTreeSupportQt.h" 25 25 26 #include "ApplicationCacheStorage.h" 26 27 #include "CSSComputedStyleDeclaration.h" 27 28 #include "ChromeClientQt.h" … … 586 587 } 587 588 589 void DumpRenderTreeSupportQt::clearAllApplicationCaches() 590 { 591 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 592 WebCore::cacheStorage().empty(); 593 WebCore::cacheStorage().vacuumDatabaseFile(); 594 #endif 595 } 596 588 597 void DumpRenderTreeSupportQt::dumpFrameLoader(bool b) 589 598 { -
trunk/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
r73007 r73789 89 89 static void setEditingBehavior(QWebPage* page, const QString& editingBehavior); 90 90 91 static void clearAllApplicationCaches(); 92 91 93 static void whiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains); 92 94 static void removeWhiteListAccessFromOrigin(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains); -
trunk/WebKitTools/ChangeLog
r73776 r73789 1 2010-12-10 Krithigassree Sambamurthy <krithigassree.sambamurthy@nokia.com> 2 3 Reviewed by Joseph Pecoraro. 4 5 Bug 43455 - [Qt]: Implement Application Cache Quotas 6 https://bugs.webkit.org/show_bug.cgi?id=43455 7 8 Introduce functions to allow new appcache layout test origin-quota.html 9 to work correctly under Qt. 10 11 * DumpRenderTree/qt/DumpRenderTreeQt.cpp: 12 (WebCore::DumpRenderTree::DumpRenderTree): 13 (WebCore::DumpRenderTree::dumpApplicationCacheQuota): 14 * DumpRenderTree/qt/DumpRenderTreeQt.h: 15 16 Introduce functions to allow new appcache layout test origin-quota.html 17 to be successful under qt. Changes required because LayoutTestControllerQt 18 does not inherit from LayoutController. 19 20 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 21 (LayoutTestController::reset): 22 (LayoutTestController::clearAllApplicationCaches): 23 (LayoutTestController::setApplicationCacheOriginQuota): 24 * DumpRenderTree/qt/LayoutTestControllerQt.h: 25 (LayoutTestController::shouldDumpApplicationCacheDelegateCallbacks): 26 (LayoutTestController::dumpApplicationCacheDelegateCallbacks): 27 1 28 2010-12-10 Eric Seidel <eric@webkit.org> 2 29 -
trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
r73341 r73789 481 481 connect(m_page, SIGNAL(databaseQuotaExceeded(QWebFrame*,QString)), 482 482 this, SLOT(dumpDatabaseQuota(QWebFrame*,QString))); 483 connect(m_page, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin *, quint64)), 484 this, SLOT(dumpApplicationCacheQuota(QWebSecurityOrigin *, quint64))); 483 485 connect(m_page, SIGNAL(statusBarMessage(const QString&)), 484 486 this, SLOT(statusBarMessage(const QString&))); … … 1023 1025 } 1024 1026 1027 void DumpRenderTree::dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota) 1028 { 1029 if (!m_controller->shouldDumpApplicationCacheDelegateCallbacks()) 1030 return; 1031 1032 printf("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{%s, %s, %i}\n", 1033 origin->scheme().toUtf8().data(), 1034 origin->host().toUtf8().data(), 1035 origin->port() 1036 ); 1037 origin->setApplicationCacheQuota(defaultOriginQuota); 1038 } 1039 1025 1040 void DumpRenderTree::statusBarMessage(const QString& message) 1026 1041 { -
trunk/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.h
r72601 r73789 117 117 void connectFrame(QWebFrame *frame); 118 118 void dumpDatabaseQuota(QWebFrame* frame, const QString& dbName); 119 void dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota); 119 120 void statusBarMessage(const QString& message); 120 121 void windowCloseRequested(); -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r73007 r73789 59 59 m_dumpTitleChanges = false; 60 60 m_dumpDatabaseCallbacks = false; 61 m_dumpApplicationCacheDelegateCallbacks = false; 61 62 m_dumpStatusCallbacks = false; 62 63 m_timeoutTimer.stop(); … … 542 543 void LayoutTestController::clearAllApplicationCaches() 543 544 { 544 // FIXME: implement to support Application Cache quotas.545 DumpRenderTreeSupportQt::clearAllApplicationCaches(); 545 546 } 546 547 547 548 void LayoutTestController::setApplicationCacheOriginQuota(unsigned long long quota) 548 549 { 549 // FIXME: implement to support Application Cache quotas. 550 if (!m_topLoadingFrame) 551 return; 552 m_topLoadingFrame->securityOrigin().setApplicationCacheQuota(quota); 550 553 } 551 554 -
trunk/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
r73007 r73789 65 65 bool shouldDumpChildFrameScrollPositions() const { return m_dumpChildFrameScrollPositions; } 66 66 bool shouldDumpDatabaseCallbacks() const { return m_dumpDatabaseCallbacks; } 67 bool shouldDumpApplicationCacheDelegateCallbacks() const { return m_dumpApplicationCacheDelegateCallbacks; } 67 68 bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; } 68 69 bool shouldWaitUntilDone() const { return m_waitForDone; } … … 95 96 void dumpChildFrameScrollPositions() { m_dumpChildFrameScrollPositions = true; } 96 97 void dumpDatabaseCallbacks() { m_dumpDatabaseCallbacks = true; } 98 void dumpApplicationCacheDelegateCallbacks() { m_dumpApplicationCacheDelegateCallbacks = true;} 97 99 void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; } 98 100 void setCanOpenWindows() { m_canOpenWindows = true; } … … 264 266 bool m_dumpTitleChanges; 265 267 bool m_dumpDatabaseCallbacks; 268 bool m_dumpApplicationCacheDelegateCallbacks; 266 269 bool m_dumpStatusCallbacks; 267 270 bool m_waitForPolicy;
Note: See TracChangeset
for help on using the changeset viewer.