Bug 1227766 patch 4 - Tests for will-change establishing a fixed-pos and abs-pos containing block. r=dholbert
authorL. David Baron <dbaron@dbaron.org>
Mon, 30 Nov 2015 15:46:45 -0800
changeset 308936 e7ed1feeef7400a8a6d9fd1dd406d552294aa164
parent 308935 daf35b346b5d103dce479ac8368a642d867cacd7
child 308937 ff8ba03eae9c0ae72d426034edc1c0cbf3b72815
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1227766
milestone45.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 1227766 patch 4 - Tests for will-change establishing a fixed-pos and abs-pos containing block. r=dholbert Without the previous patches, the tests: will-change-fixpos-cb-contain-1.html will-change-fixpos-cb-filter-1.html will-change-fixpos-cb-perspective-1.html will-change-fixpos-cb-transform-style-1.html fail, but they pass with the patches. The new tests: will-change-fixpos-cb-height-1.html will-change-fixpos-cb-transform-1.html pass both ways: the first because it tests that nothing happens, and the second because we were separately testing the will-change bit for transform via HasTransform.
layout/reftests/w3c-css/submitted/will-change/green-square-100-by-100-offset-ref.html
layout/reftests/w3c-css/submitted/will-change/reftest.list
layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-contain-1.html
layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-filter-1.html
layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-height-1.html
layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-perspective-1.html
layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-transform-1.html
layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-transform-style-1.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/will-change/green-square-100-by-100-offset-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS will-change reference</title>
+<link rel="author" title="L. David Baron" href="http://dbaron.org/">
+<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+<style>
+html, body { margin: 0; padding: 0; }
+div { width: 100px; height: 100px; margin: 100px 0 0 100px; background: green }
+</style>
+<body>
+  <div></div>
+</body>
--- a/layout/reftests/w3c-css/submitted/will-change/reftest.list
+++ b/layout/reftests/w3c-css/submitted/will-change/reftest.list
@@ -5,8 +5,14 @@
 == will-change-stacking-context-mask-1.html green-square-100-by-100-ref.html
 == will-change-stacking-context-mix-blend-mode-1.html green-square-100-by-100-ref.html
 == will-change-stacking-context-opacity-1.html green-square-100-by-100-ref.html
 == will-change-stacking-context-perspective-1.html green-square-100-by-100-ref.html
 == will-change-stacking-context-position-1.html green-square-100-by-100-ref.html
 == will-change-stacking-context-transform-1.html green-square-100-by-100-ref.html
 == will-change-stacking-context-transform-style-1.html green-square-100-by-100-ref.html
 == will-change-stacking-context-z-index-1.html green-square-100-by-100-ref.html
+test-pref(layout.css.contain.enabled,true) == will-change-fixpos-cb-contain-1.html green-square-100-by-100-offset-ref.html
+== will-change-fixpos-cb-filter-1.html green-square-100-by-100-offset-ref.html
+== will-change-fixpos-cb-height-1.html green-square-100-by-100-offset-ref.html
+== will-change-fixpos-cb-perspective-1.html green-square-100-by-100-offset-ref.html
+== will-change-fixpos-cb-transform-1.html green-square-100-by-100-offset-ref.html
+== will-change-fixpos-cb-transform-style-1.html green-square-100-by-100-offset-ref.html
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-contain-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS will-change: 'will-change: contain' creates a containing block for fixed positioned elements</title>
+<link rel="author" title="L. David Baron" href="http://dbaron.org/">
+<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+<link rel="help" href="https://drafts.csswg.org/css-will-change-1/#will-change">
+<link rel="help" href="https://drafts.csswg.org/css-containment/#containment-paint">
+<link rel="match" href="green-square-100-by-100-offset-ref.html">
+<meta name="assert" content="If any non-initial value of a property would cause the element to generate a containing block for fixed-position elements, specifying that property in will-change must cause the element to generate a containing block for fixed-position elements.">
+<style>
+html, body { margin: 0; padding: 0; }
+div { width: 100px; height: 100px }
+#wc { will-change: contain; margin: 100px 0 0 100px; background: red }
+.child { top: 0; left: 0; width: 50px; background: green }
+#fixpos { position: fixed }
+#abspos { position: absolute; left: 50px }
+</style>
+<body>
+  <div id="wc">
+    <div class="child" id="fixpos">
+    </div>
+    <div class="child" id="abspos">
+    </div>
+  </div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-filter-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS will-change: 'will-change: filter' creates a containing block for fixed positioned elements</title>
+<link rel="author" title="L. David Baron" href="http://dbaron.org/">
+<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+<link rel="help" href="https://drafts.csswg.org/css-will-change-1/#will-change">
+<link rel="help" href="http://www.w3.org/TR/filter-effects/#FilterProperty">
+<link rel="match" href="green-square-100-by-100-offset-ref.html">
+<meta name="assert" content="If any non-initial value of a property would cause the element to generate a containing block for fixed-position elements, specifying that property in will-change must cause the element to generate a containing block for fixed-position elements.">
+<style>
+html, body { margin: 0; padding: 0; }
+div { width: 100px; height: 100px }
+#wc { will-change: filter; margin: 100px 0 0 100px; background: red }
+.child { top: 0; left: 0; width: 50px; background: green }
+#fixpos { position: fixed }
+#abspos { position: absolute; left: 50px }
+</style>
+<body>
+  <div id="wc">
+    <div class="child" id="fixpos">
+    </div>
+    <div class="child" id="abspos">
+    </div>
+  </div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-height-1.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS will-change: 'will-change: height' does not create a containing block for fixed positioned elements</title>
+<link rel="author" title="L. David Baron" href="http://dbaron.org/">
+<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+<link rel="help" href="https://drafts.csswg.org/css-will-change-1/#will-change">
+<link rel="match" href="green-square-100-by-100-offset-ref.html">
+<meta name="assert" content="If any non-initial value of a property would cause the element to generate a containing block for fixed-position elements, specifying that property in will-change must cause the element to generate a containing block for fixed-position elements.">
+<style>
+html, body { margin: 0; padding: 0; }
+div { width: 100px; height: 100px }
+#wc { will-change: height; margin: 100px 0 0 100px; background: red }
+.child { top: 100px; left: 100px; width: 50px; background: green }
+#fixpos { position: fixed }
+#abspos { position: absolute; left: 150px }
+</style>
+<body>
+  <div id="wc">
+    <div class="child" id="fixpos">
+    </div>
+    <div class="child" id="abspos">
+    </div>
+  </div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-perspective-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS will-change: 'will-change: perspective' creates a containing block for fixed positioned elements</title>
+<link rel="author" title="L. David Baron" href="http://dbaron.org/">
+<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+<link rel="help" href="https://drafts.csswg.org/css-will-change-1/#will-change">
+<link rel="help" href="http://www.w3.org/TR/css3-transforms/#perspective-property">
+<link rel="match" href="green-square-100-by-100-offset-ref.html">
+<meta name="assert" content="If any non-initial value of a property would cause the element to generate a containing block for fixed-position elements, specifying that property in will-change must cause the element to generate a containing block for fixed-position elements.">
+<style>
+html, body { margin: 0; padding: 0; }
+div { width: 100px; height: 100px }
+#wc { will-change: perspective; margin: 100px 0 0 100px; background: red }
+.child { top: 0; left: 0; width: 50px; background: green }
+#fixpos { position: fixed }
+#abspos { position: absolute; left: 50px }
+</style>
+<body>
+  <div id="wc">
+    <div class="child" id="fixpos">
+    </div>
+    <div class="child" id="abspos">
+    </div>
+  </div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-transform-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS will-change: 'will-change: transform' creates a containing block for fixed positioned elements</title>
+<link rel="author" title="L. David Baron" href="http://dbaron.org/">
+<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+<link rel="help" href="https://drafts.csswg.org/css-will-change-1/#will-change">
+<link rel="help" href="http://www.w3.org/TR/css3-transforms/#transform-property">
+<link rel="match" href="green-square-100-by-100-offset-ref.html">
+<meta name="assert" content="If any non-initial value of a property would cause the element to generate a containing block for fixed-position elements, specifying that property in will-change must cause the element to generate a containing block for fixed-position elements.">
+<style>
+html, body { margin: 0; padding: 0; }
+div { width: 100px; height: 100px }
+#wc { will-change: transform; margin: 100px 0 0 100px; background: red }
+.child { top: 0; left: 0; width: 50px; background: green }
+#fixpos { position: fixed }
+#abspos { position: absolute; left: 50px }
+</style>
+<body>
+  <div id="wc">
+    <div class="child" id="fixpos">
+    </div>
+    <div class="child" id="abspos">
+    </div>
+  </div>
+</body>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/will-change/will-change-fixpos-cb-transform-style-1.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS will-change: 'will-change: transform-style' creates a containing block for fixed positioned elements</title>
+<link rel="author" title="L. David Baron" href="http://dbaron.org/">
+<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
+<link rel="help" href="https://drafts.csswg.org/css-will-change-1/#will-change">
+<link rel="help" href="http://www.w3.org/TR/css3-transforms/#transform-style-property">
+<link rel="match" href="green-square-100-by-100-offset-ref.html">
+<meta name="assert" content="If any non-initial value of a property would cause the element to generate a containing block for fixed-position elements, specifying that property in will-change must cause the element to generate a containing block for fixed-position elements.">
+<style>
+html, body { margin: 0; padding: 0; }
+div { width: 100px; height: 100px }
+#wc { will-change: transform-style; margin: 100px 0 0 100px; background: red }
+.child { top: 0; left: 0; width: 50px; background: green }
+#fixpos { position: fixed }
+#abspos { position: absolute; left: 50px }
+</style>
+<body>
+  <div id="wc">
+    <div class="child" id="fixpos">
+    </div>
+    <div class="child" id="abspos">
+    </div>
+  </div>
+</body>