Remove GridLayout runtime flag
authorjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Mar 2018 13:48:01 +0000 (13:48 +0000)
committerjfernandez@igalia.com <jfernandez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Mar 2018 13:48:01 +0000 (13:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183484

Reviewed by Myles C. Maxfield.

Source/WebCore:

The Grid Layout feature has been enabled by default for almost a
year, so I think it's time to remove the runtime flag and the
codepath run when the feature is disabled.

No new tests, because there are no changes in functionality.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertContentAlignmentData):
* css/parser/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
* css/parser/CSSParserFastPaths.cpp:
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
* css/parser/CSSParserMode.h:
(WebCore::CSSParserContextHash::hash):
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::parseSingleValue):
* dom/Document.cpp:
* dom/Document.h:
* page/RuntimeEnabledFeatures.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::alignmentOffset):
* rendering/style/RenderStyle.cpp:
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialDefaultAlignment):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit:

The Grid Layout feature has been enabled by default for almost a
year, so I think it's time to remove the runtime flag and the
codepath run when the feature is disabled.

* Shared/WebPreferences.yaml:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

Source/WebKitLegacy/mac:

The Grid Layout feature has been enabled by default for almost a
year, so I think it's time to remove the runtime flag and the

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

The Grid Layout feature has been enabled by default for almost a
year, so I think it's time to remove the runtime flag and the
codepath run when the feature is disabled.

* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):

LayoutTests:

Since the GridLayout runtime flag is removed and the feature
enabled by default, we don't need the tests verifying the
codepaths run when the feature is disabled.

* css3/flexbox/flexbox-lines-must-be-stretched-by-default.html:
* css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: Removed.
* css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: Removed.
* fast/css-grid-layout/grid-disable-expected.txt: Removed.
* fast/css-grid-layout/grid-disable.html: Removed.
* fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: Removed.
* fast/css/ensure-flexbox-compatibility-with-initial-values.html: Removed.

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

35 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/flexbox-lines-must-be-stretched-by-default-expected.txt
LayoutTests/css3/flexbox/flexbox-lines-must-be-stretched-by-default.html
LayoutTests/css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt [deleted file]
LayoutTests/css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html [deleted file]
LayoutTests/fast/css-grid-layout/grid-disable-expected.txt [deleted file]
LayoutTests/fast/css-grid-layout/grid-disable.html [deleted file]
LayoutTests/fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt [deleted file]
LayoutTests/fast/css/ensure-flexbox-compatibility-with-initial-values.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/StyleBuilderConverter.h
Source/WebCore/css/parser/CSSParser.cpp
Source/WebCore/css/parser/CSSParserFastPaths.cpp
Source/WebCore/css/parser/CSSParserMode.h
Source/WebCore/css/parser/CSSPropertyParser.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebCore/rendering/RenderFlexibleBox.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm

index fb17a58..bdc73f7 100644 (file)
@@ -1,3 +1,22 @@
+2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
+
+        Remove GridLayout runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=183484
+
+        Reviewed by Myles C. Maxfield.
+
+        Since the GridLayout runtime flag is removed and the feature
+        enabled by default, we don't need the tests verifying the
+        codepaths run when the feature is disabled.
+
+        * css3/flexbox/flexbox-lines-must-be-stretched-by-default.html:
+        * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt: Removed.
+        * css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html: Removed.
+        * fast/css-grid-layout/grid-disable-expected.txt: Removed.
+        * fast/css-grid-layout/grid-disable.html: Removed.
+        * fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt: Removed.
+        * fast/css/ensure-flexbox-compatibility-with-initial-values.html: Removed.
+
 2018-03-12  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
index 6da3d95..c3f4019 100644 (file)
@@ -1,8 +1,6 @@
 
-
 'Test for BUG=647694 - align-content "stretch" is not applied by default when grid is disabled.'
 
 
-PASS .gridDisabled 1 
-PASS .gridEnabled 1 
+PASS .flex-container 1 
 
index 67e65cd..4ce5ee0 100644 (file)
 <script src="../../resources/check-layout-th.js"></script>
 <body>
 <script>
-function runTest(gridEnabled)
+function runTest()
 {
-    if (window.internals)
-        internals.settings.setCSSGridLayoutEnabled(gridEnabled);
-
     var flexContainer = document.createElement("div");
-    if (gridEnabled)
-        flexContainer.className += "gridEnabled flex-container";
-    else
-        flexContainer.className += "gridDisabled flex-container";
+    flexContainer.className += "flex-container";
     document.body.appendChild(flexContainer);
 
     var flexItem1 = document.createElement("div");
@@ -52,14 +46,10 @@ function runTest(gridEnabled)
 
     flexContainer.style.alignContent = "initial";
 
-    if (gridEnabled)
-        checkLayout('.gridEnabled');
-    else
-        checkLayout('.gridDisabled');
+    checkLayout('.flex-container');
 }
 
-runTest(false);
-runTest(true);
+runTest();
 </script>
 <p>'Test for BUG=647694 - align-content "stretch" is not applied by default when grid is disabled.'</p>
 <div id="log"></div>
diff --git a/LayoutTests/css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt b/LayoutTests/css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled-expected.txt
deleted file mode 100644 (file)
index 2117c33..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Test to verify that the new alignment values are parsed as invalid if Grid Layout is disabled and in any case they do not cause a crash because assertions in flexbox layout code.
-
-
-PASS New Self-Alignment values should be invalid when grid layout is DISABLED. 
-PASS New Default-Alignment values should be invalid when grid layout is DISABLED. 
-PASS Even when grid layout is ENABLED, new Self-Alignment values should not violate assertions in FlexibleBox layout logic.. 
-PASS Even when grid layout is ENABLED, new Default-Alignment values should not violate assertions in FlexibleBox layout logic.. 
-
diff --git a/LayoutTests/css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html b/LayoutTests/css3/flexbox/new-alignment-values-invalid-if-grid-not-enabled.html
deleted file mode 100644 (file)
index 9656ae2..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<script src="../resources/alignment-parsing-utils-th.js"></script>
-<html>
- <body>
-     <p>Test to verify that the new alignment values are parsed as invalid if Grid Layout is disabled and in any case they do not cause a crash because assertions in flexbox layout code.</p>
-     <div id="log"></div>
-
-     <div id="flexContainer" style="display: flex">
-         <div id="flexItem"></div>
-     </div>
-<script>
-
-var container = document.getElementById("flexContainer");
-var item = document.getElementById("flexItem");
-
-function checkAlignSelfValue(value, computedValue, gridEnabled)
-{
-    item.style.webkitAlignSelf = value;
-    if (gridEnabled)
-        checkValues(item, "alignSelf", "align-self", value, computedValue);
-    else
-        checkValues(item, "alignSelf", "align-self", "flex-start", "flex-start");
-}
-
-function checkAlignItemsValue(value, computedValue, gridEnabled)
-{
-    container.style.webkitAlignItems = value;
-    if (gridEnabled) {
-        checkValues(container, "alignItems", "align-items", value, computedValue);
-        checkValues(item, "alignSelf", "align-self", "auto", "auto");
-    } else {
-        checkValues(container, "alignItems", "align-items", "flex-end", "flex-end");
-        checkValues(item, "alignSelf", "align-self", "auto", "auto");
-    }
-}
-
-function checkSelfAlignmentValues(gridEnabled)
-{
-    if (window.internals)
-        internals.settings.setCSSGridLayoutEnabled(gridEnabled)
-
-    item.style.webkitAlignSelf = "flex-start";
-
-    checkAlignSelfValue("unsafe start", "unsafe start", gridEnabled)
-    checkAlignSelfValue("start", "start", gridEnabled)
-    checkAlignSelfValue("end", "end", gridEnabled)
-    checkAlignSelfValue("safe flex-start", "safe flex-start", gridEnabled)
-    checkAlignSelfValue("self-start", "self-start", gridEnabled)
-    checkAlignSelfValue("self-end", "self-end", gridEnabled)
-}
-
-function checkDefaultAlignmentValues(gridEnabled)
-{
-    if (window.internals)
-        internals.settings.setCSSGridLayoutEnabled(gridEnabled)
-
-    container.style.webkitAlignItems = "flex-end";
-    item.style.webkitAlignSelf = "auto";
-
-    checkAlignItemsValue("unsafe start", "unsafe start", gridEnabled)
-    checkAlignItemsValue("start", "start", gridEnabled)
-    checkAlignItemsValue("end", "end", gridEnabled)
-    checkAlignItemsValue("safe flex-start", "safe flex-start", gridEnabled)
-    checkAlignItemsValue("self-start", "self-start", gridEnabled)
-    checkAlignItemsValue("self-end", "self-end", gridEnabled)
-}
-
-test(function() {
-    checkSelfAlignmentValues(false);
-}, "New Self-Alignment values should be invalid when grid layout is DISABLED.");
-
-test(function() {
-    checkDefaultAlignmentValues(false);
-}, "New Default-Alignment values should be invalid when grid layout is DISABLED.");
-
-test(function() {
-    checkSelfAlignmentValues(true);
-}, "Even when grid layout is ENABLED, new Self-Alignment values should not violate assertions in FlexibleBox layout logic..");
-
-test(function() {
-    checkDefaultAlignmentValues(true);
-}, "Even when grid layout is ENABLED, new Default-Alignment values should not violate assertions in FlexibleBox layout logic..");
-
-</script>
-
-</body>
-</html>
diff --git a/LayoutTests/fast/css-grid-layout/grid-disable-expected.txt b/LayoutTests/fast/css-grid-layout/grid-disable-expected.txt
deleted file mode 100644 (file)
index 1888739..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Verifies that CSS Grid Layout does not work if runtime feature is disabled.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS document.getElementById('grid').style.display is ''
-PASS document.getElementById('inlinegrid').style.display is ''
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/css-grid-layout/grid-disable.html b/LayoutTests/fast/css-grid-layout/grid-disable.html
deleted file mode 100644 (file)
index 1fe71eb..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<script>
-if (window.internals)
-    window.internals.settings.setCSSGridLayoutEnabled(false);
-</script>
-
-<div id="grid" style="display: grid"></div>
-<div id="inlinegrid" style="display: inline-grid"></div>
-
-<script src="../../resources/js-test-pre.js"></script>
-<script>
-description("Verifies that CSS Grid Layout does not work if runtime feature is disabled.");
-
-shouldBe("document.getElementById('grid').style.display", "''");
-shouldBe("document.getElementById('inlinegrid').style.display", "''");
-</script>
-<script src="../../resources/js-test-post.js"></script>
diff --git a/LayoutTests/fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt b/LayoutTests/fast/css/ensure-flexbox-compatibility-with-initial-values-expected.txt
deleted file mode 100644 (file)
index 1e0e745..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-Test to verify initial values of alignment properties are backward-comaptible with flexbox implementation.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-
-Verifying initial values are supported when grid is ENABLED.
-PASS CSS.supports('align-items', 'normal') is true
-PASS CSS.supports('align-self', 'auto') is true
-PASS CSS.supports('align-content', 'normal') is true
-PASS CSS.supports('justify-content', 'normal') is true
-PASS CSS.supports('align-items', 'normal') is true
-PASS CSS.supports('align-self', 'auto') is true
-PASS CSS.supports('align-content', 'normal') is true
-PASS CSS.supports('justify-content', 'normal') is true
-PASS CSS.supports('align-items', 'normal') is true
-PASS CSS.supports('align-self', 'auto') is true
-PASS CSS.supports('align-content', 'normal') is true
-PASS CSS.supports('justify-content', 'normal') is true
-PASS CSS.supports('align-items', 'normal') is true
-PASS CSS.supports('align-self', 'auto') is true
-PASS CSS.supports('align-content', 'normal') is true
-PASS CSS.supports('justify-content', 'normal') is true
-
-Verifying initial values are supported when grid is DISABLED.
-PASS CSS.supports('align-items', 'stretch') is true
-PASS CSS.supports('align-self', 'auto') is true
-PASS CSS.supports('align-content', 'stretch') is true
-PASS CSS.supports('justify-content', 'flex-start') is true
-PASS CSS.supports('align-items', 'stretch') is true
-PASS CSS.supports('align-self', 'auto') is true
-PASS CSS.supports('align-content', 'stretch') is true
-PASS CSS.supports('justify-content', 'flex-start') is true
-PASS CSS.supports('align-items', 'stretch') is true
-PASS CSS.supports('align-self', 'auto') is true
-PASS CSS.supports('align-content', 'stretch') is true
-PASS CSS.supports('justify-content', 'flex-start') is true
-PASS CSS.supports('align-items', 'stretch') is true
-PASS CSS.supports('align-self', 'auto') is true
-PASS CSS.supports('align-content', 'stretch') is true
-PASS CSS.supports('justify-content', 'flex-start') is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/css/ensure-flexbox-compatibility-with-initial-values.html b/LayoutTests/fast/css/ensure-flexbox-compatibility-with-initial-values.html
deleted file mode 100644 (file)
index 795bea9..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<!DOCTYPE html>
-<script src="../../resources/js-test.js"></script>
-<script src="resources/alignment-parsing-utils.js"></script>
-<body>
-<script>
-description('Test to verify initial values of alignment properties are backward-comaptible with flexbox implementation.');
-
-function setInitialValues(element)
-{
-    element.style.alignItems = "initial";
-    element.style.alignContent = "initial";
-    element.style.justifyContent = "initial";
-}
-
-function checkSupportedInitialValues(element)
-{
-    checkSupportedValues(element.id, "align-items");
-    checkSupportedValues(element.id, "align-self");
-    checkSupportedValues(element.id, "align-content");
-    checkSupportedValues(element.id, "justify-content");
-}
-
-function checkInitialValues(gridEnabled)
-{
-    if (window.internals)
-        window.internals.settings.setCSSGridLayoutEnabled(gridEnabled);
-
-    var root = document.createElement("div");
-    document.body.appendChild(root);
-
-    var container = document.createElement("div");
-    container.id = "container";
-    root.appendChild(container);
-    var item = document.createElement("div");
-    item.id = "item";
-    container.appendChild(item);
-
-    var flexContainer = document.createElement("div");
-    flexContainer.id = "flexContainer";
-    flexContainer.style.display = "flex";
-    root.appendChild(flexContainer);
-    var flexItem = document.createElement("div");
-    flexItem.id = "flexItem";
-    flexContainer.appendChild(flexItem);
-
-    setInitialValues(root);
-    setInitialValues(container);
-    setInitialValues(item);
-    setInitialValues(flexContainer);
-    setInitialValues(flexItem);
-
-    checkSupportedInitialValues(container);
-    checkSupportedInitialValues(item);
-    checkSupportedInitialValues(flexContainer);
-    checkSupportedInitialValues(flexItem);
-
-    document.body.removeChild(root);
-}
-
-debug('<br>Verifying initial values are supported when grid is ENABLED.');
-checkInitialValues(true);
-
-debug('<br>Verifying initial values are supported when grid is DISABLED.');
-checkInitialValues(false);
-</script>
-</body>
index 4f31084..d828d0f 100644 (file)
@@ -1,3 +1,45 @@
+2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
+
+        Remove GridLayout runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=183484
+
+        Reviewed by Myles C. Maxfield.
+
+        The Grid Layout feature has been enabled by default for almost a
+        year, so I think it's time to remove the runtime flag and the
+        codepath run when the feature is disabled.
+
+        No new tests, because there are no changes in functionality.
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
+        (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
+        * css/StyleBuilderConverter.h:
+        (WebCore::StyleBuilderConverter::convertContentAlignmentData):
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParserContext::CSSParserContext):
+        (WebCore::operator==):
+        * css/parser/CSSParserFastPaths.cpp:
+        (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
+        (WebCore::CSSParserFastPaths::isKeywordPropertyID):
+        * css/parser/CSSParserMode.h:
+        (WebCore::CSSParserContextHash::hash):
+        * css/parser/CSSPropertyParser.cpp:
+        (WebCore::CSSPropertyParser::parseSingleValue):
+        * dom/Document.cpp:
+        * dom/Document.h:
+        * page/RuntimeEnabledFeatures.h:
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::alignmentOffset):
+        * rendering/style/RenderStyle.cpp:
+        * rendering/style/RenderStyle.h:
+        (WebCore::RenderStyle::initialDefaultAlignment):
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        * testing/InternalSettings.h:
+        * testing/InternalSettings.idl:
+
 2018-03-12  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
index 209e29a..18ff918 100644 (file)
@@ -2533,7 +2533,7 @@ static Ref<CSSValueList> valueForItemPositionWithOverflowAlignment(const StyleSe
     return result;
 }
 
-static Ref<CSSValueList> valueForContentPositionAndDistributionWithOverflowAlignment(const StyleContentAlignmentData& data, CSSValueID normalBehaviorValueID)
+static Ref<CSSValueList> valueForContentPositionAndDistributionWithOverflowAlignment(const StyleContentAlignmentData& data)
 {
     auto& cssValuePool = CSSValuePool::singleton();
     auto result = CSSValueList::createSpaceSeparated();
@@ -2541,15 +2541,12 @@ static Ref<CSSValueList> valueForContentPositionAndDistributionWithOverflowAlign
     if (data.distribution() != ContentDistributionDefault)
         result->append(cssValuePool.createValue(data.distribution()));
 
-    bool gridEnabled = false;
-    gridEnabled = RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled();
-
     // Handle content-position values (either as fallback or actual value)
     switch (data.position()) {
     case ContentPositionNormal:
         // Handle 'normal' value, not valid as content-distribution fallback.
         if (data.distribution() == ContentDistributionDefault)
-            result->append(cssValuePool.createIdentifierValue(gridEnabled ? CSSValueNormal : normalBehaviorValueID));
+            result->append(cssValuePool.createIdentifierValue(CSSValueNormal));
         break;
     case ContentPositionLastBaseline:
         result->append(cssValuePool.createIdentifierValue(CSSValueLast));
@@ -2984,7 +2981,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
         case CSSPropertyEmptyCells:
             return cssValuePool.createValue(style.emptyCells());
         case CSSPropertyAlignContent:
-            return valueForContentPositionAndDistributionWithOverflowAlignment(style.alignContent(), CSSValueStretch);
+            return valueForContentPositionAndDistributionWithOverflowAlignment(style.alignContent());
         case CSSPropertyAlignItems:
             return valueForItemPositionWithOverflowAlignment(style.alignItems());
         case CSSPropertyAlignSelf:
@@ -3004,7 +3001,7 @@ RefPtr<CSSValue> ComputedStyleExtractor::valueForPropertyinStyle(const RenderSty
         case CSSPropertyFlexWrap:
             return cssValuePool.createValue(style.flexWrap());
         case CSSPropertyJustifyContent:
-            return valueForContentPositionAndDistributionWithOverflowAlignment(style.justifyContent(), CSSValueFlexStart);
+            return valueForContentPositionAndDistributionWithOverflowAlignment(style.justifyContent());
         case CSSPropertyJustifyItems:
             return valueForItemPositionWithOverflowAlignment(style.justifyItems());
         case CSSPropertyJustifySelf:
index 9d60b10..6c37c9f 100644 (file)
@@ -1373,35 +1373,15 @@ inline StyleSelfAlignmentData StyleBuilderConverter::convertSelfOrDefaultAlignme
 inline StyleContentAlignmentData StyleBuilderConverter::convertContentAlignmentData(StyleResolver&, const CSSValue& value)
 {
     StyleContentAlignmentData alignmentData = RenderStyle::initialContentAlignment();
-    if (RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled()) {
-        if (!is<CSSContentDistributionValue>(value))
-            return alignmentData;
-        auto& contentValue = downcast<CSSContentDistributionValue>(value);
-        if (contentValue.distribution()->valueID() != CSSValueInvalid)
-            alignmentData.setDistribution(contentValue.distribution().get());
-        if (contentValue.position()->valueID() != CSSValueInvalid)
-            alignmentData.setPosition(contentValue.position().get());
-        if (contentValue.overflow()->valueID() != CSSValueInvalid)
-            alignmentData.setOverflow(contentValue.overflow().get());
+    if (!is<CSSContentDistributionValue>(value))
         return alignmentData;
-    }
-    if (!is<CSSPrimitiveValue>(value))
-        return alignmentData;
-    auto& primitiveValue = downcast<CSSPrimitiveValue>(value);
-    switch (primitiveValue.valueID()) {
-    case CSSValueStretch:
-    case CSSValueSpaceBetween:
-    case CSSValueSpaceAround:
-        alignmentData.setDistribution(primitiveValue);
-        break;
-    case CSSValueFlexStart:
-    case CSSValueFlexEnd:
-    case CSSValueCenter:
-        alignmentData.setPosition(primitiveValue);
-        break;
-    default:
-        ASSERT_NOT_REACHED();
-    }
+    auto& contentValue = downcast<CSSContentDistributionValue>(value);
+    if (contentValue.distribution()->valueID() != CSSValueInvalid)
+        alignmentData.setDistribution(contentValue.distribution().get());
+    if (contentValue.position()->valueID() != CSSValueInvalid)
+        alignmentData.setPosition(contentValue.position().get());
+    if (contentValue.overflow()->valueID() != CSSValueInvalid)
+        alignmentData.setOverflow(contentValue.overflow().get());
     return alignmentData;
 }
 
index d6c2caa..6ed980e 100644 (file)
@@ -62,7 +62,6 @@ const CSSParserContext& strictCSSParserContext()
 CSSParserContext::CSSParserContext(CSSParserMode mode, const URL& baseURL)
     : baseURL(baseURL)
     , mode(mode)
-    , cssGridLayoutEnabled(RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled())
 {
 #if PLATFORM(IOS)
     // FIXME: Force the site specific quirk below to work on iOS. Investigating other site specific quirks
@@ -77,7 +76,6 @@ CSSParserContext::CSSParserContext(Document& document, const URL& sheetBaseURL,
     , charset(charset)
     , mode(document.inQuirksMode() ? HTMLQuirksMode : HTMLStandardMode)
     , isHTMLDocument(document.isHTMLDocument())
-    , cssGridLayoutEnabled(document.isCSSGridLayoutEnabled())
     , hasDocumentSecurityOrigin(sheetBaseURL.isNull() || document.securityOrigin().canRequest(baseURL))
 {
     
@@ -107,7 +105,6 @@ bool operator==(const CSSParserContext& a, const CSSParserContext& b)
         && a.charset == b.charset
         && a.mode == b.mode
         && a.isHTMLDocument == b.isHTMLDocument
-        && a.cssGridLayoutEnabled == b.cssGridLayoutEnabled
         && a.needsSiteSpecificQuirks == b.needsSiteSpecificQuirks
         && a.enforcesCSSMIMETypeInNoQuirksMode == b.enforcesCSSMIMETypeInNoQuirksMode
         && a.useLegacyBackgroundSizeShorthandBehavior == b.useLegacyBackgroundSizeShorthandBehavior
index e62cb29..4dd8378 100644 (file)
@@ -568,8 +568,7 @@ bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId
         // table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none
         // flex | inline-flex | -webkit-flex | -webkit-inline-flex | grid | inline-grid
         return (valueID >= CSSValueInline && valueID <= CSSValueContents) || valueID == CSSValueNone
-            || (RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled() && (valueID == CSSValueGrid || valueID == CSSValueInlineGrid))
-        ;
+            || valueID == CSSValueGrid || valueID == CSSValueInlineGrid;
     case CSSPropertyDominantBaseline:
         // auto | use-script | no-change | reset-size | ideographic |
         // alphabetic | hanging | mathematical | central | middle |
@@ -707,24 +706,12 @@ bool CSSParserFastPaths::isValidKeywordPropertyAndValue(CSSPropertyID propertyId
         return valueID == CSSValueHorizontal || valueID == CSSValueVertical || valueID == CSSValueAuto;
     case CSSPropertyWebkitColumnProgression:
         return valueID == CSSValueNormal || valueID == CSSValueReverse;
-    case CSSPropertyAlignContent:
-        // FIXME: Per CSS alignment, this property should accept an optional <overflow-position>. We should share this parsing code with 'justify-self'.
-        return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || valueID == CSSValueSpaceAround || valueID == CSSValueStretch;
-    case CSSPropertyAlignItems:
-        // FIXME: Per CSS alignment, this property should accept the same arguments as 'justify-self' so we should share its parsing code.
-        return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueBaseline || valueID == CSSValueStretch;
-    case CSSPropertyAlignSelf:
-        // FIXME: Per CSS alignment, this property should accept the same arguments as 'justify-self' so we should share its parsing code.
-        return valueID == CSSValueAuto || valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueBaseline || valueID == CSSValueStretch;
     case CSSPropertyFlexDirection:
         return valueID == CSSValueRow || valueID == CSSValueRowReverse || valueID == CSSValueColumn || valueID == CSSValueColumnReverse;
     case CSSPropertyFlexWrap:
         return valueID == CSSValueNowrap || valueID == CSSValueWrap || valueID == CSSValueWrapReverse;
     case CSSPropertyWebkitHyphens:
         return valueID == CSSValueAuto || valueID == CSSValueNone || valueID == CSSValueManual;
-    case CSSPropertyJustifyContent:
-        // FIXME: Per CSS alignment, this property should accept an optional <overflow-position>. We should share this parsing code with 'justify-self'.
-        return valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || valueID == CSSValueSpaceAround;
     case CSSPropertyWebkitFontKerning:
         return valueID == CSSValueAuto || valueID == CSSValueNormal || valueID == CSSValueNone;
     case CSSPropertyWebkitFontSmoothing:
@@ -976,11 +963,6 @@ bool CSSParserFastPaths::isKeywordPropertyID(CSSPropertyID propertyId)
     case CSSPropertyFontOpticalSizing:
 #endif
         return true;
-    case CSSPropertyJustifyContent:
-    case CSSPropertyAlignContent:
-    case CSSPropertyAlignItems:
-    case CSSPropertyAlignSelf:
-        return !RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled();
     default:
         return false;
     }
index e8c3bae..1c8836b 100644 (file)
@@ -96,7 +96,6 @@ public:
     String charset;
     CSSParserMode mode { HTMLStandardMode };
     bool isHTMLDocument { false };
-    bool cssGridLayoutEnabled { false };
 #if ENABLE(TEXT_AUTOSIZING)
     bool textAutosizingEnabled { false };
 #endif
@@ -137,19 +136,18 @@ struct CSSParserContextHash {
             hash ^= StringHash::hash(key.charset);
         unsigned bits = key.isHTMLDocument                  << 0
             & key.isHTMLDocument                            << 1
-            & key.cssGridLayoutEnabled                      << 2
 #if ENABLE(TEXT_AUTOSIZING)
-            & key.textAutosizingEnabled                     << 3
+            & key.textAutosizingEnabled                     << 2
 #endif
-            & key.needsSiteSpecificQuirks                   << 4
-            & key.enforcesCSSMIMETypeInNoQuirksMode         << 5
-            & key.useLegacyBackgroundSizeShorthandBehavior  << 6
-            & key.springTimingFunctionEnabled               << 7
-            & key.conicGradientsEnabled                     << 8
-            & key.deferredCSSParserEnabled                  << 9
-            & key.hasDocumentSecurityOrigin                 << 10
-            & key.mode                                      << 11
-            & key.allowNewLinesClamp                        << 12;
+            & key.needsSiteSpecificQuirks                   << 3
+            & key.enforcesCSSMIMETypeInNoQuirksMode         << 4
+            & key.useLegacyBackgroundSizeShorthandBehavior  << 5
+            & key.springTimingFunctionEnabled               << 6
+            & key.conicGradientsEnabled                     << 7
+            & key.deferredCSSParserEnabled                  << 8
+            & key.hasDocumentSecurityOrigin                 << 9
+            & key.mode                                      << 10
+            & key.allowNewLinesClamp                        << 11;
         hash ^= WTF::intHash(bits);
         return hash;
     }
index 0910f0d..be5cd7a 100644 (file)
@@ -4288,43 +4288,27 @@ RefPtr<CSSValue> CSSPropertyParser::parseSingleValue(CSSPropertyID property, CSS
     case CSSPropertyWebkitMaskRepeatY:
         return nullptr;
     case CSSPropertyAlignItems:
-        if (!m_context.cssGridLayoutEnabled)
-            return nullptr;
         return consumeAlignItems(m_range);
     case CSSPropertyJustifySelf:
         return consumeSelfPositionOverflowPosition(m_range, isSelfPositionOrLeftOrRightKeyword);
     case CSSPropertyAlignSelf:
-        if (!m_context.cssGridLayoutEnabled)
-            return nullptr;
         return consumeSelfPositionOverflowPosition(m_range, isSelfPositionKeyword);
     case CSSPropertyJustifyItems:
-        if (!m_context.cssGridLayoutEnabled)
-            return nullptr;
         return consumeJustifyItems(m_range);
     case CSSPropertyGridColumnEnd:
     case CSSPropertyGridColumnStart:
     case CSSPropertyGridRowEnd:
     case CSSPropertyGridRowStart:
-        if (!m_context.cssGridLayoutEnabled)
-            return nullptr;
         return consumeGridLine(m_range);
     case CSSPropertyGridAutoColumns:
     case CSSPropertyGridAutoRows:
-        if (!m_context.cssGridLayoutEnabled)
-            return nullptr;
         return consumeGridTrackList(m_range, m_context.mode, GridAuto);
     case CSSPropertyGridTemplateColumns:
     case CSSPropertyGridTemplateRows:
-        if (!m_context.cssGridLayoutEnabled)
-            return nullptr;
         return consumeGridTemplatesRowsOrColumns(m_range, m_context.mode);
     case CSSPropertyGridTemplateAreas:
-        if (!m_context.cssGridLayoutEnabled)
-            return nullptr;
         return consumeGridTemplateAreas(m_range);
     case CSSPropertyGridAutoFlow:
-        if (!m_context.cssGridLayoutEnabled)
-            return nullptr;
         return consumeGridAutoFlow(m_range);
     case CSSPropertyWebkitLineGrid:
         return consumeLineGrid(m_range);
index cec1a49..9e0a288 100644 (file)
@@ -1176,11 +1176,6 @@ CustomElementNameValidationStatus Document::validateCustomElementName(const Atom
     return CustomElementNameValidationStatus::Valid;
 }
 
-bool Document::isCSSGridLayoutEnabled() const
-{
-    return RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled();
-}
-
 ExceptionOr<Ref<Element>> Document::createElementNS(const AtomicString& namespaceURI, const String& qualifiedName)
 {
     auto parseResult = parseQualifiedName(namespaceURI, qualifiedName);
index 42234ce..dbefd1d 100644 (file)
@@ -424,8 +424,6 @@ public:
 
     static CustomElementNameValidationStatus validateCustomElementName(const AtomicString&);
 
-    bool isCSSGridLayoutEnabled() const;
-
     WEBCORE_EXPORT RefPtr<Range> caretRangeFromPoint(int x, int y);
     RefPtr<Range> caretRangeFromPoint(const LayoutPoint& clientPoint);
 
index 0c5be64..e7f6f76 100644 (file)
@@ -202,9 +202,6 @@ public:
     bool downloadAttributeEnabled() const { return m_isDownloadAttributeEnabled; }
 #endif
 
-    void setCSSGridLayoutEnabled(bool isEnabled) { m_cssGridLayoutEnabled = isEnabled; }
-    bool isCSSGridLayoutEnabled() const { return m_cssGridLayoutEnabled; }
-
 #if ENABLE(INTERSECTION_OBSERVER)
     void setIntersectionObserverEnabled(bool isEnabled) { m_intersectionObserverEnabled = isEnabled; }
     bool intersectionObserverEnabled() const { return m_intersectionObserverEnabled; }
@@ -353,8 +350,6 @@ private:
     bool m_isDownloadAttributeEnabled { false };
 #endif
 
-    bool m_cssGridLayoutEnabled { true };
-
 #if ENABLE(ENCRYPTED_MEDIA)
     bool m_encryptedMediaAPIEnabled { false };
 #endif
index ea9d236..efb9a27 100644 (file)
@@ -1369,10 +1369,8 @@ static LayoutUnit alignmentOffset(LayoutUnit availableFreeSpace, ItemPosition po
     case ItemPositionEnd:
     case ItemPositionLeft:
     case ItemPositionRight:
-        // FIXME: Implement these. The extended grammar
-        // is not enabled by default so we shouldn't hit this codepath.
-        // The new grammar is only used when Grid Layout feature is enabled.
-        ASSERT(RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled());
+        // FIXME: Implement the extended grammar, enabled when the Grid Layout
+        // feature was enabled by default.
         break;
     }
     return 0;
index 7fba88c..ca1a841 100644 (file)
@@ -235,11 +235,6 @@ RenderStyle RenderStyle::replace(RenderStyle&& newStyle)
     return RenderStyle { *this, WTFMove(newStyle) };
 }
 
-bool RenderStyle::isCSSGridLayoutEnabled()
-{
-    return RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled();
-}
-
 static StyleSelfAlignmentData resolvedSelfAlignment(const StyleSelfAlignmentData& value, ItemPosition normalValueBehavior)
 {
     if (value.position() == ItemPositionLegacy || value.position() == ItemPositionNormal || value.position() == ItemPositionAuto)
index f9d8c60..fb4354f 100644 (file)
@@ -1495,7 +1495,7 @@ public:
     static int initialOrder() { return 0; }
     static StyleSelfAlignmentData initialJustifyItems() { return StyleSelfAlignmentData(ItemPositionLegacy, OverflowAlignmentDefault); }
     static StyleSelfAlignmentData initialSelfAlignment() { return StyleSelfAlignmentData(ItemPositionAuto, OverflowAlignmentDefault); }
-    static StyleSelfAlignmentData initialDefaultAlignment() { return StyleSelfAlignmentData(isCSSGridLayoutEnabled() ? ItemPositionNormal : ItemPositionStretch, OverflowAlignmentDefault); }
+    static StyleSelfAlignmentData initialDefaultAlignment() { return StyleSelfAlignmentData(ItemPositionNormal, OverflowAlignmentDefault); }
     static StyleContentAlignmentData initialContentAlignment() { return StyleContentAlignmentData(ContentPositionNormal, ContentDistributionDefault, OverflowAlignmentDefault); }
     static EFlexDirection initialFlexDirection() { return FlowRow; }
     static EFlexWrap initialFlexWrap() { return FlexNoWrap; }
@@ -1579,8 +1579,6 @@ public:
     static TextSizeAdjustment initialTextSizeAdjust() { return TextSizeAdjustment(); }
 #endif
 
-    static bool isCSSGridLayoutEnabled();
-
     static WillChangeData* initialWillChange() { return nullptr; }
 
 #if ENABLE(TOUCH_EVENTS)
index d92e90d..f555ab5 100644 (file)
@@ -104,7 +104,6 @@ InternalSettings::Backup::Backup(Settings& settings)
 #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
     , m_indexedDBWorkersEnabled(RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
 #endif
-    , m_cssGridLayoutEnabled(RuntimeEnabledFeatures::sharedFeatures().isCSSGridLayoutEnabled())
 #if ENABLE(WEBGL2)
     , m_webGL2Enabled(RuntimeEnabledFeatures::sharedFeatures().webGL2Enabled())
 #endif
@@ -205,7 +204,6 @@ void InternalSettings::Backup::restoreTo(Settings& settings)
 #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
     RuntimeEnabledFeatures::sharedFeatures().setIndexedDBWorkersEnabled(m_indexedDBWorkersEnabled);
 #endif
-    RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled(m_cssGridLayoutEnabled);
 #if ENABLE(WEBGL2)
     RuntimeEnabledFeatures::sharedFeatures().setWebGL2Enabled(m_webGL2Enabled);
 #endif
@@ -740,11 +738,6 @@ void InternalSettings::setIndexedDBWorkersEnabled(bool enabled)
 #endif
 }
 
-void InternalSettings::setCSSGridLayoutEnabled(bool enabled)
-{
-    RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled(enabled);
-}
-
 void InternalSettings::setWebGL2Enabled(bool enabled)
 {
 #if ENABLE(WEBGL2)
index 7d77ff5..fba3686 100644 (file)
@@ -119,7 +119,6 @@ public:
 
     // RuntimeEnabledFeatures.
     static void setIndexedDBWorkersEnabled(bool);
-    static void setCSSGridLayoutEnabled(bool);
     static void setWebGL2Enabled(bool);
     static void setWebGPUEnabled(bool);
     static void setWebVREnabled(bool);
@@ -200,7 +199,6 @@ private:
 
         // Runtime enabled settings.
         bool m_indexedDBWorkersEnabled;
-        bool m_cssGridLayoutEnabled;
         bool m_webGL2Enabled;
         bool m_webGPUEnabled;
         bool m_webVREnabled;
index d07e66e..fd6b3a4 100644 (file)
@@ -88,7 +88,6 @@ enum FontLoadTimingOverride { "Block", "Swap", "Failure" };
 
     // RuntimeEnabledFeatures.
     void setIndexedDBWorkersEnabled(boolean enabled);
-    void setCSSGridLayoutEnabled(boolean enabled);
     void setWebGL2Enabled(boolean enabled);
     void setWebGPUEnabled(boolean enabled);
     void setWebVREnabled(boolean enabled);
index 29cb10b..b5c6690 100644 (file)
@@ -1,3 +1,18 @@
+2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
+
+        Remove GridLayout runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=183484
+
+        Reviewed by Myles C. Maxfield.
+
+        The Grid Layout feature has been enabled by default for almost a
+        year, so I think it's time to remove the runtime flag and the
+        codepath run when the feature is disabled.
+
+        * Shared/WebPreferences.yaml:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+
 2018-03-11  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Fix the internal iOS build after r229512
index a240a88..6c01b89 100644 (file)
@@ -686,14 +686,6 @@ ShouldSuppressTextInputFromEditingDuringProvisionalNavigation:
   type: bool
   defaultValue: false
 
-CSSGridLayoutEnabled:
-  type: bool
-  defaultValue: true
-  humanReadableName: "CSS Grid"
-  humanReadableDescription: "CSS Grid Layout Module support"
-  binding: RuntimeEnabledFeatures
-  webcoreBinding: RuntimeEnabledFeatures
-
 GamepadsEnabled:
   type: bool
   defaultValue: true
index 7317c3c..c232ffa 100644 (file)
@@ -204,9 +204,6 @@ void InjectedBundle::overrideBoolPreferenceForTestRunner(WebPageGroupProxy* page
         RuntimeEnabledFeatures::sharedFeatures().setWritableStreamAPIEnabled(enabled);
 #endif
 
-    if (preference == "WebKitCSSGridLayoutEnabled")
-        RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled(enabled);
-
     if (preference == "WebKitInteractiveFormValidationEnabled")
         RuntimeEnabledFeatures::sharedFeatures().setInteractiveFormValidationEnabled(enabled);
 
index 04f784f..b54da83 100644 (file)
@@ -1,3 +1,20 @@
+2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
+
+        Remove GridLayout runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=183484
+
+        Reviewed by Myles C. Maxfield.
+
+        The Grid Layout feature has been enabled by default for almost a
+        year, so I think it's time to remove the runtime flag and the
+
+        * WebView/WebPreferenceKeysPrivate.h:
+        * WebView/WebPreferences.mm:
+        (+[WebPreferences initialize]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChanged:]):
+
 2018-03-12  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
index c7fc01a..110692c 100644 (file)
 #define WebKitReadableByteStreamAPIEnabledPreferenceKey @"WebKitReadableByteStreamAPIEnabled"
 #define WebKitDownloadAttributeEnabledPreferenceKey @"WebKitDownloadAttributeEnabled"
 #define WebKitDirectoryUploadEnabledPreferenceKey @"WebKitDirectoryUploadEnabled"
-#define WebKitCSSGridLayoutEnabledPreferenceKey @"WebKitCSSGridLayoutEnabled"
 #define WebKitVisualViewportEnabledPreferenceKey @"WebKitVisualViewportEnabled"
 #define WebKitVisualViewportAPIEnabledPreferenceKey @"WebKitVisualViewportAPIEnabled"
 #define WebKitModernMediaControlsEnabledPreferenceKey @"WebKitModernMediaControlsEnabled"
index 85dc3e8..c30b6f0 100644 (file)
@@ -641,7 +641,6 @@ public:
         [NSNumber numberWithBool:NO], WebKitDownloadAttributeEnabledPreferenceKey,
 #endif
         [NSNumber numberWithBool:NO], WebKitDirectoryUploadEnabledPreferenceKey,
-        [NSNumber numberWithBool:YES], WebKitCSSGridLayoutEnabledPreferenceKey,
         [NSNumber numberWithBool:NO], WebKitWebAnimationsEnabledPreferenceKey,
 
 #if PLATFORM(IOS)
@@ -3058,16 +3057,6 @@ static NSString *classIBCreatorID = nil;
     return [self _boolValueForKey:WebKitDirectoryUploadEnabledPreferenceKey];
 }
 
-- (BOOL)isCSSGridLayoutEnabled
-{
-    return [self _boolValueForKey:WebKitCSSGridLayoutEnabledPreferenceKey];
-}
-
-- (void)setCSSGridLayoutEnabled:(BOOL)flag
-{
-    [self _setBoolValue:flag forKey:WebKitCSSGridLayoutEnabledPreferenceKey];
-}
-
 - (BOOL)visualViewportEnabled
 {
     return [self _boolValueForKey:WebKitVisualViewportEnabledPreferenceKey];
index 6779d04..78d84f9 100644 (file)
@@ -558,9 +558,6 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification;
 - (void)setDirectoryUploadEnabled:(BOOL)flag;
 - (BOOL)directoryUploadEnabled;
 
-- (void)setCSSGridLayoutEnabled:(BOOL)flag;
-- (BOOL)isCSSGridLayoutEnabled;
-
 - (void)setWebAnimationsEnabled:(BOOL)flag;
 - (BOOL)webAnimationsEnabled;
 
index 2c7d4c7..c21b77d 100644 (file)
@@ -3027,8 +3027,6 @@ static bool needsSelfRetainWhileLoadingQuirk()
     RuntimeEnabledFeatures::sharedFeatures().setDownloadAttributeEnabled([preferences downloadAttributeEnabled]);
 #endif
 
-    RuntimeEnabledFeatures::sharedFeatures().setCSSGridLayoutEnabled([preferences isCSSGridLayoutEnabled]);
-
     RuntimeEnabledFeatures::sharedFeatures().setWebAnimationsEnabled([preferences webAnimationsEnabled]);
 
 #if ENABLE(INTERSECTION_OBSERVER)
index 96d8a6e..aea86bd 100644 (file)
@@ -1,3 +1,17 @@
+2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
+
+        Remove GridLayout runtime flag
+        https://bugs.webkit.org/show_bug.cgi?id=183484
+
+        Reviewed by Myles C. Maxfield.
+
+        The Grid Layout feature has been enabled by default for almost a
+        year, so I think it's time to remove the runtime flag and the
+        codepath run when the feature is disabled.
+
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (enableExperimentalFeatures):
+
 2018-03-12  Antoine Quint  <graouts@apple.com>
 
         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
index 33726cc..8932a64 100644 (file)
@@ -840,7 +840,6 @@ static NSString *libraryPathForDumpRenderTree()
 
 static void enableExperimentalFeatures(WebPreferences* preferences)
 {
-    [preferences setCSSGridLayoutEnabled:YES];
     // FIXME: SpringTimingFunction
     [preferences setGamepadsEnabled:YES];
     [preferences setLinkPreloadEnabled:YES];