[EFL] Add a few more web database functions to ewk_settings.
authorkubo@profusion.mobi <kubo@profusion.mobi@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Dec 2011 19:11:35 +0000 (19:11 +0000)
committerkubo@profusion.mobi <kubo@profusion.mobi@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Dec 2011 19:11:35 +0000 (19:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=72148

Reviewed by Antonio Gomes.

Source/WebKit/efl:

Add code to change the default quota (there as only a getter so far)
and one to clear the databases.

* ewk/ewk_settings.cpp:
(ewk_settings_web_database_default_quota_set):
(ewk_settings_web_database_clear):
* ewk/ewk_settings.h:

Tools:

* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::clearAllDatabases):
(LayoutTestController::setDatabaseQuota):

LayoutTests:

LayoutTestController::setDatabaseQuota is implemented now.

* platform/efl/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@102966 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/efl/Skipped
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/ewk/ewk_settings.cpp
Source/WebKit/efl/ewk/ewk_settings.h
Tools/ChangeLog
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp

index 6c8f58c716f12ff9e5ba6ab84520b5a6d46f6f0b..0c32c376c2d112978189530c70f9e3c94f333752 100644 (file)
@@ -1,3 +1,14 @@
+2011-12-15  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [EFL] Add a few more web database functions to ewk_settings.
+        https://bugs.webkit.org/show_bug.cgi?id=72148
+
+        Reviewed by Antonio Gomes.
+
+        LayoutTestController::setDatabaseQuota is implemented now.
+
+        * platform/efl/Skipped:
+
 2011-12-15  Brady Eidson  <beidson@apple.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=74607
index 4b30cb978716f79469a86c14d42ae0765d1a1df5..d64a1d6bf8244777bf710c33c10617e9e86f6a65 100644 (file)
@@ -667,10 +667,6 @@ storage/domstorage/localstorage/storagetracker/storage-tracker-7-usage.html
 # EFL's LayoutTestController does not implement clearAllDatabases
 storage
 
-# EFL's LayoutTestController does not implement setDatabaseQuota
-storage/open-database-creation-callback.html
-storage/quota-tracking.html
-
 # EFL's LayoutTestController does not implement originsWithLocalStorage
 storage/domstorage/localstorage/storagetracker
 
index 22ec46a7afcad673cf15c7317ca827f8191a8e6f..cd053cd47214598e02f4851be3cfceb7e7ca007f 100644 (file)
@@ -1,3 +1,18 @@
+2011-12-15  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [EFL] Add a few more web database functions to ewk_settings.
+        https://bugs.webkit.org/show_bug.cgi?id=72148
+
+        Reviewed by Antonio Gomes.
+
+        Add code to change the default quota (there as only a getter so far)
+        and one to clear the databases.
+
+        * ewk/ewk_settings.cpp:
+        (ewk_settings_web_database_default_quota_set):
+        (ewk_settings_web_database_clear):
+        * ewk/ewk_settings.h:
+
 2011-12-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         [EFL] Change efl style variable name with WebKit style for internal functions.
index b7387caff009deabbacab6743d58d31552f0ad58..b8280d0013ec9466e88cd7ccf3aa500c245462ad 100644 (file)
@@ -99,6 +99,18 @@ uint64_t ewk_settings_web_database_default_quota_get()
     return s_webDatabaseQuota;
 }
 
+void ewk_settings_web_database_default_quota_set(uint64_t maximumSize)
+{
+    s_webDatabaseQuota = maximumSize;
+}
+
+void ewk_settings_web_database_clear()
+{
+#if ENABLE(SQL_DATABASE)
+    WebCore::DatabaseTracker::tracker().deleteAllDatabases();
+#endif
+}
+
 void ewk_settings_web_database_path_set(const char* path)
 {
 #if ENABLE(SQL_DATABASE)
index b17679201b3929ef0dc1c51f02a7f05a9236f175..7860573054d975d22116951cb2a00108474ceea7 100644 (file)
@@ -43,6 +43,20 @@ extern "C" {
  */
 EAPI uint64_t         ewk_settings_web_database_default_quota_get(void);
 
+/**
+ * Sets the default maximum size (in bytes) an HTML5 Web Database database can have.
+ *
+ * By default, this value is 1MB.
+ *
+ * @param maximum_size the new maximum size a database is allowed
+ */
+EAPI void             ewk_settings_web_database_default_quota_set(uint64_t maximum_size);
+
+/**
+ * Removes all HTML5 Web Database databases.
+ */
+EAPI void             ewk_settings_web_database_clear(void);
+
 /**
  * Sets the current path to the directory WebKit will write Web
  * Database databases.
index 7712f21855b195c43322c025e0f02480d6d0ccea..5193d41f569f87811994e683761da269f9a58ca0 100644 (file)
@@ -1,3 +1,14 @@
+2011-12-15  Raphael Kubo da Costa  <kubo@profusion.mobi>
+
+        [EFL] Add a few more web database functions to ewk_settings.
+        https://bugs.webkit.org/show_bug.cgi?id=72148
+
+        Reviewed by Antonio Gomes.
+
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::clearAllDatabases):
+        (LayoutTestController::setDatabaseQuota):
+
 2011-12-15  Martin Kosiba  <mkosiba@google.com>
 
         Fix find on web pages with -webkit-user-select: none for Chromium
index 179af6aeac65f2ceefb463369109041527119367..8dd0a37ca54797d7b8291b214f5fb58f6d0ae3a7 100644 (file)
@@ -543,12 +543,12 @@ long long LayoutTestController::applicationCacheDiskUsageForOrigin(JSStringRef)
 
 void LayoutTestController::clearAllDatabases()
 {
-    notImplemented();
+    ewk_settings_web_database_clear();
 }
 
-void LayoutTestController::setDatabaseQuota(unsigned long long)
+void LayoutTestController::setDatabaseQuota(unsigned long long quota)
 {
-    notImplemented();
+    ewk_settings_web_database_default_quota_set(quota);
 }
 
 JSValueRef LayoutTestController::originsWithLocalStorage(JSContextRef context)