[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 6e4da97..35eb5d0 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 359802e..e8a1f37 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 2b45fb6..1b69302 100644 (file)
@@ -39,6 +39,7 @@ struct Setting {
 };
 
 static Setting settings[] = {
+    { ExperimentalFeatures::CSSGridLayout, "CSS_GRID_LAYOUT", false },
     { ExperimentalFeatures::RegionBasedColumns, "REGION_BASED_COLUMNS", false }
 };
 
index eb04228..59603cb 100644 (file)
@@ -37,6 +37,7 @@ namespace WebKit {
 class ExperimentalFeatures {
 public:
     enum Feature {
+        CSSGridLayout,
         RegionBasedColumns
     };