Bug 1202908 part 1 - Remove pref layout.css.will-change.enabled. r=dbaron
authorXidorn Quan <quanxunzhen@gmail.com>
Fri, 11 Sep 2015 16:00:10 +1000
changeset 294502 6bc0228c2d3d4b0520b3d8b2dbc1c128446bf3c4
parent 294501 4c42d55c2455b134fbc72ad19a1036804a6f53d0
child 294503 9bc38465a23b9806131730f208afedc669287a73
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1202908
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1202908 part 1 - Remove pref layout.css.will-change.enabled. r=dbaron
dom/html/test/file_fullscreen-ancestor-stacking-context.html
layout/base/tests/chrome/test_will_change.html
layout/reftests/bugs/reftest.list
layout/reftests/transform-3d/reftest.list
layout/style/full-screen-override.css
layout/style/nsCSSPropList.h
layout/style/test/property_database.js
modules/libpref/init/all.js
--- a/dom/html/test/file_fullscreen-ancestor-stacking-context.html
+++ b/dom/html/test/file_fullscreen-ancestor-stacking-context.html
@@ -34,23 +34,17 @@ const gPropertyTestDecls = {
 //"domPropName": "prop-name: some-non-initial-value",
   "zIndex":      "z-index: 5",
   "opacity":     "opacity: 0.8",
   "mask":        "mask: url(#mymask)",
   "clip":        "clip: rect(0 0 0 0)",
   "clipPath":    "clip-path: url(#mypath)",
   "filter":      "filter: url(#myfilter)",
   "transform":   "transform: translate(0)",
-// XXXdholbert The "will-change" line in full-screen-override.css is only
-// parsed and honored if "layout.css.will-change.enabled" is turned on
-// *at startup time* (so, flipping it here with SpecialPowers wouldn't be
-// sufficient). So, we won't get the right behavior for 'will-change' here
-// until it's enabled by default (bug 961871). This line can be uncommented
-// when that happens:
-//  "willChange": "will-change: transform"
+  "willChange":  "will-change: transform"
 };
 
 // populated in populateInitialVals
 let gPropertyInitialVals = {};
 
 function begin() {
   populateInitialVals();
 
--- a/layout/base/tests/chrome/test_will_change.html
+++ b/layout/base/tests/chrome/test_will_change.html
@@ -1,28 +1,27 @@
 <!DOCTYPE HTML>
 <html>
 <head>
   <title>Tests for MozAfterPaint</title>
   <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
   <script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/paint_listener.js"></script>
-  <!-- This CSS must not be parsed before we get a change to set layout.css.will-change.enabled=true -->
-  <script type="css_but_do_not_parse" id="csscode">
+  <style>
     #checkOpacityRepaint {
       will-change: opacity;
     }
     #checkTransformRepaint {
       will-change: transform;
     }
     div {
       width: 100px;
       height: 100px;
       background: radial-gradient(ellipse at center, #87e0fd 0%,#53cbf1 40%,#05abe0 100%);
     }
-  </script>
+  </style>
 </head>
 <body>
   <div id="checkRepaint">
     Check repaint without will-change
   </div>
   <div id="checkOpacityRepaint">
     Check repaint with will-change
   </div>
@@ -82,27 +81,19 @@ function test_checkTransformRepaint(next
       if (utils.layerManagerType != "Basic") {
         is(painted, false, "will-change checkTransformRepaint element should not have been painted");
       }
       next();
     });
   });
 }
 
-function runTest() {
-  var csscode = document.getElementById("csscode").firstChild.textContent;
-  var style = document.createElement("style");
-  style.textContent = csscode;
-  document.body.appendChild(style);
-  test_checkRepaint(function(){
-    test_checkOpacityRepaint(function(){
-      test_checkTransformRepaint(function(){
-        SimpleTest.finish();
-      });
+SimpleTest.waitForExplicitFinish();
+test_checkRepaint(function(){
+  test_checkOpacityRepaint(function(){
+    test_checkTransformRepaint(function(){
+      SimpleTest.finish();
     });
   });
-}
-
-SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({ "set": [["layout.css.will-change.enabled", true]] }, runTest);
+});
 
 </script>
 </html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1822,17 +1822,17 @@ HTTP(..) == 983985-2.html 983985-2-ref.h
 == 987680-1.html 987680-1-ref.html
 fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)||/^Windows\x20NT\x206\.2/.test(http.oscpu),1,24) == 991046-1.html 991046-1-ref.html
 pref(layout.css.overflow-clip-box.enabled,true) == 992447.html 992447-ref.html
 == 1003425-1.html 1003425-1-ref.html
 == 1003425-2.html 1003425-2-ref.html
 pref(layout.css.sticky.enabled,true) == 1005405-1.html 1005405-1-ref.html
 == 1012640-1.html 1012640-1-ref.html
 fuzzy-if(/^Windows\x20NT\x205\.1/.test(http.oscpu),255,1) == 1013054-1.html 1013054-1-ref.html
-pref(layout.css.will-change.enabled,true) == 1018522-1.html 1018522-1-ref.html
+== 1018522-1.html 1018522-1-ref.html
 == 1021564-1.html 1021564-ref.html
 == 1021564-2.html 1021564-ref.html
 == 1021564-3.html 1021564-ref.html
 == 1021564-4.html 1021564-ref.html
 pref(browser.display.use_document_fonts,0) == 1022481-1.html 1022481-1-ref.html
 == 1022612-1.html 1022612-1-ref.html
 == 1024473-1.html 1024473-1-ref.html
 == 1025914-1.html 1025914-1-ref.html
--- a/layout/reftests/transform-3d/reftest.list
+++ b/layout/reftests/transform-3d/reftest.list
@@ -47,18 +47,18 @@ fuzzy-if(winWidget&&!layersGPUAccelerate
 == sorting-2a.html sorting-2-ref.html
 # Parallel planes, same z depth (shouldn't be sorted!)
 == sorting-2b.html sorting-2-ref.html
 == sorting-3a.html green-rect.html
 # Different, but equivalent (for the given transform) transform origins
 == rotatex-transformorigin-1a.html rotatex-transformorigin-1-ref.html
 fuzzy-if((gtkWidget&&layersOMTC)||(winWidget&&!layersGPUAccelerated),1,86) == overflow-hidden-1a.html overflow-hidden-1-ref.html
 == transform-style-flat-1a.html transform-style-flat-1-ref.html
-pref(layout.css.will-change.enabled,true) == willchange-containing-block.html?willchange willchange-containing-block.html?ref
-pref(layout.css.will-change.enabled,true) != willchange-containing-block.html?willchange willchange-containing-block.html?noblock
+== willchange-containing-block.html?willchange willchange-containing-block.html?ref
+!= willchange-containing-block.html?willchange willchange-containing-block.html?noblock
 fuzzy-if(winWidget&&!layersGPUAccelerated,1,606) == scroll-perspective-1.html scroll-perspective-1-ref.html
 # Bugs
 fails-if(!layersGPUAccelerated) == 1035611-1.html 1035611-1-ref.html # Bug 1072898 for !layersGPUAccelerated failures
 != 1157984-1.html about:blank # Bug 1157984
 fuzzy(3,99) == animate-cube-radians.html animate-cube-radians-ref.html # subpixel AA
 fuzzy(3,99) fuzzy-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)&&!layersGPUAccelerated,16,6) fuzzy-if(Mulet,16,9) == animate-cube-radians-zoom.html animate-cube-radians-zoom-ref.html
 != animate-cube-radians-ref.html animate-cube-radians-zoom-ref.html
 fuzzy(3,99) == animate-cube-degrees.html animate-cube-degrees-ref.html # subpixel AA
--- a/layout/style/full-screen-override.css
+++ b/layout/style/full-screen-override.css
@@ -17,19 +17,10 @@
      stacking context. */
   mask: initial !important;
   clip-path: initial !important;
   filter: initial !important;
   clip: initial !important;
   transform: initial !important;
   transform-style: initial !important;
   /* FIXME: do we need to worry about 'overflow'? */
+  will-change: initial !important;
 }
-
-/* XXXdholbert This '@supports' wrapper should be removed once we remove
-   support for the pref 'layout.css.will-change.enabled'. (This CSS rule should
-   then be merged with the main rule up above.)  */
-@supports (will-change: initial) {
-  *|*:-moz-full-screen-ancestor {
-    will-change: initial !important;
-  }
-}
-
--- a/layout/style/nsCSSPropList.h
+++ b/layout/style/nsCSSPropList.h
@@ -4148,17 +4148,17 @@ CSS_PROP_SVGRESET(
 
 CSS_PROP_DISPLAY(
     will-change,
     will_change,
     WillChange,
     CSS_PROPERTY_PARSE_FUNCTION |
         CSS_PROPERTY_VALUE_LIST_USES_COMMAS |
         CSS_PROPERTY_ALWAYS_ENABLED_IN_CHROME_OR_CERTIFIED_APP,
-    "layout.css.will-change.enabled",
+    "",
     0,
     nullptr,
     CSS_PROP_NO_OFFSET,
     eStyleAnimType_None)
 
 // The shorthands below are essentially aliases, but they require different
 // parsing rules, and are therefore implemented as shorthands.
 CSS_PROP_SHORTHAND(
--- a/layout/style/test/property_database.js
+++ b/layout/style/test/property_database.js
@@ -3637,16 +3637,24 @@ var gCSSProperties = {
        */
       "calc((3em / 100%) * 3em)",
       "calc(3em / 100% * 3em)",
       "calc(3em * (3em / 100%))",
       "calc(3em * 3em / 100%)",
     ],
     quirks_values: { "5": "5px" },
   },
+  "will-change": {
+    domProp: "willChange",
+    inherited: false,
+    type: CSS_TYPE_LONGHAND,
+    initial_values: [ "auto" ],
+    other_values: [ "scroll-position", "contents", "transform", "opacity", "scroll-position, transform", "transform, opacity", "contents, transform", "property-that-doesnt-exist-yet" ],
+    invalid_values: [ "none", "all", "default", "auto, scroll-position", "scroll-position, auto", "transform scroll-position", ",", "trailing,", "will-change", "transform, will-change" ]
+  },
   "word-break": {
     domProp: "wordBreak",
     inherited: true,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "normal" ],
     other_values: [ "break-all", "keep-all" ],
     invalid_values: []
   },
@@ -6372,27 +6380,16 @@ if (SpecialPowers.getBoolPref("layout.cs
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "normal" ],
     other_values: [ "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn",
       "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity" ],
     invalid_values: ["none", "10px", "multiply multiply"]
   };
 }
 
-if (SpecialPowers.getBoolPref("layout.css.will-change.enabled")) {
-  gCSSProperties["will-change"] = {
-    domProp: "willChange",
-    inherited: false,
-    type: CSS_TYPE_LONGHAND,
-    initial_values: [ "auto" ],
-    other_values: [ "scroll-position", "contents", "transform", "opacity", "scroll-position, transform", "transform, opacity", "contents, transform", "property-that-doesnt-exist-yet" ],
-    invalid_values: [ "none", "all", "default", "auto, scroll-position", "scroll-position, auto", "transform scroll-position", ",", "trailing,", "will-change", "transform, will-change" ]
-  };
-}
-
 if (SpecialPowers.getBoolPref("layout.css.object-fit-and-position.enabled")) {
   gCSSProperties["object-fit"] = {
     domProp: "objectFit",
     inherited: false,
     type: CSS_TYPE_LONGHAND,
     initial_values: [ "fill" ],
     other_values: [ "contain", "cover", "none", "scale-down" ],
     invalid_values: [ "auto", "5px", "100%" ]
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2238,19 +2238,16 @@ pref("layout.css.scroll-snap.prediction-
 pref("layout.css.scroll-snap.prediction-sensitivity", "0.750");
 
 // Is support for basic shapes in clip-path enabled?
 pref("layout.css.clip-path-shapes.enabled", false);
 
 // Is support for CSS sticky positioning enabled?
 pref("layout.css.sticky.enabled", true);
 
-// Is support for CSS "will-change" enabled?
-pref("layout.css.will-change.enabled", true);
-
 // Is support for DOMPoint enabled?
 pref("layout.css.DOMPoint.enabled", true);
 
 // Is support for DOMQuad enabled?
 pref("layout.css.DOMQuad.enabled", true);
 
 // Is support for DOMMatrix enabled?
 pref("layout.css.DOMMatrix.enabled", true);