Bug 783409: Enable "layout.css.flexbox.enabled" pref. r=dbaron
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 07 Dec 2012 10:58:34 -0800
changeset 1153469bf579519470
parent 115345 4bf567bd1a3c
child 115347 76fdff965077
pushlog:9bf579519470
Bug 783409: Enable "layout.css.flexbox.enabled" pref. r=dbaron
layout/reftests/flexbox/reftest.list
layout/style/test/test_flexbox_align_self_auto.html
layout/style/test/test_flexbox_child_display_values.html
layout/style/test/test_flexbox_flex_grow_and_shrink.html
layout/style/test/test_flexbox_flex_shorthand.html
layout/style/test/test_flexbox_layout.html
layout/style/test/test_flexbox_min_size_auto.html
layout/style/test/test_flexbox_order.html
modules/libpref/src/init/all.js
     1.1 --- a/layout/reftests/flexbox/reftest.list
     1.2 +++ b/layout/reftests/flexbox/reftest.list
     1.3 @@ -1,36 +1,25 @@
     1.4 -# Tests for flexbox pref "layout.css.flexbox.enabled"
     1.5 -# (Note that it defaults to off for now)
     1.6 -== flexbox-pref-1.xhtml flexbox-pref-1-disabled-ref.xhtml
     1.7 +# Check that flexbox pref is default-enabled:
     1.8 +== flexbox-pref-1.xhtml flexbox-pref-1-enabled-ref.xhtml
     1.9 +
    1.10 +# Check that manually setting the pref on/off w/ test-pref() works correctly:
    1.11  test-pref(layout.css.flexbox.enabled,false) == flexbox-pref-1.xhtml flexbox-pref-1-disabled-ref.xhtml
    1.12  test-pref(layout.css.flexbox.enabled,true) == flexbox-pref-1.xhtml flexbox-pref-1-enabled-ref.xhtml
    1.13  
    1.14 -# Enable pref for remaining tests
    1.15 -# (Most tests only need it in the testcase, but a few use it in the
    1.16 -# reference case, so we'll just enable it using "pref()" to make
    1.17 -# it available for both.)
    1.18 -default-preferences pref(layout.css.flexbox.enabled,true)
    1.19 -
    1.20  # Tests for cross-axis alignment (align-self / align-items properties)
    1.21  == flexbox-align-self-baseline-horiz-1.xhtml  flexbox-align-self-baseline-horiz-1-ref.xhtml
    1.22  fails == flexbox-align-self-baseline-horiz-2.xhtml  flexbox-align-self-baseline-horiz-2-ref.xhtml # bug 793456, and possibly others
    1.23  # This one fails on windows R (but not Ru, strangely). On Windows R, the
    1.24  # single-line <label> flex item has a different background size in test vs. ref
    1.25  random-if(winWidget) == flexbox-align-self-baseline-horiz-3.xhtml  flexbox-align-self-baseline-horiz-3-ref.xhtml # XXXdholbert investigate
    1.26 -# XXXdholbert This test needs the flexbox pref to be enabled _at startup time_
    1.27 -# (when we parse ua.css) in order to pass -- so it'll fail until we enable the
    1.28 -# flexbox pref by default (bug 783409):
    1.29 -fails == flexbox-align-self-baseline-horiz-4.xhtml flexbox-align-self-baseline-horiz-4-ref.xhtml
    1.30 +== flexbox-align-self-baseline-horiz-4.xhtml flexbox-align-self-baseline-horiz-4-ref.xhtml
    1.31  
    1.32  == flexbox-align-self-horiz-1-block.xhtml  flexbox-align-self-horiz-1-ref.xhtml
    1.33 -# XXXdholbert This test needs the flexbox pref to be enabled _at startup time_
    1.34 -# (when we parse ua.css) in order to pass -- so it'll fail until we enable the
    1.35 -# flexbox pref by default (bug 783409):
    1.36 -fails == flexbox-align-self-horiz-1-table.xhtml  flexbox-align-self-horiz-1-ref.xhtml
    1.37 +== flexbox-align-self-horiz-1-table.xhtml  flexbox-align-self-horiz-1-ref.xhtml
    1.38  == flexbox-align-self-horiz-2.xhtml  flexbox-align-self-horiz-2-ref.xhtml
    1.39  == flexbox-align-self-horiz-3.xhtml  flexbox-align-self-horiz-3-ref.xhtml
    1.40  == flexbox-align-self-horiz-4.xhtml  flexbox-align-self-horiz-4-ref.xhtml
    1.41  == flexbox-align-self-horiz-5.xhtml  flexbox-align-self-horiz-5-ref.xhtml
    1.42  == flexbox-align-self-vert-1.xhtml  flexbox-align-self-vert-1-ref.xhtml
    1.43  == flexbox-align-self-vert-2.xhtml  flexbox-align-self-vert-2-ref.xhtml
    1.44  == flexbox-align-self-vert-3.xhtml  flexbox-align-self-vert-3-ref.xhtml
    1.45  == flexbox-align-self-vert-4.xhtml  flexbox-align-self-vert-4-ref.xhtml
     2.1 --- a/layout/style/test/test_flexbox_align_self_auto.html
     2.2 +++ b/layout/style/test/test_flexbox_align_self_auto.html
     2.3 @@ -25,20 +25,19 @@ https://bugzilla.mozilla.org/show_bug.cg
     2.4   * flexbox about:config pref before its document is instantiated.
     2.5   *
     2.6   * See the iframe's source ("file_flexbox_align_self_auto.html") for the actual
     2.7   * test code and for more documentation.
     2.8   */
     2.9  
    2.10  SimpleTest.waitForExplicitFinish();
    2.11  
    2.12 -ok(!SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    2.13 -   "expecting flexbox pref to be disabled by default");
    2.14 +ok(SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    2.15 +   "expecting flexbox pref to be enabled by default");
    2.16  
    2.17 -SpecialPowers.setBoolPref("layout.css.flexbox.enabled", true);
    2.18  document.getElementById("iframe").src = "file_flexbox_align_self_auto.html";
    2.19  
    2.20  function finish() {
    2.21    SpecialPowers.clearUserPref("layout.css.flexbox.enabled");
    2.22    SimpleTest.finish();
    2.23  }
    2.24  </script>
    2.25  </pre>
     3.1 --- a/layout/style/test/test_flexbox_child_display_values.html
     3.2 +++ b/layout/style/test/test_flexbox_child_display_values.html
     3.3 @@ -25,20 +25,19 @@ https://bugzilla.mozilla.org/show_bug.cg
     3.4   * flexbox about:config pref before its document is instantiated.
     3.5   *
     3.6   * See the iframe's source ("file_flexbox_child_display_values.xhtml") for the
     3.7   * actual test code and for more documentation.
     3.8   */
     3.9  
    3.10  SimpleTest.waitForExplicitFinish();
    3.11  
    3.12 -ok(!SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    3.13 -   "expecting flexbox pref to be disabled by default");
    3.14 +ok(SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    3.15 +   "expecting flexbox pref to be enabled by default");
    3.16  
    3.17 -SpecialPowers.setBoolPref("layout.css.flexbox.enabled", true);
    3.18  document.getElementById("iframe").src =
    3.19    "file_flexbox_child_display_values.xhtml";
    3.20  
    3.21  function finish() {
    3.22    SpecialPowers.clearUserPref("layout.css.flexbox.enabled");
    3.23    SimpleTest.finish();
    3.24  }
    3.25  </script>
     4.1 --- a/layout/style/test/test_flexbox_flex_grow_and_shrink.html
     4.2 +++ b/layout/style/test/test_flexbox_flex_grow_and_shrink.html
     4.3 @@ -25,20 +25,19 @@ https://bugzilla.mozilla.org/show_bug.cg
     4.4   * flexbox about:config pref before its document is instantiated.
     4.5   *
     4.6   * See the iframe's source ("file_flexbox_flex_grow_and_shrink.html") for
     4.7   * the actual test code and for more documentation.
     4.8   */
     4.9  
    4.10  SimpleTest.waitForExplicitFinish();
    4.11  
    4.12 -ok(!SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    4.13 -   "expecting flexbox pref to be disabled by default");
    4.14 +ok(SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    4.15 +   "expecting flexbox pref to be enabled by default");
    4.16  
    4.17 -SpecialPowers.setBoolPref("layout.css.flexbox.enabled", true);
    4.18  document.getElementById("iframe").src =
    4.19    "file_flexbox_flex_grow_and_shrink.html";
    4.20  
    4.21  function finish() {
    4.22    SpecialPowers.clearUserPref("layout.css.flexbox.enabled");
    4.23    SimpleTest.finish();
    4.24  }
    4.25  </script>
     5.1 --- a/layout/style/test/test_flexbox_flex_shorthand.html
     5.2 +++ b/layout/style/test/test_flexbox_flex_shorthand.html
     5.3 @@ -25,20 +25,19 @@ https://bugzilla.mozilla.org/show_bug.cg
     5.4   * flexbox about:config pref before its document is instantiated.
     5.5   *
     5.6   * See the iframe's source ("file_flexbox_flex_shorthand.html") for the actual
     5.7   * test code and for more documentation.
     5.8   */
     5.9  
    5.10  SimpleTest.waitForExplicitFinish();
    5.11  
    5.12 -ok(!SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    5.13 -   "expecting flexbox pref to be disabled by default");
    5.14 +ok(SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    5.15 +   "expecting flexbox pref to be enabled by default");
    5.16  
    5.17 -SpecialPowers.setBoolPref("layout.css.flexbox.enabled", true);
    5.18  document.getElementById("iframe").src = "file_flexbox_flex_shorthand.html";
    5.19  
    5.20  function finish() {
    5.21    SpecialPowers.clearUserPref("layout.css.flexbox.enabled");
    5.22    SimpleTest.finish();
    5.23  }
    5.24  </script>
    5.25  </pre>
     6.1 --- a/layout/style/test/test_flexbox_layout.html
     6.2 +++ b/layout/style/test/test_flexbox_layout.html
     6.3 @@ -25,20 +25,19 @@ https://bugzilla.mozilla.org/show_bug.cg
     6.4   * flexbox about:config pref before its document is instantiated.
     6.5   *
     6.6   * See the iframe's source ("file_flexbox_layout.html") for the actual
     6.7   * test code and for more documentation.
     6.8   */
     6.9  
    6.10  SimpleTest.waitForExplicitFinish();
    6.11  
    6.12 -ok(!SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    6.13 -   "expecting flexbox pref to be disabled by default");
    6.14 +ok(SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    6.15 +   "expecting flexbox pref to be enabled by default");
    6.16  
    6.17 -SpecialPowers.setBoolPref("layout.css.flexbox.enabled", true);
    6.18  document.getElementById("iframe").src = "file_flexbox_layout.html";
    6.19  
    6.20  function finish() {
    6.21    SpecialPowers.clearUserPref("layout.css.flexbox.enabled");
    6.22    SimpleTest.finish();
    6.23  }
    6.24  </script>
    6.25  </pre>
     7.1 --- a/layout/style/test/test_flexbox_min_size_auto.html
     7.2 +++ b/layout/style/test/test_flexbox_min_size_auto.html
     7.3 @@ -25,20 +25,19 @@ https://bugzilla.mozilla.org/show_bug.cg
     7.4   * flexbox about:config pref before its document is instantiated.
     7.5   *
     7.6   * See the iframe's source ("file_flexbox_min_size_auto.html") for the actual
     7.7   * test code and for more documentation.
     7.8   */
     7.9  
    7.10  SimpleTest.waitForExplicitFinish();
    7.11  
    7.12 -ok(!SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    7.13 -   "expecting flexbox pref to be disabled by default");
    7.14 +ok(SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    7.15 +   "expecting flexbox pref to be enabled by default");
    7.16  
    7.17 -SpecialPowers.setBoolPref("layout.css.flexbox.enabled", true);
    7.18  document.getElementById("iframe").src = "file_flexbox_min_size_auto.html";
    7.19  
    7.20  function finish() {
    7.21    SpecialPowers.clearUserPref("layout.css.flexbox.enabled");
    7.22    SimpleTest.finish();
    7.23  }
    7.24  </script>
    7.25  </pre>
     8.1 --- a/layout/style/test/test_flexbox_order.html
     8.2 +++ b/layout/style/test/test_flexbox_order.html
     8.3 @@ -25,20 +25,19 @@ https://bugzilla.mozilla.org/show_bug.cg
     8.4   * flexbox about:config pref before its document is instantiated.
     8.5   *
     8.6   * See the iframe's source ("file_flexbox_order.html") for the actual
     8.7   * test code and for more documentation.
     8.8   */
     8.9  
    8.10  SimpleTest.waitForExplicitFinish();
    8.11  
    8.12 -ok(!SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    8.13 -   "expecting flexbox pref to be disabled by default");
    8.14 +ok(SpecialPowers.getBoolPref("layout.css.flexbox.enabled"),
    8.15 +   "expecting flexbox pref to be enabled by default");
    8.16  
    8.17 -SpecialPowers.setBoolPref("layout.css.flexbox.enabled", true);
    8.18  document.getElementById("iframe").src = "file_flexbox_order.html";
    8.19  
    8.20  function finish() {
    8.21    SpecialPowers.clearUserPref("layout.css.flexbox.enabled");
    8.22    SimpleTest.finish();
    8.23  }
    8.24  </script>
    8.25  </pre>
     9.1 --- a/modules/libpref/src/init/all.js
     9.2 +++ b/modules/libpref/src/init/all.js
     9.3 @@ -1617,17 +1617,17 @@ pref("layout.css.dpi", -1);
     9.4  // on Mac). A positive value is used as-is. This effectively controls the size
     9.5  // of a CSS "px". This is only used for windows on the screen, not for printing.
     9.6  pref("layout.css.devPixelsPerPx", "-1.0");
     9.7  
     9.8  // Is support for the the @supports rule enabled?
     9.9  pref("layout.css.supports-rule.enabled", true);
    9.10  
    9.11  // Is support for CSS Flexbox enabled?
    9.12 -pref("layout.css.flexbox.enabled", false);
    9.13 +pref("layout.css.flexbox.enabled", true);
    9.14  
    9.15  // Are sets of prefixed properties supported?
    9.16  pref("layout.css.prefixes.border-image", true);
    9.17  pref("layout.css.prefixes.transforms", true);
    9.18  pref("layout.css.prefixes.transitions", true);
    9.19  pref("layout.css.prefixes.animations", true);
    9.20  
    9.21  // pref for which side vertical scrollbars should be on