Bug 1431856: Replace incorrect/obsolete reftest flexbox-paint-ordering-3.html with a version that has up-to-date expectations. r?mats draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Fri, 19 Jan 2018 15:16:29 -0800
changeset 722789 755211d30f6f6dfb050bf6b0281fab5659d59965
parent 722787 2648e1488e607d5f91e86008b6bbe9ca5d6a4e76
child 746698 886b7ca2d0c2e9b364ac66b1fd8bf0062ce3fbab
push id96249
push userdholbert@mozilla.com
push dateFri, 19 Jan 2018 23:16:40 +0000
reviewersmats
bugs1431856
milestone59.0a1
Bug 1431856: Replace incorrect/obsolete reftest flexbox-paint-ordering-3.html with a version that has up-to-date expectations. r?mats MozReview-Commit-ID: JmELzrvoljF
layout/reftests/flexbox/flexbox-paint-ordering-3-ref.html
layout/reftests/flexbox/flexbox-paint-ordering-3.html
layout/reftests/flexbox/reftest.list
layout/reftests/w3c-css/submitted/flexbox/flexbox-paint-ordering-003-ref.html
layout/reftests/w3c-css/submitted/flexbox/flexbox-paint-ordering-003.html
layout/reftests/w3c-css/submitted/flexbox/reftest.list
deleted file mode 100644
--- a/layout/reftests/flexbox/flexbox-paint-ordering-3-ref.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE html>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html>
-<head>
-  <style>
-    #container { display: flex; }
-    #highOrdinal {
-      background: lime;
-      height: 100px; width: 100px;
-    }
-  </style>
-</head>
-<body>
-  <div id="container">
-    <div id="highOrdinal"></div>
-  </div>
-</body>
-</html>
deleted file mode 100644
--- a/layout/reftests/flexbox/flexbox-paint-ordering-3.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<!--
-     Any copyright is dedicated to the Public Domain.
-     http://creativecommons.org/publicdomain/zero/1.0/
--->
-<!-- Testcase for whether we honor "order" on absolutely-positioned elements
-     within a flex container. Specifically, we test whether it affects their
-     paint-order (as it should, since it reorders the frame tree).  -->
-<html>
-<head>
-  <style>
-    #container { display: flex; }
-    #lowOrdinal {
-      position: absolute;
-      order: 5;
-      background: red;
-      height: 100px; width: 100px;
-    }
-    #highOrdinal {
-      position: absolute;
-      order: 10;
-      background: lime;
-      height: 100px; width: 100px;
-    }
-    #noOrdinal {
-      position: absolute;
-      background: orange;
-      height: 100px; width: 100px;
-    }
-  </style>
-</head>
-<body>
-  <div id="container">
-    <div id="highOrdinal"></div>
-    <div id="lowOrdinal"></div>
-    <div id="noOrdinal"></div>
-  </div>
-</body>
-</html>
--- a/layout/reftests/flexbox/reftest.list
+++ b/layout/reftests/flexbox/reftest.list
@@ -66,19 +66,16 @@ fuzzy-if(skiaContent,3,10) == flexbox-dy
 # Tests for handling of floated elements inside a flexbox
 == flexbox-float-1a.xhtml  flexbox-float-1-ref.xhtml
 == flexbox-float-1b.xhtml  flexbox-float-1-ref.xhtml
 == flexbox-float-1c.xhtml  flexbox-float-1-ref.xhtml
 == flexbox-float-1d.xhtml  flexbox-float-1-ref.xhtml
 == flexbox-float-2a.xhtml  flexbox-float-2-ref.xhtml
 == flexbox-float-2b.xhtml  flexbox-float-2-ref.xhtml
 
-# Tests for the order in which we paint flex items
-fails == flexbox-paint-ordering-3.html  flexbox-paint-ordering-3-ref.html # bug 874718
-
 # Tests for handling of absolutely/fixed/relatively-positioned flex items.
 == flexbox-position-absolute-1.xhtml  flexbox-position-absolute-1-ref.xhtml
 == flexbox-position-absolute-2.xhtml  flexbox-position-absolute-2-ref.xhtml
 == flexbox-position-absolute-3.xhtml  flexbox-position-absolute-3-ref.xhtml
 == flexbox-position-absolute-4.xhtml  flexbox-position-absolute-4-ref.xhtml
 == flexbox-position-fixed-3.xhtml     flexbox-position-fixed-3-ref.xhtml
 fuzzy-if(Android,16,400) == flexbox-position-fixed-1.xhtml     flexbox-position-fixed-1-ref.xhtml
 fuzzy-if(Android,16,400) == flexbox-position-fixed-2.xhtml     flexbox-position-fixed-2-ref.xhtml
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-paint-ordering-003-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+ <title>CSS Reftest Reference</title>
+ <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <style>
+    .limeSquare {
+      background: lime;
+      height: 100px; width: 100px;
+    }
+  </style>
+</head>
+<body>
+  <div class="limeSquare"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-paint-ordering-003.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Testing that paint order isn't influenced
+         by "order" for absolutely positioned flex children</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#abspos-items">
+  <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#painting">
+  <link rel="match" href="flexbox-paint-ordering-003-ref.html">
+  <style>
+    .container { display: flex; }
+    .absPosLowOrder {
+      position: absolute;
+      order: 5;
+      background: red;
+      height: 0;
+      width: 0;
+    }
+    .absPosHighOrder {
+      position: absolute;
+      order: 10;
+      height: 0;
+      width: 0;
+    }
+    .redBlock {
+      height: 100px;
+      width: 100px;
+      background: red;
+    }
+    .limeBlock {
+      height: 100px;
+      width: 100px;
+      background: lime;
+    }
+  </style>
+</head>
+<body>
+  <div class="container">
+    <!-- Note: The following elements will be superimposed.  If they weren't
+         positioned, then they'd be flex items, and their relative "order"
+         values would force the first one (with the red child) to paint on top.
+         But since they're absolutely positioned, they're not flex items &
+         "order" has no effect, and so the lime one should end up on top. -->
+    <div class="absPosHighOrder"><div class="redBlock"></div></div>
+    <div class="absPosLowOrder"><div class="limeBlock"></div></div>
+  </div>
+</body>
+</html>
--- a/layout/reftests/w3c-css/submitted/flexbox/reftest.list
+++ b/layout/reftests/w3c-css/submitted/flexbox/reftest.list
@@ -169,16 +169,17 @@ fails == flexbox-min-height-auto-002b.ht
 == flexbox-overflow-vert-002.html flexbox-overflow-vert-002-ref.html
 == flexbox-overflow-vert-003.html flexbox-overflow-vert-003-ref.html
 == flexbox-overflow-vert-004.html flexbox-overflow-vert-004-ref.html
 == flexbox-overflow-vert-005.html flexbox-overflow-vert-005-ref.html
 
 # Tests for the order in which we paint flex items
 == flexbox-paint-ordering-001.xhtml flexbox-paint-ordering-001-ref.xhtml
 == flexbox-paint-ordering-002.xhtml flexbox-paint-ordering-002-ref.xhtml
+== flexbox-paint-ordering-003.html  flexbox-paint-ordering-003-ref.html
 
 # Tests for "display:flex" on root node
 == flexbox-root-node-001a.html flexbox-root-node-001-ref.html
 == flexbox-root-node-001b.html flexbox-root-node-001-ref.html
 
 # Tests for sizing of flex containers, e.g. under min/max size constraints
 == flexbox-sizing-horiz-001.xhtml flexbox-sizing-horiz-001-ref.xhtml
 == flexbox-sizing-horiz-002.xhtml flexbox-sizing-horiz-002-ref.xhtml