2009-05-23 Jan Michael Alonzo <jmalonzo@webkit.org>
authorjmalonzo@webkit.org <jmalonzo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 May 2009 22:35:15 +0000 (22:35 +0000)
committerjmalonzo@webkit.org <jmalonzo@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 May 2009 22:35:15 +0000 (22:35 +0000)
        Reviewed by Gustavo Noronha and Xan Lopez.

        [Gtk] Enable database and localStorage support
        https://bugs.webkit.org/show_bug.cgi?id=25629

        Enable storage/ tests for Gtk.

        * platform/gtk/Skipped:

2009-05-23  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Reviewed by Gustavo Noronha and Xan Lopez.

        [Gtk] Enable database and localStorage support
        https://bugs.webkit.org/show_bug.cgi?id=25629

        Add settings to enable or disable database and localStorage
        support and enable them by default. This allows databases to be
        shown in the WebInspector as well as allow us to run the storage
        layout tests.

        * webkit/webkitwebsettings.cpp:
        (webkit_web_settings_class_init):
        (webkit_web_settings_set_property):
        (webkit_web_settings_get_property):
        (webkit_web_settings_copy):
        * webkit/webkitwebview.cpp:
        (webkit_web_view_update_settings):
        (webkit_web_view_settings_notify):

2009-05-23  Jan Michael Alonzo  <jmalonzo@webkit.org>

        Reviewed by Gustavo Noronha and Xan Lopez.

        [Gtk] Enable database and localStorage support
        https://bugs.webkit.org/show_bug.cgi?id=25629

        Enable database and localStorage for running the storage/ tests.

        * DumpRenderTree/gtk/DumpRenderTree.cpp:
        (resetWebViewToConsistentStateBeforeTesting):

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

LayoutTests/ChangeLog
LayoutTests/platform/gtk/Skipped
WebKit/gtk/ChangeLog
WebKit/gtk/webkit/webkitwebsettings.cpp
WebKit/gtk/webkit/webkitwebview.cpp
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp

index 58e9007..a574352 100644 (file)
@@ -1,3 +1,14 @@
+2009-05-23  Jan Michael Alonzo  <jmalonzo@webkit.org>
+
+        Reviewed by Gustavo Noronha and Xan Lopez.
+
+        [Gtk] Enable database and localStorage support
+        https://bugs.webkit.org/show_bug.cgi?id=25629
+
+        Enable storage/ tests for Gtk.
+
+        * platform/gtk/Skipped:
+
 2009-05-23  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Maciej Stachowiak.
index ecac154..7711ceb 100644 (file)
@@ -4107,27 +4107,7 @@ security/block-test.html
 
 # Tests in storage/ directory
 #   Tests failing
-storage/close-during-stress-test.html
-storage/empty-statement.html
-storage/execute-sql-args.html
-storage/multiple-databases-garbage-collection.html
-storage/multiple-transactions.html
-storage/private-browsing-readonly.html
 storage/quota-tracking.html
-storage/sql-data-types.html
-storage/success-callback.html
-storage/transaction-callback-exception-crash.html
-storage/domstorage/window-attributes-exist.html
-storage/domstorage/localstorage/clear.html
-storage/domstorage/localstorage/delete-removal.html
-storage/domstorage/localstorage/enumerate-storage.html
-storage/domstorage/localstorage/iframe-events.html
-storage/domstorage/localstorage/index-get-and-set.html
-storage/domstorage/localstorage/onstorage-attribute-markup.html
-storage/domstorage/localstorage/onstorage-attribute-setattribute.html
-storage/domstorage/localstorage/private-browsing-affects-storage.html
-storage/domstorage/localstorage/simple-events.html
-storage/domstorage/localstorage/simple-usage.html
 storage/domstorage/localstorage/window-open.html
 storage/domstorage/sessionstorage/window-open.html
 
index 405e1dd..59140a8 100644 (file)
@@ -1,3 +1,24 @@
+2009-05-23  Jan Michael Alonzo  <jmalonzo@webkit.org>
+
+        Reviewed by Gustavo Noronha and Xan Lopez.
+
+        [Gtk] Enable database and localStorage support
+        https://bugs.webkit.org/show_bug.cgi?id=25629
+
+        Add settings to enable or disable database and localStorage
+        support and enable them by default. This allows databases to be
+        shown in the WebInspector as well as allow us to run the storage
+        layout tests.
+
+        * webkit/webkitwebsettings.cpp:
+        (webkit_web_settings_class_init):
+        (webkit_web_settings_set_property):
+        (webkit_web_settings_get_property):
+        (webkit_web_settings_copy):
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_update_settings):
+        (webkit_web_view_settings_notify):
+
 2009-05-23  David Kilzer  <ddkilzer@apple.com>
 
         Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
index 4b8dac3..38be7f7 100644 (file)
@@ -78,6 +78,8 @@ struct _WebKitWebSettingsPrivate {
     gchar* spell_checking_languages;
     GSList* spell_checking_languages_list;
     gboolean enable_caret_browsing;
+    gboolean enable_html5_database;
+    gboolean enable_html5_local_storage;
 };
 
 #define WEBKIT_WEB_SETTINGS_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_SETTINGS, WebKitWebSettingsPrivate))
@@ -109,7 +111,9 @@ enum {
     PROP_ENABLE_PRIVATE_BROWSING,
     PROP_ENABLE_SPELL_CHECKING,
     PROP_SPELL_CHECKING_LANGUAGES,
-    PROP_ENABLE_CARET_BROWSING
+    PROP_ENABLE_CARET_BROWSING,
+    PROP_ENABLE_HTML5_DATABASE,
+    PROP_ENABLE_HTML5_LOCAL_STORAGE
 };
 
 static void webkit_web_settings_finalize(GObject* object);
@@ -418,6 +422,38 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
                                                          _("Whether to enable accesibility enhanced keyboard navigation"),
                                                          FALSE,
                                                          flags));
+    /**
+    * WebKitWebSettings:enable-html5-database:
+    *
+    * Whether to enable HTML5 client-side SQL database support. Client-side
+    * SQL database allows web pages to store structured data and be able to
+    * use SQL to manipulate that data asynchronously.
+    *
+    * Since 1.1.8
+    */
+    g_object_class_install_property(gobject_class,
+                                    PROP_ENABLE_HTML5_DATABASE,
+                                    g_param_spec_boolean("enable-html5-database",
+                                                         _("Enable HTML5 Database"),
+                                                         _("Whether to enable HTML5 database support"),
+                                                         TRUE,
+                                                         flags));
+
+    /**
+    * WebKitWebSettings:enable-html5-local-storage:
+    *
+    * Whether to enable HTML5 localStorage support. localStorage provides
+    * simple synchronous storage access.
+    *
+    * Since 1.1.8
+    */
+    g_object_class_install_property(gobject_class,
+                                    PROP_ENABLE_HTML5_LOCAL_STORAGE,
+                                    g_param_spec_boolean("enable-html5-local-storage",
+                                                         _("Enable HTML5 Local Storage"),
+                                                         _("Whether to enable HTML5 Local Storage support"),
+                                                         TRUE,
+                                                         flags));
 
     g_type_class_add_private(klass, sizeof(WebKitWebSettingsPrivate));
 }
@@ -544,6 +580,12 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
     case PROP_ENABLE_CARET_BROWSING:
         priv->enable_caret_browsing = g_value_get_boolean(value);
         break;
+    case PROP_ENABLE_HTML5_DATABASE:
+        priv->enable_html5_database = g_value_get_boolean(value);
+        break;
+    case PROP_ENABLE_HTML5_LOCAL_STORAGE:
+        priv->enable_html5_local_storage = g_value_get_boolean(value);
+        break;
     case PROP_ENABLE_SPELL_CHECKING:
         priv->enable_spell_checking = g_value_get_boolean(value);
         break;
@@ -654,6 +696,12 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa
     case PROP_ENABLE_CARET_BROWSING:
         g_value_set_boolean(value, priv->enable_caret_browsing);
         break;
+    case PROP_ENABLE_HTML5_DATABASE:
+        g_value_set_boolean(value, priv->enable_html5_database);
+        break;
+    case PROP_ENABLE_HTML5_LOCAL_STORAGE:
+        g_value_set_boolean(value, priv->enable_html5_local_storage);
+        break;
     case PROP_ENABLE_SPELL_CHECKING:
         g_value_set_boolean(value, priv->enable_spell_checking);
         break;
@@ -716,6 +764,8 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings)
                  "spell-checking-languages", priv->spell_checking_languages,
                  "spell-checking-languages-list", priv->spell_checking_languages_list,
                  "enable-caret-browsing", priv->enable_caret_browsing,
+                 "enable-html5-database", priv->enable_html5_database,
+                 "enable-html5-local-storage", priv->enable_html5_local_storage,
                  NULL));
 
     return copy;
index 961bc8a..bde3777 100644 (file)
@@ -1979,7 +1979,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
     gchar* defaultEncoding, *cursiveFontFamily, *defaultFontFamily, *fantasyFontFamily, *monospaceFontFamily, *sansSerifFontFamily, *serifFontFamily, *userStylesheetUri;
     gboolean autoLoadImages, autoShrinkImages, printBackgrounds,
         enableScripts, enablePlugins, enableDeveloperExtras, resizableTextAreas,
-        enablePrivateBrowsing, enableCaretBrowsing;
+        enablePrivateBrowsing, enableCaretBrowsing, enableHTML5Database, enableHTML5LocalStorage;
 
     g_object_get(webSettings,
                  "default-encoding", &defaultEncoding,
@@ -1999,6 +1999,8 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
                  "enable-developer-extras", &enableDeveloperExtras,
                  "enable-private-browsing", &enablePrivateBrowsing,
                  "enable-caret-browsing", &enableCaretBrowsing,
+                 "enable-html5-database", &enableHTML5Database,
+                 "enable-html5-local-storage", &enableHTML5LocalStorage,
                  NULL);
 
     settings->setDefaultTextEncodingName(defaultEncoding);
@@ -2018,6 +2020,8 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
     settings->setDeveloperExtrasEnabled(enableDeveloperExtras);
     settings->setPrivateBrowsingEnabled(enablePrivateBrowsing);
     settings->setCaretBrowsingEnabled(enableCaretBrowsing);
+    settings->setDatabasesEnabled(enableHTML5Database);
+    settings->setLocalStorageEnabled(enableHTML5LocalStorage);
 
     g_free(defaultEncoding);
     g_free(cursiveFontFamily);
@@ -2090,6 +2094,10 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
         settings->setPrivateBrowsingEnabled(g_value_get_boolean(&value));
     else if (name == g_intern_string("enable-caret-browsing"))
         settings->setCaretBrowsingEnabled(g_value_get_boolean(&value));
+    else if (name == g_intern_string("enable-html5-database"))
+        settings->setDatabasesEnabled(g_value_get_boolean(&value));
+    else if (name == g_intern_string("enable-html5-local-storage"))
+        settings->setLocalStorageEnabled(g_value_get_boolean(&value));
     else if (!g_object_class_find_property(G_OBJECT_GET_CLASS(webSettings), name))
         g_warning("Unexpected setting '%s'", name);
     g_value_unset(&value);
index 46cf9c2..632fc25 100644 (file)
@@ -1,3 +1,15 @@
+2009-05-23  Jan Michael Alonzo  <jmalonzo@webkit.org>
+
+        Reviewed by Gustavo Noronha and Xan Lopez.
+
+        [Gtk] Enable database and localStorage support
+        https://bugs.webkit.org/show_bug.cgi?id=25629
+
+        Enable database and localStorage for running the storage/ tests.
+
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (resetWebViewToConsistentStateBeforeTesting):
+
 2009-05-23  David Kilzer  <ddkilzer@apple.com>
 
         Part 1 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
index d514c16..1abba38 100644 (file)
@@ -230,6 +230,8 @@ static void resetWebViewToConsistentStateBeforeTesting()
                  "enable-private-browsing", FALSE,
                  "enable-developer-extras", FALSE,
                  "enable-spell-checking", TRUE,
+                 "enable-html5-database", TRUE,
+                 "enable-html5-local-storage", TRUE,
                  NULL);
 
     WebKitWebInspector* inspector = webkit_web_view_get_inspector(webView);