[GTK] Add CSS Grid Layout as experimental feature
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jan 2014 20:56:01 +0000 (20:56 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 17 Jan 2014 20:56:01 +0000 (20:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=127089

Reviewed by Martin Robinson.

Allow CSS Grid Layout to be enabled through the environment variable WEBKITGTK_EXPERIMENTAL_FEATURES.

Example: WEBKITGTK_EXPERIMENTAL_FEATURES="CSS_GRID_LAYOUT=1"

* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsConstructed): Use new experimental feature to enable or disable CSS Grid Layout.
* UIProcess/gtk/ExperimentalFeatures.cpp: Add new experimental feature.
* UIProcess/gtk/ExperimentalFeatures.h: Ditto.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitSettings.cpp
Source/WebKit2/UIProcess/gtk/ExperimentalFeatures.cpp
Source/WebKit2/UIProcess/gtk/ExperimentalFeatures.h

index 6e4da97160660c161ac25ad9c84f918151a68c67..35eb5d061eee4e6214d88ca9cdcfe86ee78e04f5 100644 (file)
@@ -1,3 +1,19 @@
+2014-01-17  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [GTK] Add CSS Grid Layout as experimental feature
+        https://bugs.webkit.org/show_bug.cgi?id=127089
+
+        Reviewed by Martin Robinson.
+
+        Allow CSS Grid Layout to be enabled through the environment variable WEBKITGTK_EXPERIMENTAL_FEATURES.
+
+        Example: WEBKITGTK_EXPERIMENTAL_FEATURES="CSS_GRID_LAYOUT=1"
+
+        * UIProcess/API/gtk/WebKitSettings.cpp:
+        (webKitSettingsConstructed): Use new experimental feature to enable or disable CSS Grid Layout.
+        * UIProcess/gtk/ExperimentalFeatures.cpp: Add new experimental feature.
+        * UIProcess/gtk/ExperimentalFeatures.h: Ditto.
+
 2014-01-17  Enrica Casucci  <enrica@apple.com>
 
         Support WebSelections in WK2 on iOS.
index 359802edb150a80b1b2a52b5559c3023416c9bdb..e8a1f37e22fe3ae25e95d7617c1beb36031841cc 100644 (file)
@@ -147,6 +147,9 @@ static void webKitSettingsConstructed(GObject* object)
 
     WebPreferences* prefs = WEBKIT_SETTINGS(object)->priv->preferences.get();
     ExperimentalFeatures features;
+    bool cssGridLayoutEnabled = features.isEnabled(ExperimentalFeatures::CSSGridLayout);
+    if (prefs->cssGridLayoutEnabled() != cssGridLayoutEnabled)
+        prefs->setCSSGridLayoutEnabled(cssGridLayoutEnabled);
     bool regionBasedColumnsEnabled = features.isEnabled(ExperimentalFeatures::RegionBasedColumns);
     if (prefs->regionBasedColumnsEnabled() != regionBasedColumnsEnabled)
         prefs->setRegionBasedColumnsEnabled(regionBasedColumnsEnabled);
index 2b45fb61f28762ac3d83586c0f4109e4f9b84744..1b69302acc5485422c181fb87a06f3e439f5e7e5 100644 (file)
@@ -39,6 +39,7 @@ struct Setting {
 };
 
 static Setting settings[] = {
+    { ExperimentalFeatures::CSSGridLayout, "CSS_GRID_LAYOUT", false },
     { ExperimentalFeatures::RegionBasedColumns, "REGION_BASED_COLUMNS", false }
 };
 
index eb04228840cfecfcf981634792a89cda6c2c8184..59603cbf850c1cad46831eec028567657215f92c 100644 (file)
@@ -37,6 +37,7 @@ namespace WebKit {
 class ExperimentalFeatures {
 public:
     enum Feature {
+        CSSGridLayout,
         RegionBasedColumns
     };