Changeset 90856 in webkit
- Timestamp:
- Jul 12, 2011 3:00:45 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 9 added
- 58 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r90830 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 Include spaceNeeded information in the output dumped for appcache quota delegates. 9 Add and update tests related to handling of per-origin quotas. 10 11 * http/tests/appcache/origin-quota-continued-download-expected.txt: Added. 12 * http/tests/appcache/origin-quota-continued-download.html: Added. 13 * http/tests/appcache/resources/quota-origin-continued-download.html: Added. 14 * http/tests/appcache/resources/quota-origin-continued-download.manifest: Added. 15 New test which checks that there will still be a successful cache 16 when the per-origin quota is reached and increased at the end of downloading. 17 18 * http/tests/appcache/origin-quota-continued-download-multiple-manifests-expected.txt: Added. 19 * http/tests/appcache/origin-quota-continued-download-multiple-manifests.html: Added. 20 * http/tests/appcache/resources/quota-origin-continued-download-multiple-manifests-1.html: Added. 21 * http/tests/appcache/resources/quota-origin-continued-download-multiple-manifests-1.manifest: Added. 22 * http/tests/appcache/resources/quota-origin-continued-download-multiple-manifests-2.html: Added. 23 * http/tests/appcache/resources/quota-origin-continued-download-multiple-manifests-2.manifest: Added. 24 * http/tests/appcache/resources/quota-origin-continued-download.html: Added. 25 * http/tests/appcache/resources/quota-origin-continued-download.manifest: Added. 26 New test which checks that the spaceNeeded appropriately lists enough space for 27 multiple manifests across multiple frames for the same origin. 28 29 * http/tests/appcache/resources/quota-origin-iframe-3.manifest: Fix a typo. 30 * http/tests/appcache/origin-quota.html: 31 Update the old test to disallow automatic increase of the quota, 32 which is the default handling of DRT when reaching the quota. 33 34 * platform/chromium/test_expectations.txt: 35 * platform/gtk/Skipped: 36 * platform/qt/Skipped: 37 * platform/win/Skipped: 38 * platform/wk2/Skipped: 39 Skip the test on ports that don't implement ApplicationCache per-origin quotas. 40 1 41 2011-07-12 Pavel Feldman <pfeldman@google.com> 2 42 -
trunk/LayoutTests/http/tests/appcache/origin-quota-continued-download-multiple-manifests.html
r90855 r90856 38 38 39 39 function addFirstIFrame() { 40 // Expected to succeed. 41 addIFrameWithContinuation("resources/quota-origin- iframe-1.html", function(event) {40 // Expected to succeed. Will be ~15kb out of the 20kb limit. 41 addIFrameWithContinuation("resources/quota-origin-continued-download-multiple-manifests-1.html", function(event) { 42 42 log(event.data); 43 43 addSecondIFrame(); … … 46 46 47 47 function addSecondIFrame() { 48 // Expected to fail, then increase the quota. 49 // NOTE: When this fails, the exceed callback will automatically increase it back to the default quota size. 50 addIFrameWithContinuation("resources/quota-origin-iframe-2.html", function(event) { 51 log(event.data); 52 addThirdIFrame(); 53 }); 54 } 55 56 function addThirdIFrame() { 57 // Expected to succeed. 58 addIFrameWithContinuation("resources/quota-origin-iframe-3.html", function(event) { 48 // Expected to succeed, due to automatically increasing the quota. 49 addIFrameWithContinuation("resources/quota-origin-continued-download-multiple-manifests-2.html", function(event) { 59 50 log(event.data); 60 51 finishTest(); … … 65 56 </head> 66 57 <body onload="startTest()"> 67 <p>This test checks that per-origin application cache quota s are enforced.</p>58 <p>This test checks that per-origin application cache quota works correctly with multiple manifests/caches per-origin.</p> 68 59 <p> 69 60 This test sets the quota for the origin to 20kb, and attempts to fill 70 it up with 2 iframes that are 13kb each. The application cache download 71 process should fail on the 2nd iframe and the UI Delegate should be 72 informed of the exceeded quota. Increasing the size to 40kb. A 3rd 73 iframe is added, which should succeed. 61 it up with 2 different application caches about 15kb each. 62 63 The first frame will cache successfully and fill up about 15kb of 64 the origin quota. 65 66 The second frame will reach the quota, cause a delegate callback, 67 dump the spaceNeeded (which should be enough for both iframe caches), 68 and succeed due to the default DRT behavior or raising the quota. 74 69 </p> 75 70 <pre id="console"></pre> -
trunk/LayoutTests/http/tests/appcache/origin-quota-expected.txt
r86417 r90856 1 UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{http, 127.0.0.1, 8000} 1 UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{http, 127.0.0.1, 8000} spaceNeeded:31161 2 2 CONSOLE MESSAGE: line 0: Application Cache update failed, because size quota was exceeded. 3 3 This test checks that per-origin application cache quotas are enforced. -
trunk/LayoutTests/http/tests/appcache/origin-quota.html
r64613 r90856 15 15 layoutTestController.clearAllApplicationCaches(); 16 16 layoutTestController.dumpApplicationCacheDelegateCallbacks(); 17 layoutTestController.disallowIncreaseForApplicationCacheQuota(); 17 18 layoutTestController.setApplicationCacheOriginQuota(20*1024); 18 19 layoutTestController.dumpAsText(); … … 47 48 function addSecondIFrame() { 48 49 // Expected to fail, then increase the quota. 49 // NOTE: When this fails, the exceed callback will automatically increase it back to the default quota size.50 50 addIFrameWithContinuation("resources/quota-origin-iframe-2.html", function(event) { 51 51 log(event.data); 52 layoutTestController.setApplicationCacheOriginQuota(100*1024); 52 53 addThirdIFrame(); 53 54 }); -
trunk/LayoutTests/http/tests/appcache/resources/quota-origin-iframe-3.manifest
r64613 r90856 1 1 CACHE MANIFEST 2 2 3 # iframe-3 should succeed. The origin quota sh uld have been3 # iframe-3 should succeed. The origin quota should have been 4 4 # raised to 40kb, with ~13kb already cached. Caching abe.png 5 5 # and this manifest will be ~13kb, bringing us up to 26kb. -
trunk/LayoutTests/platform/chromium/test_expectations.txt
r90828 r90856 2142 2142 BUGWK42964 WIN LINUX : tables/mozilla_expected_failures/bugs/bug89315.html = PASS FAIL 2143 2143 2144 // Application Cache Quotas 2145 BUGWK43459 : http/tests/appcache/origin-quota.html = TEXT MISSING 2144 // Application Cache Quotas are N/A to the chromium port. 2145 BUGWK43459 WONTFIX: http/tests/appcache/origin-quota.html = TEXT MISSING 2146 BUGWK43459 WONTFIX: http/tests/appcache/origin-quota-continued-download.html = TEXT MISSING 2147 BUGWK43459 WONTFIX: http/tests/appcache/origin-quota-continued-download-multiple-manifests.html = TEXT MISSING 2146 2148 2147 2149 // Need to support DeviceMotion. -
trunk/LayoutTests/platform/gtk/Skipped
r90726 r90856 585 585 http/tests/appcache/fallback.html 586 586 http/tests/appcache/origin-quota.html 587 http/tests/appcache/origin-quota-continued-download.html 588 http/tests/appcache/origin-quota-continued-download-multiple-manifests.html 587 589 http/tests/appcache/origin-delete.html 588 590 http/tests/appcache/origins-with-appcache.html -
trunk/LayoutTests/platform/qt/Skipped
r90741 r90856 30 30 # - Failing SVG tests 31 31 # - failing animations tests 32 # - failing application cache quota tests33 32 # - Failing CSS Tests 34 33 # - Failing dom/xhtml tests -
trunk/LayoutTests/platform/win/Skipped
r90806 r90856 1145 1145 # https://bugs.webkit.org/show_bug.cgi?id=43458 1146 1146 http/tests/appcache/origin-quota.html 1147 http/tests/appcache/origin-quota-continued-download.html 1148 http/tests/appcache/origin-quota-continued-download-multiple-manifests.html 1147 1149 1148 1150 # https://bugs.webkit.org/show_bug.cgi?id=43332 -
trunk/LayoutTests/platform/wk2/Skipped
r90821 r90856 1657 1657 http/tests/appcache/origin-delete.html 1658 1658 http/tests/appcache/origin-quota.html 1659 http/tests/appcache/origin-quota-continued-download.html 1660 http/tests/appcache/origin-quota-continued-download-multiple-manifests.html 1659 1661 http/tests/appcache/origins-with-appcache.html 1660 1662 -
trunk/Source/WebCore/ChangeLog
r90853 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 New behavior of handling ApplicationCache per-origin quotas. Previously, 9 if the quota was reached while downloading we would fail the download 10 and then prompt the user for a storage increase. This required a refresh, 11 a redownload of resources, and the total storage was not known so the 12 process could be repeated multiple times before an acceptable quota 13 was found or the user disallowed an increase. 14 15 The new behavior is to complete the download of the entire appcache. 16 When the cache completes downloading and it is greater than the origin 17 quota, prompt the user to allow a quota increase with the known space 18 needed. If the quota is increased, the cache will succeed, otherwise 19 it will fail with the normal failure steps. 20 21 An alternative behavior is prompting while downloading immediately 22 when the origin quota is reached, however at that point the entire 23 space needed is unknown and so quota increases might not be enough 24 and could result in multiple prompts to the user. 25 26 Tests: http/tests/appcache/origin-quota-continued-download-multiple-manifests.html 27 http/tests/appcache/origin-quota-continued-download.html 28 29 * loader/appcache/ApplicationCacheGroup.h: 30 * loader/appcache/ApplicationCacheGroup.cpp: 31 (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): 32 Rename instance variable to be more clear on its intent. 33 34 (WebCore::ApplicationCacheGroup::didFinishLoading): 35 Check the quota limit while downloading so we can fail early 36 if the user already denied a quota increase. 37 38 (WebCore::ApplicationCacheGroup::didReachOriginQuota): 39 Pass the space needed information to the chrome client. 40 41 (WebCore::ApplicationCacheGroup::cacheUpdateFailedDueToOriginQuota): 42 Removed. Instead convert the callers to update state and console 43 log when the per-origin quota is reached. This allows us to follow 44 the normal failure steps if the quota is reached at the end of a 45 download, and the alternative short path when we fail during downloading. 46 47 (WebCore::ApplicationCacheGroup::recalculateAvailableSpaceInQuota): 48 Extract to a helper function. 49 50 (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): 51 Allow for a quota increase at the end of the download now that 52 we know the space needed. Then proceed to fail or succeed 53 as we normally would. 54 55 * loader/appcache/ApplicationCacheStorage.h: 56 * loader/appcache/ApplicationCacheStorage.cpp: 57 (WebCore::ApplicationCacheStorage::checkOriginQuota): 58 (WebCore::ApplicationCacheStorage::storeNewestCache): 59 Extract checking the origin quota for when an ApplicationCacheGroup 60 will be replacing an ApplicationCacheGroup into a helper function. 61 The helper also provides an out parameter for the space needed 62 to properly fit the new cache group if it wouldn't fit. 63 64 * page/ChromeClient.h: 65 * loader/EmptyClients.h: 66 (WebCore::EmptyChromeClient::reachedApplicationCacheOriginQuota): 67 Add a space needed parameter when reaching the per-origin quota. 68 1 69 2011-07-12 Chris Rogers <crogers@google.com> 2 70 -
trunk/Source/WebCore/loader/EmptyClients.h
r89430 r90856 186 186 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 187 187 virtual void reachedMaxAppCacheSize(int64_t) { } 188 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin* ) { }188 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) { } 189 189 #endif 190 190 -
trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
r90389 r90856 73 73 , m_loadedSize(0) 74 74 , m_availableSpaceInQuota(ApplicationCacheStorage::unknownQuota()) 75 , m_originQuota Reached(false)75 , m_originQuotaExceededPreviously(false) 76 76 { 77 77 } … … 601 601 // After finishing the loading of any resource, we check if it will 602 602 // fit in our last known quota limit. 603 if (m_availableSpaceInQuota == ApplicationCacheStorage::unknownQuota()) { 604 // Failed to determine what is left in the quota. Fallback to allowing anything. 605 if (!cacheStorage().remainingSizeForOriginExcludingCache(m_origin.get(), m_newestCache.get(), m_availableSpaceInQuota)) 606 m_availableSpaceInQuota = ApplicationCacheStorage::noQuota(); 607 } 608 609 // Check each resource, as it loads, to see if it would fit in our 610 // idea of the available quota space. 611 if (m_availableSpaceInQuota < m_loadedSize) { 603 // FIXME: The quota could be changed by another appcache in the same origin. 604 if (m_availableSpaceInQuota == ApplicationCacheStorage::unknownQuota()) 605 recalculateAvailableSpaceInQuota(); 606 607 // While downloading check to see if we have exceeded the available quota. 608 // We can stop immediately if we have already previously failed 609 // due to an earlier quota restriction. The client was already notified 610 // of the quota being reached and decided not to increase it then. 611 // FIXME: Should we break earlier and prevent redownloading on later page loads? 612 // We could then also get rid of m_loadedSize. 613 if (m_originQuotaExceededPreviously && m_availableSpaceInQuota < m_loadedSize) { 612 614 m_currentResource = 0; 613 cacheUpdateFailedDueToOriginQuota(); 615 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache update failed, because size quota was exceeded.", 0, String()); 616 cacheUpdateFailed(); 614 617 return; 615 618 } … … 796 799 } 797 800 798 void ApplicationCacheGroup::didReachOriginQuota( PassRefPtr<Frame> frame)799 { 800 // Inform the client the origin quota has been reached, 801 // they may decide to increase the quota.802 frame->page()->chrome()->client()->reachedApplicationCacheOriginQuota(m_origin.get());801 void ApplicationCacheGroup::didReachOriginQuota(int64_t totalSpaceNeeded) 802 { 803 // Inform the client the origin quota has been reached, they may decide to increase the quota. 804 // We expect quota to be increased synchronously while waiting for the call to return. 805 m_frame->page()->chrome()->client()->reachedApplicationCacheOriginQuota(m_origin.get(), totalSpaceNeeded); 803 806 } 804 807 … … 813 816 } 814 817 815 void ApplicationCacheGroup::cacheUpdateFailedDueToOriginQuota() 816 { 817 if (!m_originQuotaReached) { 818 m_originQuotaReached = true; 819 scheduleReachedOriginQuotaCallback(); 820 } 821 822 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache update failed, because size quota was exceeded.", 0, String()); 823 824 // FIXME: Should not abort cache update - the user may choose to increase the quota. 825 cacheUpdateFailed(); 818 void ApplicationCacheGroup::recalculateAvailableSpaceInQuota() 819 { 820 if (!cacheStorage().remainingSizeForOriginExcludingCache(m_origin.get(), m_newestCache.get(), m_availableSpaceInQuota)) { 821 // Failed to determine what is left in the quota. Fallback to allowing anything. 822 m_availableSpaceInQuota = ApplicationCacheStorage::noQuota(); 823 } 826 824 } 827 825 … … 904 902 } 905 903 904 RefPtr<ApplicationCache> oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? RefPtr<ApplicationCache>() : m_newestCache; 905 906 // If we exceeded the origin quota while downloading we can request a quota 907 // increase now, before we attempt to store the cache. 908 int64_t totalSpaceNeeded; 909 if (!cacheStorage().checkOriginQuota(this, oldNewestCache.get(), m_cacheBeingUpdated.get(), totalSpaceNeeded)) 910 didReachOriginQuota(totalSpaceNeeded); 911 906 912 ApplicationCacheStorage::FailureReason failureReason; 907 RefPtr<ApplicationCache> oldNewestCache = (m_newestCache == m_cacheBeingUpdated) ? RefPtr<ApplicationCache>() : m_newestCache;908 913 setNewestCache(m_cacheBeingUpdated.release()); 909 914 if (cacheStorage().storeNewestCache(this, oldNewestCache.get(), failureReason)) { … … 919 924 postListenerTask(isUpgradeAttempt ? ApplicationCacheHost::UPDATEREADY_EVENT : ApplicationCacheHost::CACHED_EVENT, m_associatedDocumentLoaders); 920 925 // It is clear that the origin quota was not reached, so clear the flag if it was set. 921 m_originQuota Reached= false;926 m_originQuotaExceededPreviously = false; 922 927 } else { 923 928 if (failureReason == ApplicationCacheStorage::OriginQuotaReached) { 924 // We ran out of space for this origin. Roll back to previous state. 925 if (oldNewestCache) 926 setNewestCache(oldNewestCache.release()); 927 cacheUpdateFailedDueToOriginQuota(); 928 return; 929 // We ran out of space for this origin. Fall down to the normal error handling 930 // after recording this state. 931 m_originQuotaExceededPreviously = true; 932 m_frame->domWindow()->console()->addMessage(OtherMessageSource, LogMessageType, ErrorMessageLevel, "Application Cache update failed, because size quota was exceeded.", 0, String()); 929 933 } 930 934 931 935 if (failureReason == ApplicationCacheStorage::TotalQuotaReached && !m_calledReachedMaxAppCacheSize) { 936 // FIXME: Should this be handled more like Origin Quotas? Does this fail properly? 937 932 938 // We ran out of space. All the changes in the cache storage have 933 939 // been rolled back. We roll back to the previous state in here, … … 1093 1099 } 1094 1100 1095 void ApplicationCacheGroup::scheduleReachedOriginQuotaCallback()1096 {1097 // FIXME: it might be nice to run this asynchronously, because there is no return value to wait for.1098 didReachOriginQuota(m_frame);1099 }1100 1101 1101 class CallCacheListenerTask : public ScriptExecutionContext::Task { 1102 1102 public: -
trunk/Source/WebCore/loader/appcache/ApplicationCacheGroup.h
r84260 r90856 104 104 105 105 void scheduleReachedMaxAppCacheSizeCallback(); 106 void scheduleReachedOriginQuotaCallback();107 106 108 107 PassRefPtr<ResourceHandle> createResourceHandle(const KURL&, ApplicationCacheResource* newestCachedResource); … … 121 120 void didFinishLoadingManifest(); 122 121 void didReachMaxAppCacheSize(); 123 void didReachOriginQuota( PassRefPtr<Frame> frame);122 void didReachOriginQuota(int64_t totalSpaceNeeded); 124 123 125 124 void startLoadingEntry(); … … 127 126 void checkIfLoadIsComplete(); 128 127 void cacheUpdateFailed(); 129 void cacheUpdateFailedDueToOriginQuota();128 void recalculateAvailableSpaceInQuota(); 130 129 void manifestNotFound(); 131 130 … … 203 202 int64_t m_loadedSize; 204 203 int64_t m_availableSpaceInQuota; 205 bool m_originQuota Reached;204 bool m_originQuotaExceededPreviously; 206 205 207 206 friend class ChromeClientCallbackTimer; 208 friend class OriginQuotaReachedCallbackTimer;209 207 }; 210 208 -
trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp
r87704 r90856 956 956 } 957 957 958 bool ApplicationCacheStorage::checkOriginQuota(ApplicationCacheGroup* group, ApplicationCache* oldCache, ApplicationCache* newCache, int64_t& totalSpaceNeeded) 959 { 960 // Check if the oldCache with the newCache would reach the per-origin quota. 961 int64_t remainingSpaceInOrigin; 962 const SecurityOrigin* origin = group->origin(); 963 if (remainingSizeForOriginExcludingCache(origin, oldCache, remainingSpaceInOrigin)) { 964 if (remainingSpaceInOrigin < newCache->estimatedSizeInStorage()) { 965 int64_t quota; 966 if (quotaForOrigin(origin, quota)) { 967 totalSpaceNeeded = quota - remainingSpaceInOrigin + newCache->estimatedSizeInStorage(); 968 return false; 969 } 970 971 ASSERT_NOT_REACHED(); 972 totalSpaceNeeded = 0; 973 return false; 974 } 975 } 976 977 return true; 978 } 979 958 980 bool ApplicationCacheStorage::storeNewestCache(ApplicationCacheGroup* group, ApplicationCache* oldCache, FailureReason& failureReason) 959 981 { … … 971 993 972 994 // Check if this would reach the per-origin quota. 973 int64_t remainingSpaceInOrigin; 974 if (remainingSizeForOriginExcludingCache(group->origin(), oldCache, remainingSpaceInOrigin)) { 975 if (remainingSpaceInOrigin < group->newestCache()->estimatedSizeInStorage()) { 976 failureReason = OriginQuotaReached; 977 return false; 978 } 995 int64_t totalSpaceNeededIgnored; 996 if (!checkOriginQuota(group, oldCache, group->newestCache(), totalSpaceNeededIgnored)) { 997 failureReason = OriginQuotaReached; 998 return false; 979 999 } 980 1000 -
trunk/Source/WebCore/loader/appcache/ApplicationCacheStorage.h
r87704 r90856 70 70 bool remainingSizeForOriginExcludingCache(const SecurityOrigin*, ApplicationCache*, int64_t& remainingSize); 71 71 bool storeUpdatedQuotaForOrigin(const SecurityOrigin*, int64_t quota); 72 bool checkOriginQuota(ApplicationCacheGroup*, ApplicationCache* oldCache, ApplicationCache* newCache, int64_t& totalSpaceNeeded); 72 73 73 74 ApplicationCacheGroup* cacheGroupForURL(const KURL&); // Cache to load a main resource from. -
trunk/Source/WebCore/page/ChromeClient.h
r90164 r90856 193 193 // more than allowed on this origin. This callback allows the chrome client 194 194 // to take action, such as prompting the user to ask to increase the quota 195 // for this origin. 196 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin* origin) = 0; 195 // for this origin. The totalSpaceNeeded parameter is the total amount of 196 // storage, in bytes, needed to store the new cache along with all of the 197 // other existing caches for the origin that would not be replaced by 198 // the new cache. 199 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded) = 0; 197 200 #endif 198 201 -
trunk/Source/WebKit/chromium/ChangeLog
r90850 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * src/ChromeClientImpl.cpp: 9 (WebKit::ChromeClientImpl::reachedApplicationCacheOriginQuota): 10 * src/ChromeClientImpl.h: 11 1 12 2011-07-12 John Bates <jbates@google.com> 2 13 -
trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp
r90164 r90856 663 663 } 664 664 665 void ChromeClientImpl::reachedApplicationCacheOriginQuota(SecurityOrigin* )665 void ChromeClientImpl::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) 666 666 { 667 667 ASSERT_NOT_REACHED(); -
trunk/Source/WebKit/chromium/src/ChromeClientImpl.h
r90164 r90856 132 132 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 133 133 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 134 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin* );134 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded); 135 135 #endif 136 136 #if ENABLE(NOTIFICATIONS) -
trunk/Source/WebKit/efl/ChangeLog
r90808 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebCoreSupport/ChromeClientEfl.cpp: 9 (WebCore::ChromeClientEfl::reachedApplicationCacheOriginQuota): 10 * WebCoreSupport/ChromeClientEfl.h: 11 1 12 2011-07-11 Jaehun Lim <ljaehun.lim@samsung.com> 2 13 -
trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
r89812 r90856 384 384 } 385 385 386 void ChromeClientEfl::reachedApplicationCacheOriginQuota(SecurityOrigin* )386 void ChromeClientEfl::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) 387 387 { 388 388 notImplemented(); -
trunk/Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
r89811 r90856 115 115 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 116 116 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 117 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin* );117 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded); 118 118 #endif 119 119 -
trunk/Source/WebKit/gtk/ChangeLog
r90776 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebCoreSupport/ChromeClientGtk.cpp: 9 (WebKit::ChromeClient::reachedApplicationCacheOriginQuota): 10 * WebCoreSupport/ChromeClientGtk.h: 11 1 12 2011-06-14 Mike Stegeman <mrstegeman@gmail.com> 2 13 -
trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
r89937 r90856 603 603 } 604 604 605 void ChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* )605 void ChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) 606 606 { 607 607 notImplemented(); -
trunk/Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
r89937 r90856 123 123 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 124 124 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 125 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin* );125 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded); 126 126 #endif 127 127 #if ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit/haiku/ChangeLog
r89216 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebCoreSupport/ChromeClientHaiku.cpp: 9 (WebCore::ChromeClientWx::reachedApplicationCacheOriginQuota): 10 * WebCoreSupport/ChromeClientHaiku.h: 11 1 12 2011-06-18 Dimitri Glazkov <dglazkov@chromium.org> 2 13 -
trunk/Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.cpp
r89216 r90856 357 357 } 358 358 359 void ChromeClientWx::reachedApplicationCacheOriginQuota(SecurityOrigin* )359 void ChromeClientWx::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) 360 360 { 361 361 notImplemented(); -
trunk/Source/WebKit/haiku/WebCoreSupport/ChromeClientHaiku.h
r89216 r90856 141 141 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 142 142 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 143 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin* );143 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded); 144 144 #endif 145 145 #if ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit/mac/ChangeLog
r90855 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebView/WebUIDelegatePrivate.h: 9 * DefaultDelegates/WebDefaultUIDelegate.m: 10 (-[WebDefaultUIDelegate webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:spaceNeeded:]): 11 Update the delegate to include a space needed parameter. 12 13 * WebCoreSupport/WebChromeClient.h: 14 * WebCoreSupport/WebChromeClient.mm: 15 (WebChromeClient::reachedApplicationCacheOriginQuota): 16 Call the delegate with the new space needed information. 17 1 18 2011-07-12 Adam Roben <aroben@apple.com> 2 19 -
trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m
r64400 r90856 228 228 } 229 229 230 - (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin 230 - (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin totalSpaceNeeded:(NSUInteger)totalSpaceNeeded 231 231 { 232 232 } -
trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h
r89216 r90856 117 117 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 118 118 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 119 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin* );119 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded); 120 120 #endif 121 121 virtual void populateVisitedLinks(); -
trunk/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm
r89430 r90856 699 699 } 700 700 701 void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* origin )701 void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* origin, int64_t totalSpaceNeeded) 702 702 { 703 703 BEGIN_BLOCK_OBJC_EXCEPTIONS; 704 704 705 705 WebSecurityOrigin *webOrigin = [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]; 706 CallUIDelegate(m_webView, @selector(webView:exceededApplicationCacheOriginQuotaForSecurityOrigin: ), webOrigin);706 CallUIDelegate(m_webView, @selector(webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:totalSpaceNeeded:), webOrigin, static_cast<NSUInteger>(totalSpaceNeeded)); 707 707 [webOrigin release]; 708 708 -
trunk/Source/WebKit/mac/WebView/WebUIDelegatePrivate.h
r86988 r90856 198 198 199 199 /*! 200 @method webView:exceededApplicationCacheOriginQuotaForSecurityOrigin: 200 @method webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:totalSpaceNeeded: 201 201 @param sender The WebView sending the delegate method. 202 @param origin The security origin that needs a larger quota 202 @param origin The security origin that needs a larger quota. 203 @param totalSpaceNeeded The amount of space needed to store the new manifest and keep all other 204 previously stored caches for this origin. 203 205 @discussion This method is called when a page attempts to store more in the Application Cache 204 206 for an origin than was allowed by the quota (or default) set for the origin. This allows the 205 207 quota to be increased for the security origin. 206 208 */ 207 - (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin ;209 - (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin totalSpaceNeeded:(NSUInteger)totalSpaceNeeded; 208 210 209 211 - (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request windowFeatures:(NSDictionary *)features; -
trunk/Source/WebKit/qt/Api/qwebpage.cpp
r90763 r90856 4184 4184 */ 4185 4185 /*! 4186 \fn void QWebPage::applicationCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 defaultOriginQuota );4186 \fn void QWebPage::applicationCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 defaultOriginQuota, quint64 totalSpaceNeeded); 4187 4187 4188 4188 This signal is emitted whenever the web site is asking to store data to the application cache -
trunk/Source/WebKit/qt/Api/qwebpage.h
r87983 r90856 395 395 void contentsChanged(); 396 396 void databaseQuotaExceeded(QWebFrame* frame, QString databaseName); 397 void applicationCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 defaultOriginQuota );397 void applicationCacheQuotaExceeded(QWebSecurityOrigin* origin, quint64 defaultOriginQuota, quint64 totalSpaceNeeded); 398 398 399 399 void saveFrameStateRequested(QWebFrame* frame, QWebHistoryItem* item); -
trunk/Source/WebKit/qt/ChangeLog
r90763 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * Api/qwebpage.cpp: 9 * Api/qwebpage.h: 10 * WebCoreSupport/ChromeClientQt.cpp: 11 (WebCore::ChromeClientQt::reachedApplicationCacheOriginQuota): 12 * WebCoreSupport/ChromeClientQt.h: 13 Pass the spaceNeeded value through to the applicationCacheQuotaExceeded signal. 14 1 15 2011-07-11 Ryosuke Niwa <rniwa@webkit.org> 2 16 -
trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r89617 r90856 556 556 } 557 557 558 void ChromeClientQt::reachedApplicationCacheOriginQuota(SecurityOrigin* origin )558 void ChromeClientQt::reachedApplicationCacheOriginQuota(SecurityOrigin* origin, int64_t totalSpaceNeeded) 559 559 { 560 560 int64_t quota; … … 567 567 WebCore::cacheStorage().storeUpdatedQuotaForOrigin(origin, defaultOriginQuota); 568 568 569 emit m_webPage->applicationCacheQuotaExceeded(securityOrigin, defaultOriginQuota );569 emit m_webPage->applicationCacheQuotaExceeded(securityOrigin, defaultOriginQuota, static_cast<quint64>(totalSpaceNeeded)); 570 570 } 571 571 #endif -
trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r89617 r90856 141 141 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 142 142 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 143 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin* );143 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded); 144 144 #endif 145 145 #if ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit/win/ChangeLog
r90806 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebCoreSupport/WebChromeClient.cpp: 9 (WebChromeClient::reachedApplicationCacheOriginQuota): 10 * WebCoreSupport/WebChromeClient.h: 11 1 12 2011-07-11 Hironori Bono <hbono@chromium.org> 2 13 -
trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.cpp
r89430 r90856 629 629 } 630 630 631 void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* )631 void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) 632 632 { 633 633 notImplemented(); -
trunk/Source/WebKit/win/WebCoreSupport/WebChromeClient.h
r89216 r90856 122 122 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 123 123 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 124 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin* );124 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded); 125 125 #endif 126 126 -
trunk/Source/WebKit/wince/ChangeLog
r90101 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebCoreSupport/ChromeClientWinCE.cpp: 9 (WebKit::ChromeClientWinCE::reachedApplicationCacheOriginQuota): 10 * WebCoreSupport/ChromeClientWinCE.h: 11 1 12 2011-06-30 Kentaro Hara <haraken@google.com> 2 13 -
trunk/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.cpp
r89216 r90856 317 317 } 318 318 319 void ChromeClientWinCE::reachedApplicationCacheOriginQuota(SecurityOrigin* )319 void ChromeClientWinCE::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) 320 320 { 321 321 notImplemented(); -
trunk/Source/WebKit/wince/WebCoreSupport/ChromeClientWinCE.h
r89216 r90856 132 132 // to take action, such as prompting the user to ask to increase the quota 133 133 // for this origin. 134 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin* );134 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded); 135 135 #endif 136 136 -
trunk/Source/WebKit/wx/ChangeLog
r90685 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebKitSupport/ChromeClientWx.cpp: 9 (WebCore::ChromeClientWx::reachedApplicationCacheOriginQuota): 10 * WebKitSupport/ChromeClientWx.h: 11 1 12 2011-07-09 Robin Dunn <robin@alldunn.com> 2 13 -
trunk/Source/WebKit/wx/WebKitSupport/ChromeClientWx.cpp
r89284 r90856 446 446 } 447 447 448 void ChromeClientWx::reachedApplicationCacheOriginQuota(SecurityOrigin* )448 void ChromeClientWx::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) 449 449 { 450 450 notImplemented(); -
trunk/Source/WebKit/wx/WebKitSupport/ChromeClientWx.h
r89216 r90856 129 129 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 130 130 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 131 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin* );131 virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t totalSpaceNeeded); 132 132 #endif 133 133 -
trunk/Source/WebKit2/ChangeLog
r90851 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 9 (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): 10 * WebProcess/WebCoreSupport/WebChromeClient.h: 11 1 12 2011-06-22 Jer Noble <jer.noble@apple.com> 2 13 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r90629 r90856 543 543 } 544 544 545 void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* )545 void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) 546 546 { 547 547 notImplemented(); -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r89216 r90856 141 141 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 142 142 virtual void reachedMaxAppCacheSize(int64_t spaceNeeded); 143 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin* );143 virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t spaceNeeded); 144 144 #endif 145 145 -
trunk/Tools/ChangeLog
r90852 r90856 1 2011-07-12 Joseph Pecoraro <joepeck@webkit.org> 2 3 ApplicationCache update should not immediately fail when reaching per-origin quota 4 https://bugs.webkit.org/show_bug.cgi?id=64177 5 6 Reviewed by Alexey Proskuryakov. 7 8 Add layoutTestController.disallowIncreaseForApplicationCacheQuota() 9 to disable the default behavior of raising the default per-origin 10 quota to 5MB when reached. This allows us to test what happens 11 when the quota is reached and not increased. 12 13 * DumpRenderTree/LayoutTestController.cpp: 14 (LayoutTestController::LayoutTestController): 15 (disallowIncreaseForApplicationCacheQuotaCallback): 16 (LayoutTestController::staticFunctions): 17 * DumpRenderTree/LayoutTestController.h: 18 (LayoutTestController::disallowIncreaseForApplicationCacheQuota): 19 (LayoutTestController::setDisallowIncreaseForApplicationCacheQuota): 20 * DumpRenderTree/qt/LayoutTestControllerQt.cpp: 21 (LayoutTestController::reset): 22 * DumpRenderTree/qt/LayoutTestControllerQt.h: 23 (LayoutTestController::disallowIncreaseForApplicationCacheQuota): 24 (LayoutTestController::dumpApplicationCacheDelegateCallbacks): 25 Expose a function to prevent automatically increasing the per-origin 26 quota when the quota is reached. This allows us to test what happens 27 when a user would "disallow" a quota increase. 28 29 * DumpRenderTree/mac/UIDelegate.mm: 30 (-[UIDelegate webView:exceededApplicationCacheOriginQuotaForSecurityOrigin:spaceNeeded:]): 31 * DumpRenderTree/qt/DumpRenderTreeQt.cpp: 32 (WebCore::DumpRenderTree::dumpApplicationCacheQuota): 33 Respect the new disallowIncrease flag and dump the spaceNeeded values 34 for ports that implement application cache quotas. 35 1 36 2011-07-12 Ojan Vafai <ojan@chromium.org> 2 37 -
trunk/Tools/DumpRenderTree/LayoutTestController.cpp
r89733 r90856 44 44 45 45 LayoutTestController::LayoutTestController(const std::string& testPathOrURL, const std::string& expectedPixelHash) 46 : m_dumpApplicationCacheDelegateCallbacks(false) 46 : m_disallowIncreaseForApplicationCacheQuota(false) 47 , m_dumpApplicationCacheDelegateCallbacks(false) 47 48 , m_dumpAsAudio(false) 48 49 , m_dumpAsPDF(false) … … 99 100 // Static Functions 100 101 102 static JSValueRef disallowIncreaseForApplicationCacheQuotaCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 103 { 104 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 105 controller->setDisallowIncreaseForApplicationCacheQuota(true); 106 return JSValueMakeUndefined(context); 107 } 108 101 109 static JSValueRef dumpApplicationCacheDelegateCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 102 110 { … … 2264 2272 { "decodeHostName", decodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2265 2273 { "disableImageLoading", disableImageLoadingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2274 { "disallowIncreaseForApplicationCacheQuota", disallowIncreaseForApplicationCacheQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2266 2275 { "dispatchPendingLoadRequests", dispatchPendingLoadRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 2267 2276 { "display", displayCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/Tools/DumpRenderTree/LayoutTestController.h
r89733 r90856 156 156 void setGeneratePixelResults(bool generatePixelResults) { m_generatePixelResults = generatePixelResults; } 157 157 158 bool disallowIncreaseForApplicationCacheQuota() const { return m_disallowIncreaseForApplicationCacheQuota; } 159 void setDisallowIncreaseForApplicationCacheQuota(bool disallowIncrease) { m_disallowIncreaseForApplicationCacheQuota = disallowIncrease; } 160 158 161 bool dumpApplicationCacheDelegateCallbacks() const { return m_dumpApplicationCacheDelegateCallbacks; } 159 162 void setDumpApplicationCacheDelegateCallbacks(bool dumpCallbacks) { m_dumpApplicationCacheDelegateCallbacks = dumpCallbacks; } … … 352 355 void setGeolocationPermissionCommon(bool allow); 353 356 357 bool m_disallowIncreaseForApplicationCacheQuota; 354 358 bool m_dumpApplicationCacheDelegateCallbacks; 355 359 bool m_dumpAsAudio; -
trunk/Tools/DumpRenderTree/mac/UIDelegate.mm
r82084 r90856 167 167 } 168 168 169 - (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin 169 - (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin totalSpaceNeeded:(NSUInteger)totalSpaceNeeded 170 170 { 171 171 if (!done && gLayoutTestController->dumpApplicationCacheDelegateCallbacks()) { 172 printf("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{%s, %s, %i}\n", 173 [[origin protocol] UTF8String], [[origin host] UTF8String], [origin port]); 174 } 172 printf("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{%s, %s, %i} totalSpaceNeeded:%lu\n", 173 [[origin protocol] UTF8String], [[origin host] UTF8String], [origin port], totalSpaceNeeded); 174 } 175 176 if (gLayoutTestController->disallowIncreaseForApplicationCacheQuota()) 177 return; 175 178 176 179 static const unsigned long long defaultOriginQuota = [WebApplicationCache defaultOriginQuota]; -
trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
r90178 r90856 460 460 connect(m_page, SIGNAL(databaseQuotaExceeded(QWebFrame*,QString)), 461 461 this, SLOT(dumpDatabaseQuota(QWebFrame*,QString))); 462 connect(m_page, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin *, quint64 )),463 this, SLOT(dumpApplicationCacheQuota(QWebSecurityOrigin *, quint64 )));462 connect(m_page, SIGNAL(applicationCacheQuotaExceeded(QWebSecurityOrigin *, quint64, quint64)), 463 this, SLOT(dumpApplicationCacheQuota(QWebSecurityOrigin *, quint64, quint64))); 464 464 connect(m_page, SIGNAL(statusBarMessage(const QString&)), 465 465 this, SLOT(statusBarMessage(const QString&))); … … 1040 1040 } 1041 1041 1042 void DumpRenderTree::dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota )1042 void DumpRenderTree::dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota, quint64 totalSpaceNeeded) 1043 1043 { 1044 1044 if (!m_controller->shouldDumpApplicationCacheDelegateCallbacks()) 1045 1045 return; 1046 1046 1047 printf("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{%s, %s, %i}\n ",1047 printf("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:{%s, %s, %i}\n totalSpaceNeeded:%llu", 1048 1048 origin->scheme().toUtf8().data(), 1049 1049 origin->host().toUtf8().data(), 1050 origin->port() 1050 origin->port(), 1051 totalSpaceNeeded 1051 1052 ); 1053 1054 if (m_controller->shouldDisallowIncreaseForApplicationCacheQuota()) 1055 return; 1056 1052 1057 origin->setApplicationCacheQuota(defaultOriginQuota); 1053 1058 } -
trunk/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
r86505 r90856 120 120 void connectFrame(QWebFrame *frame); 121 121 void dumpDatabaseQuota(QWebFrame* frame, const QString& dbName); 122 void dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota );122 void dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota, quint64 totalSpaceNeeded); 123 123 void statusBarMessage(const QString& message); 124 124 void windowCloseRequested(); -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
r90341 r90856 57 57 m_canOpenWindows = false; 58 58 m_waitForDone = false; 59 m_disallowIncreaseForApplicationCacheQuota = false; 59 60 m_dumpTitleChanges = false; 60 61 m_dumpDatabaseCallbacks = false; -
trunk/Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
r90341 r90856 60 60 LayoutTestController(WebCore::DumpRenderTree* drt); 61 61 62 bool shouldDisallowIncreaseForApplicationCacheQuota() const { return m_disallowIncreaseForApplicationCacheQuota; } 62 63 bool shouldDumpAsText() const { return m_textDump; } 63 64 bool shouldDumpBackForwardList() const { return m_dumpBackForwardList; } … … 92 93 public slots: 93 94 void maybeDump(bool ok); 95 void disallowIncreaseForApplicationCacheQuota() { m_disallowIncreaseForApplicationCacheQuota = true; } 94 96 void dumpAsText() { m_textDump = true; } 95 97 void dumpChildFramesAsText() { m_dumpChildrenAsText = true; } 96 98 void dumpChildFrameScrollPositions() { m_dumpChildFrameScrollPositions = true; } 97 99 void dumpDatabaseCallbacks() { m_dumpDatabaseCallbacks = true; } 98 void dumpApplicationCacheDelegateCallbacks() { m_dumpApplicationCacheDelegateCallbacks = true; }100 void dumpApplicationCacheDelegateCallbacks() { m_dumpApplicationCacheDelegateCallbacks = true; } 99 101 void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; } 100 102 void setCanOpenWindows() { m_canOpenWindows = true; } … … 286 288 bool m_hasDumped; 287 289 bool m_textDump; 290 bool m_disallowIncreaseForApplicationCacheQuota; 288 291 bool m_dumpBackForwardList; 289 292 bool m_dumpChildrenAsText;
Note: See TracChangeset
for help on using the changeset viewer.