Diff
Modified: trunk/Source/WebKit2/ChangeLog (128189 => 128190)
--- trunk/Source/WebKit2/ChangeLog 2012-09-11 15:12:28 UTC (rev 128189)
+++ trunk/Source/WebKit2/ChangeLog 2012-09-11 15:23:37 UTC (rev 128190)
@@ -1,3 +1,23 @@
+2012-09-11 Christophe Dumez <[email protected]>
+
+ [WK2][WKTR] TestRunner needs to implement setApplicationCacheOriginQuota
+ https://bugs.webkit.org/show_bug.cgi?id=96379
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add Bundle C API to set the application cache quota for a
+ given security origin. This is needed by WebKitTestRunner
+ to implement setApplicationCacheOriginQuota().
+
+ * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
+ (WKBundleSetApplicationCacheOriginQuota):
+ * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::setApplicationCacheOriginQuota):
+ (WebKit):
+ * WebProcess/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+
2012-09-11 Mikhail Pozdnyakov <[email protected]>
[WK2][WTR] WebKitTestRunner needs testRunner.setSpatialNavigationEnabled
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp (128189 => 128190)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp 2012-09-11 15:12:28 UTC (rev 128189)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp 2012-09-11 15:23:37 UTC (rev 128190)
@@ -246,6 +246,11 @@
return toImpl(bundleRef)->appCacheUsageForOrigin(toImpl(origin)->string());
}
+void WKBundleSetApplicationCacheOriginQuota(WKBundleRef bundleRef, WKStringRef origin, uint64_t bytes)
+{
+ return toImpl(bundleRef)->setApplicationCacheOriginQuota(toImpl(origin)->string(), bytes);
+}
+
void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double seconds)
{
toImpl(bundleRef)->setMinimumTimerInterval(toImpl(pageGroupRef), seconds);
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h (128189 => 128190)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h 2012-09-11 15:12:28 UTC (rev 128189)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h 2012-09-11 15:23:37 UTC (rev 128190)
@@ -98,6 +98,7 @@
WK_EXPORT void WKBundleClearApplicationCacheForOrigin(WKBundleRef bundle, WKStringRef origin);
WK_EXPORT void WKBundleSetAppCacheMaximumSize(WKBundleRef bundle, uint64_t size);
WK_EXPORT uint64_t WKBundleGetAppCacheUsageForOrigin(WKBundleRef bundle, WKStringRef origin);
+WK_EXPORT void WKBundleSetApplicationCacheOriginQuota(WKBundleRef bundle, WKStringRef origin, uint64_t bytes);
// Garbage collection API
WK_EXPORT void WKBundleGarbageCollectJavaScriptObjects(WKBundleRef bundle);
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (128189 => 128190)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2012-09-11 15:12:28 UTC (rev 128189)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2012-09-11 15:23:37 UTC (rev 128190)
@@ -47,6 +47,7 @@
#include <_javascript_Core/APICast.h>
#include <_javascript_Core/JSLock.h>
#include <WebCore/ApplicationCache.h>
+#include <WebCore/ApplicationCacheStorage.h>
#include <WebCore/Frame.h>
#include <WebCore/FrameView.h>
#include <WebCore/GCController.h>
@@ -351,6 +352,12 @@
return ApplicationCache::diskUsageForOrigin(origin.get());
}
+void InjectedBundle::setApplicationCacheOriginQuota(const String& originString, uint64_t bytes)
+{
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
+ cacheStorage().storeUpdatedQuotaForOrigin(origin.get(), bytes);
+}
+
int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels)
{
Frame* coreFrame = frame ? frame->coreFrame() : 0;
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h (128189 => 128190)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h 2012-09-11 15:12:28 UTC (rev 128189)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h 2012-09-11 15:23:37 UTC (rev 128190)
@@ -149,6 +149,7 @@
void clearApplicationCacheForOrigin(const String& origin);
void setAppCacheMaximumSize(uint64_t);
uint64_t appCacheUsageForOrigin(const String& origin);
+ void setApplicationCacheOriginQuota(const String& origin, uint64_t);
// Garbage collection API
void garbageCollectJavaScriptObjects();
Modified: trunk/Tools/ChangeLog (128189 => 128190)
--- trunk/Tools/ChangeLog 2012-09-11 15:12:28 UTC (rev 128189)
+++ trunk/Tools/ChangeLog 2012-09-11 15:23:37 UTC (rev 128190)
@@ -1,3 +1,20 @@
+2012-09-11 Christophe Dumez <[email protected]>
+
+ [WK2][WKTR] TestRunner needs to implement setApplicationCacheOriginQuota
+ https://bugs.webkit.org/show_bug.cgi?id=96379
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add implementation for setApplicationCacheOriginQuota
+ to WebKitTestRunner.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setApplicationCacheOriginQuota):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
2012-09-11 Luciano Wolf <[email protected]>
[Qt] [WK2] editing/inserting/typing-tab-designmode tests are failing
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (128189 => 128190)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2012-09-11 15:12:28 UTC (rev 128189)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2012-09-11 15:23:37 UTC (rev 128190)
@@ -111,6 +111,7 @@
void setAppCacheMaximumSize(in unsigned long long size);
long long applicationCacheDiskUsageForOrigin(in DOMString origin);
void clearApplicationCacheForOrigin(in DOMString name);
+ void setApplicationCacheOriginQuota(in unsigned long long bytes);
// Compositing testing.
DOMString layerTreeAsText();
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (128189 => 128190)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2012-09-11 15:12:28 UTC (rev 128189)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2012-09-11 15:23:37 UTC (rev 128190)
@@ -317,6 +317,12 @@
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);
+}
+
bool TestRunner::isCommandEnabled(JSStringRef name)
{
return WKBundlePageIsEditingCommandEnabled(InjectedBundle::shared().page()->page(), toWK(name).get());
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (128189 => 128190)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2012-09-11 15:12:28 UTC (rev 128189)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2012-09-11 15:23:37 UTC (rev 128190)
@@ -148,6 +148,7 @@
void clearApplicationCacheForOrigin(JSStringRef origin);
void setAppCacheMaximumSize(uint64_t);
long long applicationCacheDiskUsageForOrigin(JSStringRef origin);
+ void setApplicationCacheOriginQuota(unsigned long long);
// Printing
bool isPageBoxVisible(int pageIndex);