Title: [200389] trunk/Source/WebKit2
Revision
200389
Author
[email protected]
Date
2016-05-03 15:12:53 -0700 (Tue, 03 May 2016)

Log Message

CSS Grid should be an experimental feature flag
https://bugs.webkit.org/show_bug.cgi?id=157327
<rdar://problem/26075147>

Reviewed by Anders Carlsson.

The CSS Grid Layout runtime flag was exposed by
a WebKit preference. It was in the experimental
section but was missing the "Experimental" prefix.

It was also missing the human readable description.

Lastly, there is no need for the C API for experimental
features.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCSSGridLayoutEnabled): Deleted.
(WKPreferencesGetCSSGridLayoutEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (200388 => 200389)


--- trunk/Source/WebKit2/ChangeLog	2016-05-03 21:46:06 UTC (rev 200388)
+++ trunk/Source/WebKit2/ChangeLog	2016-05-03 22:12:53 UTC (rev 200389)
@@ -1,3 +1,30 @@
+2016-05-03  Dean Jackson  <[email protected]>
+
+        CSS Grid should be an experimental feature flag
+        https://bugs.webkit.org/show_bug.cgi?id=157327
+        <rdar://problem/26075147>
+
+        Reviewed by Anders Carlsson.
+
+        The CSS Grid Layout runtime flag was exposed by
+        a WebKit preference. It was in the experimental
+        section but was missing the "Experimental" prefix.
+
+        It was also missing the human readable description.
+
+        Lastly, there is no need for the C API for experimental
+        features.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * UIProcess/API/C/WKPreferences.cpp:
+        (WKPreferencesSetCSSGridLayoutEnabled): Deleted.
+        (WKPreferencesGetCSSGridLayoutEnabled): Deleted.
+        * UIProcess/API/C/WKPreferencesRefPrivate.h:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
 2016-05-03  Alex Christensen  <[email protected]>
 
         Remove firing assertion when redirecting

Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (200388 => 200389)


--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-05-03 21:46:06 UTC (rev 200388)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-05-03 22:12:53 UTC (rev 200389)
@@ -278,10 +278,15 @@
 #define FOR_EACH_WEBKIT_DEBUG_UINT32_PREFERENCE(macro) \
     macro(VisibleDebugOverlayRegions, visibleDebugOverlayRegions, UInt32, uint32_t, 0, "", "")
 
+// Remember to provide the last two parameters for all experimental features. They
+// are the text exposed to the user from the WebKit client. Also note that the key
+// should be prefixed with "experimental" so that it doesn't clash if/when the feature
+// becomes stable.
+
 #define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
     macro(ExperimentalShadowDOMEnabled, experimentalShadowDOMEnabled, Bool, bool, false, "Shadow DOM", "Support for the Shadow DOM feature") \
     macro(ExperimentalWebGL2Enabled, experimentalWebGL2Enabled, Bool, bool, false, "WebGL 2.0", "Prototype WebGL 2 Support") \
-    macro(CSSGridLayoutEnabled, cssGridLayoutEnabled, Bool, bool, true, "", "") \
+    macro(ExperimentalCSSGridLayoutEnabled, experimentalCSSGridLayoutEnabled, Bool, bool, true, "CSS Grid Layout", "CSS Grid Layout") \
     \
 
 #if PLATFORM(COCOA)

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (200388 => 200389)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2016-05-03 21:46:06 UTC (rev 200388)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2016-05-03 22:12:53 UTC (rev 200389)
@@ -1540,13 +1540,3 @@
 {
     return toImpl(preferencesRef)->downloadAttributeEnabled();
 }
-
-void WKPreferencesSetCSSGridLayoutEnabled(WKPreferencesRef preferencesRef, bool flag)
-{
-    toImpl(preferencesRef)->setCSSGridLayoutEnabled(flag);
-}
-
-bool WKPreferencesGetCSSGridLayoutEnabled(WKPreferencesRef preferencesRef)
-{
-    return toImpl(preferencesRef)->cssGridLayoutEnabled();
-}

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h (200388 => 200389)


--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h	2016-05-03 21:46:06 UTC (rev 200388)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h	2016-05-03 22:12:53 UTC (rev 200389)
@@ -431,10 +431,6 @@
 WK_EXPORT void WKPreferencesSetDownloadAttributeEnabled(WKPreferencesRef, bool flag);
 WK_EXPORT bool WKPreferencesGetDownloadAttributeEnabled(WKPreferencesRef);
 
-// Defaults to true
-WK_EXPORT void WKPreferencesSetCSSGridLayoutEnabled(WKPreferencesRef, bool flag);
-WK_EXPORT bool WKPreferencesGetCSSGridLayoutEnabled(WKPreferencesRef);
-
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (200388 => 200389)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2016-05-03 21:46:06 UTC (rev 200388)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2016-05-03 22:12:53 UTC (rev 200389)
@@ -219,7 +219,7 @@
 #endif
 
 #if ENABLE(CSS_GRID_LAYOUT)
-    if (preference == "WebKitCSSGridLayoutEnabled")
+    if (preference == "WebKitExperimentalCSSGridLayoutEnabled")
         RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled(enabled);
 #endif
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (200388 => 200389)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-05-03 21:46:06 UTC (rev 200388)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-05-03 22:12:53 UTC (rev 200389)
@@ -3119,7 +3119,7 @@
 #endif
 
 #if ENABLE(CSS_GRID_LAYOUT)
-    RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::cssGridLayoutEnabledKey()));
+    RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled(store.getBoolValueForKey(WebPreferencesKey::experimentalCSSGridLayoutEnabledKey()));
 #endif
 
     bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to