Diff
Modified: trunk/LayoutTests/ChangeLog (158449 => 158450)
--- trunk/LayoutTests/ChangeLog 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/LayoutTests/ChangeLog 2013-11-01 20:15:27 UTC (rev 158450)
@@ -1,3 +1,15 @@
+2013-11-01 Afonso R. Costa Jr. <afonso.co...@samsung.com>
+
+ Expose setApplicationCacheOriginQuota via window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=87838
+
+ Reviewed by Joseph Pecoraro.
+
+ * http/tests/appcache/origin-quota-continued-download-multiple-manifests.html: Updated
+ to use setApplicationCacheOriginQuota from window.internals
+ * http/tests/appcache/origin-quota-continued-download.html: Ditto.
+ * http/tests/appcache/origin-quota.html: Ditto.
+
2013-10-31 Mark Lam <mark....@apple.com>
REGRESSION: Crashes in -[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:].
Modified: trunk/LayoutTests/http/tests/appcache/origin-quota-continued-download-multiple-manifests.html (158449 => 158450)
--- trunk/LayoutTests/http/tests/appcache/origin-quota-continued-download-multiple-manifests.html 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/LayoutTests/http/tests/appcache/origin-quota-continued-download-multiple-manifests.html 2013-11-01 20:15:27 UTC (rev 158450)
@@ -14,7 +14,8 @@
if (window.testRunner) {
testRunner.clearAllApplicationCaches();
testRunner.dumpApplicationCacheDelegateCallbacks();
- testRunner.setApplicationCacheOriginQuota(20*1024);
+ if (window.internals)
+ internals.setApplicationCacheOriginQuota(20*1024);
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
Modified: trunk/LayoutTests/http/tests/appcache/origin-quota-continued-download.html (158449 => 158450)
--- trunk/LayoutTests/http/tests/appcache/origin-quota-continued-download.html 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/LayoutTests/http/tests/appcache/origin-quota-continued-download.html 2013-11-01 20:15:27 UTC (rev 158450)
@@ -14,7 +14,8 @@
if (window.testRunner) {
testRunner.clearAllApplicationCaches();
testRunner.dumpApplicationCacheDelegateCallbacks();
- testRunner.setApplicationCacheOriginQuota(1024);
+ if (window.internals)
+ internals.setApplicationCacheOriginQuota(1024);
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
Modified: trunk/LayoutTests/http/tests/appcache/origin-quota.html (158449 => 158450)
--- trunk/LayoutTests/http/tests/appcache/origin-quota.html 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/LayoutTests/http/tests/appcache/origin-quota.html 2013-11-01 20:15:27 UTC (rev 158450)
@@ -15,7 +15,8 @@
testRunner.clearAllApplicationCaches();
testRunner.dumpApplicationCacheDelegateCallbacks();
testRunner.disallowIncreaseForApplicationCacheQuota();
- testRunner.setApplicationCacheOriginQuota(20*1024);
+ if (window.internals)
+ internals.setApplicationCacheOriginQuota(20*1024);
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
@@ -49,7 +50,8 @@
// Expected to fail, then increase the quota.
addIFrameWithContinuation("resources/quota-origin-iframe-2.html", function(event) {
log(event.data);
- testRunner.setApplicationCacheOriginQuota(100*1024);
+ if (window.internals)
+ internals.setApplicationCacheOriginQuota(100*1024);
addThirdIFrame();
});
}
Modified: trunk/Source/WebCore/ChangeLog (158449 => 158450)
--- trunk/Source/WebCore/ChangeLog 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Source/WebCore/ChangeLog 2013-11-01 20:15:27 UTC (rev 158450)
@@ -1,3 +1,19 @@
+2013-11-01 Afonso R. Costa Jr. <afonso.co...@samsung.com>
+
+ Expose setApplicationCacheOriginQuota via window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=87838
+
+ Reviewed by Joseph Pecoraro.
+
+ Also reset the default origin quota in resetToConsistentState().
+
+ * testing/Internals.cpp: Add setApplicationCacheOriginQuota.
+ (WebCore::Internals::resetToConsistentState): Reset the default origin
+ quota.
+ (WebCore::Internals::setApplicationCacheOriginQuota): Added.
+ * testing/Internals.h: Add setApplicationCacheOriginQuota.
+ * testing/Internals.idl: Ditto.
+
2013-11-01 Nick Diego Yamane <nick.yam...@openbossa.org>
Explicitly initialize RefCounted base class in MediaStreamTrack's constructors
Modified: trunk/Source/WebCore/testing/Internals.cpp (158449 => 158450)
--- trunk/Source/WebCore/testing/Internals.cpp 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Source/WebCore/testing/Internals.cpp 2013-11-01 20:15:27 UTC (rev 158450)
@@ -28,6 +28,7 @@
#include "Internals.h"
#include "AnimationController.h"
+#include "ApplicationCacheStorage.h"
#include "BackForwardController.h"
#include "CachedResourceLoader.h"
#include "Chrome.h"
@@ -273,6 +274,7 @@
page->mainFrame().editor().toggleContinuousSpellChecking();
if (page->mainFrame().editor().isOverwriteModeEnabled())
page->mainFrame().editor().toggleOverwriteModeEnabled();
+ cacheStorage().setDefaultOriginQuota(ApplicationCacheStorage::noQuota());
}
Internals::Internals(Document* document)
@@ -1810,6 +1812,14 @@
}
#endif
+void Internals::setApplicationCacheOriginQuota(unsigned long long quota)
+{
+ Document* document = contextDocument();
+ if (!document)
+ return;
+ cacheStorage().storeUpdatedQuotaForOrigin(document->securityOrigin(), quota);
+}
+
void Internals::registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme)
{
SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy(scheme);
Modified: trunk/Source/WebCore/testing/Internals.h (158449 => 158450)
--- trunk/Source/WebCore/testing/Internals.h 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Source/WebCore/testing/Internals.h 2013-11-01 20:15:27 UTC (rev 158450)
@@ -262,6 +262,8 @@
void webkitDidExitFullScreenForElement(Element*);
#endif
+ void setApplicationCacheOriginQuota(unsigned long long);
+
void registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme);
void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const String& scheme);
Modified: trunk/Source/WebCore/testing/Internals.idl (158449 => 158450)
--- trunk/Source/WebCore/testing/Internals.idl 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Source/WebCore/testing/Internals.idl 2013-11-01 20:15:27 UTC (rev 158450)
@@ -219,6 +219,8 @@
void webkitDidExitFullScreenForElement(Element element);
#endif
+ void setApplicationCacheOriginQuota(unsigned long long quota);
+
void registerURLSchemeAsBypassingContentSecurityPolicy(DOMString scheme);
void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(DOMString scheme);
Modified: trunk/Source/WebKit/ChangeLog (158449 => 158450)
--- trunk/Source/WebKit/ChangeLog 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Source/WebKit/ChangeLog 2013-11-01 20:15:27 UTC (rev 158450)
@@ -1,3 +1,13 @@
+2013-11-01 Afonso R. Costa Jr. <afonso.co...@samsung.com>
+
+ Expose setApplicationCacheOriginQuota via window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=87838
+
+ Reviewed by Joseph Pecoraro.
+
+ * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Add
+ symbols for setApplicationCacheOriginQuota from Internals.
+
2013-11-01 Andy Estes <aes...@apple.com>
Reverted r158443. It broke the build.
Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (158449 => 158450)
--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in 2013-11-01 20:15:27 UTC (rev 158450)
@@ -457,3 +457,6 @@
symbolWithPointer(?cursiveFontFamily@Settings@WebCore@@QBEABVAtomicString@WTF@@W4UScriptCode@@@Z, ?cursiveFontFamily@Settings@WebCore@@QEBAAEBVAtomicString@WTF@@W4UScriptCode@@@Z)
symbolWithPointer(?setSimpleLineLayoutEnabled@Settings@WebCore@@QAEX_N@Z, ?setSimpleLineLayoutEnabled@Settings@WebCore@@QEAAX_N@Z)
symbolWithPointer(?setSimpleLineLayoutDebugBordersEnabled@Settings@WebCore@@QAEX_N@Z, ?setSimpleLineLayoutDebugBordersEnabled@Settings@WebCore@@QEAAX_N@Z)
+ symbolWithPointer(?storeUpdatedQuotaForOrigin@ApplicationCacheStorage@WebCore@@QAE_NPBVSecurityOrigin@2@_J@Z, ?setApplicationCacheOriginQuota@Internals@WebCore@@QAEX_K@Z)
+ symbolWithPointer(?cacheStorage@WebCore@@YAAAVApplicationCacheStorage@1@XZ, ?setApplicationCacheOriginQuota@Internals@WebCore@@QAEX_K@Z)
+ symbolWithPointer(?setDefaultOriginQuota@ApplicationCacheStorage@WebCore@@QAEX_J@Z, ?resetToConsistentState@Internals@WebCore@@SAXPAVPage@2@@Z)
Modified: trunk/Tools/ChangeLog (158449 => 158450)
--- trunk/Tools/ChangeLog 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/ChangeLog 2013-11-01 20:15:27 UTC (rev 158450)
@@ -1,3 +1,23 @@
+2013-11-01 Afonso R. Costa Jr. <afonso.co...@samsung.com>
+
+ Expose setApplicationCacheOriginQuota via window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=87838
+
+ Reviewed by Joseph Pecoraro.
+
+ * DumpRenderTree/TestRunner.cpp: Move setApplicationCacheOriginQuota
+ to window.internals
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h: Ditto.
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp: Remove setApplicationCacheOriginQuota.
+ * DumpRenderTree/efl/TestRunnerEfl.cpp: Ditto.
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp: Ditto.
+ * DumpRenderTree/mac/TestRunnerMac.mm: Ditto.
+ * DumpRenderTree/win/TestRunnerWin.cpp: Ditto.
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Ditto.
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp: Ditto.
+ * WebKitTestRunner/InjectedBundle/TestRunner.h: Ditto.
+
2013-10-31 Mark Lam <mark....@apple.com>
REGRESSION: Crashes in -[UIDelegate webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:].
Modified: trunk/Tools/DumpRenderTree/TestRunner.cpp (158449 => 158450)
--- trunk/Tools/DumpRenderTree/TestRunner.cpp 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/DumpRenderTree/TestRunner.cpp 2013-11-01 20:15:27 UTC (rev 158450)
@@ -879,21 +879,6 @@
return JSValueMakeUndefined(context);
}
-static JSValueRef setApplicationCacheOriginQuotaCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- // Has mac implementation
- if (argumentCount < 1)
- return JSValueMakeUndefined(context);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
-
- double size = JSValueToNumber(context, arguments[0], NULL);
- if (!std::isnan(size))
- controller->setApplicationCacheOriginQuota(static_cast<unsigned long long>(size));
-
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef setAuthenticationPasswordCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac & windows implementation
@@ -2161,7 +2146,6 @@
{ "setAllowFileAccessFromFileURLs", setAllowFileAccessFromFileURLsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAlwaysAcceptCookies", setAlwaysAcceptCookiesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAppCacheMaximumSize", setAppCacheMaximumSizeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setApplicationCacheOriginQuota", setApplicationCacheOriginQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAudioResult", setAudioResultCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAuthenticationPassword", setAuthenticationPasswordCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAuthenticationUsername", setAuthenticationUsernameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
Modified: trunk/Tools/DumpRenderTree/TestRunner.h (158449 => 158450)
--- trunk/Tools/DumpRenderTree/TestRunner.h 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/DumpRenderTree/TestRunner.h 2013-11-01 20:15:27 UTC (rev 158450)
@@ -90,7 +90,6 @@
void setAllowUniversalAccessFromFileURLs(bool);
void setAllowFileAccessFromFileURLs(bool);
void setAppCacheMaximumSize(unsigned long long quota);
- void setApplicationCacheOriginQuota(unsigned long long);
void setAuthorAndUserStylesEnabled(bool);
void setCacheModel(int);
void setCustomPolicyDelegate(bool setDelegate, bool permissive);
Modified: trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp (158449 => 158450)
--- trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp 2013-11-01 20:15:27 UTC (rev 158450)
@@ -501,11 +501,6 @@
notImplemented();
}
-void TestRunner::setApplicationCacheOriginQuota(unsigned long long)
-{
- notImplemented();
-}
-
void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
{
DumpRenderTreeSupport::setMockDeviceOrientation(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
Modified: trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp (158449 => 158450)
--- trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp 2013-11-01 20:15:27 UTC (rev 158450)
@@ -530,13 +530,6 @@
ewk_settings_application_cache_clear();
}
-void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
-{
- Ewk_Security_Origin* origin = ewk_frame_security_origin_get(browser->mainFrame());
- ewk_security_origin_application_cache_quota_set(origin, quota);
- ewk_security_origin_free(origin);
-}
-
void TestRunner::clearApplicationCacheForOrigin(OpaqueJSString* url)
{
Ewk_Security_Origin* origin = ewk_security_origin_new_from_string(url->string().utf8().data());
Modified: trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp (158449 => 158450)
--- trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp 2013-11-01 20:15:27 UTC (rev 158450)
@@ -575,11 +575,6 @@
// FIXME: Implement to support application cache quotas.
}
-void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
-{
- // FIXME: Implement to support application cache quotas.
-}
-
void TestRunner::clearApplicationCacheForOrigin(OpaqueJSString*)
{
// FIXME: Implement to support deleting all application caches for an origin.
Modified: trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm (158449 => 158450)
--- trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm 2013-11-01 20:15:27 UTC (rev 158450)
@@ -394,13 +394,6 @@
[WebApplicationCache setMaximumSize:size];
}
-void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
-{
- WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:@"http://127.0.0.1:8000"]];
- [[origin applicationCacheQuotaManager] setQuota:quota];
- [origin release];
-}
-
void TestRunner::setAuthorAndUserStylesEnabled(bool flag)
{
[[[mainFrame webView] preferences] setAuthorAndUserStylesEnabled:flag];
Modified: trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp (158449 => 158450)
--- trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp 2013-11-01 20:15:27 UTC (rev 158450)
@@ -790,11 +790,6 @@
// FIXME: Implement to support deleting all application cache for an origin.
}
-void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
-{
- // FIXME: Implement to support application cache quotas.
-}
-
JSValueRef TestRunner::originsWithApplicationCache(JSContextRef context)
{
// FIXME: Implement to get origins that have application caches.
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (158449 => 158450)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2013-11-01 20:15:27 UTC (rev 158450)
@@ -111,7 +111,6 @@
void setAppCacheMaximumSize(unsigned long long size);
long long applicationCacheDiskUsageForOrigin(DOMString origin);
void clearApplicationCacheForOrigin(DOMString name);
- void setApplicationCacheOriginQuota(unsigned long long bytes);
void disallowIncreaseForApplicationCacheQuota();
object originsWithApplicationCache();
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (158449 => 158450)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2013-11-01 20:15:27 UTC (rev 158450)
@@ -266,12 +266,6 @@
return WKBundleGetAppCacheUsageForOrigin(InjectedBundle::shared().bundle(), toWK(origin).get());
}
-void TestRunner::setApplicationCacheOriginQuota(unsigned long long bytes)
-{
- WKRetainPtr<WKStringRef> origin(AdoptWK, WKStringCreateWithUTF8CString("http://127.0.0.1:8000"));
- WKBundleSetApplicationCacheOriginQuota(InjectedBundle::shared().bundle(), origin.get(), bytes);
-}
-
void TestRunner::disallowIncreaseForApplicationCacheQuota()
{
m_disallowIncreaseForApplicationCacheQuota = true;
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (158449 => 158450)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2013-11-01 19:46:56 UTC (rev 158449)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2013-11-01 20:15:27 UTC (rev 158450)
@@ -141,7 +141,6 @@
void clearApplicationCacheForOrigin(JSStringRef origin);
void setAppCacheMaximumSize(uint64_t);
long long applicationCacheDiskUsageForOrigin(JSStringRef origin);
- void setApplicationCacheOriginQuota(unsigned long long);
void disallowIncreaseForApplicationCacheQuota();
bool shouldDisallowIncreaseForApplicationCacheQuota() { return m_disallowIncreaseForApplicationCacheQuota; }
JSValueRef originsWithApplicationCache();