Bug 1313421 part 3: Extend single-flex-item reftest to test scenario with abspos child before flex item.
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 27 Oct 2016 18:56:49 -0700
changeset 319884 1658a195f669351b5f6caf5dbafdb0b4b12a6c2c
parent 319883 ae632144724fc5efae24a32acab2d7d938384123
child 319885 86a391e3e1638407465610b0dc5b5fc4694a0a08
push id20749
push userryanvm@gmail.com
push dateSat, 29 Oct 2016 13:21:21 +0000
treeherderfx-team@1b170b39ed6b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1313421, 1269045
milestone52.0a1
Bug 1313421 part 3: Extend single-flex-item reftest to test scenario with abspos child before flex item. (This modified testcase fails unless we have both this bug's patches and bug 1269045's patches, and it's annotated accordingly.) MozReview-Commit-ID: 76ky8OIpV3a
layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-single-item-001-ref.html
layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-single-item-001a.html
layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-single-item-001b.html
layout/reftests/w3c-css/submitted/flexbox/reftest.list
--- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-single-item-001-ref.html
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-single-item-001-ref.html
@@ -5,27 +5,40 @@
 -->
 <!-- Reference case, using inline-block instead of inline-flex. -->
 <html>
 <head>
   <title>CSS Reftest Reference</title>
   <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
   <meta charset="utf-8">
   <style>
+    body {
+      font: 14px serif;
+    }
     .flexContainer {
       display: inline-block;
       height: 16px;
       width: 16px;
-      background: purple;
+      background: pink;
       border: 0px dotted black;
       /* (Elements that want a border will set their border-width.) */
     }
+    .abs {
+      position: absolute;
+      top: 0;
+      font-size: 8px;
+    }
   </style>
 </head>
 <body>
   A
   <div class="flexContainer">a</div>
   <div class="flexContainer" style="padding-bottom: 20px">a</div>
   <div class="flexContainer" style="padding: 10px">a</div>
   <div class="flexContainer" style="border-width: 3px">a</div>
   <div class="flexContainer" style="border-bottom-width: 4px">a</div>
+  <div class="flexContainer" style="padding: 4px">
+    <!-- (An abspos child shouldn't prevent us from getting our baseline from
+         the first flex item, which happens to be the second child.) -->
+    <div class="abs">abs</div>
+    <div style="font: 26px serif">a</div>
 </body>
 </html>
--- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-single-item-001a.html
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-single-item-001a.html
@@ -14,27 +14,40 @@
 <html>
 <head>
   <title>CSS Test: Testing the baseline of a horizontal flex container with one flex item</title>
   <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
   <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-baselines">
   <link rel="match" href="flexbox-baseline-single-item-001-ref.html">
   <meta charset="utf-8">
   <style>
+    body {
+      font: 14px serif;
+    }
     .flexContainer {
       display: inline-flex;
       height: 16px;
       width: 16px;
-      background: purple;
+      background: pink;
       border: 0px dotted black;
       /* (Elements that want a border will set their border-width.) */
     }
+    .abs {
+      position: absolute;
+      top: 0;
+      font-size: 8px;
+    }
   </style>
 </head>
 <body>
   A
   <div class="flexContainer">a</div>
   <div class="flexContainer" style="padding-bottom: 20px">a</div>
   <div class="flexContainer" style="padding: 10px">a</div>
   <div class="flexContainer" style="border-width: 3px">a</div>
   <div class="flexContainer" style="border-bottom-width: 4px">a</div>
+  <div class="flexContainer" style="padding: 4px">
+    <!-- (An abspos child shouldn't prevent us from getting our baseline from
+         the first flex item, which happens to be the second child.) -->
+    <div class="abs">abs</div>
+    <div style="font: 26px serif">a</div>
 </body>
 </html>
--- a/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-single-item-001b.html
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-baseline-single-item-001b.html
@@ -14,28 +14,41 @@
 <html>
 <head>
   <title>CSS Test: Testing the baseline of a vertical flex container with one flex item</title>
   <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
   <link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#flex-baselines">
   <link rel="match" href="flexbox-baseline-single-item-001-ref.html">
   <meta charset="utf-8">
   <style>
+    body {
+      font: 14px serif;
+    }
     .flexContainer {
       display: inline-flex;
       flex-direction: column;
       height: 16px;
       width: 16px;
-      background: purple;
+      background: pink;
       border: 0px dotted black;
       /* (Elements that want a border will set their border-width.) */
     }
+    .abs {
+      position: absolute;
+      top: 0;
+      font-size: 8px;
+    }
   </style>
 </head>
 <body>
   A
   <div class="flexContainer">a</div>
   <div class="flexContainer" style="padding-bottom: 20px">a</div>
   <div class="flexContainer" style="padding: 10px">a</div>
   <div class="flexContainer" style="border-width: 3px">a</div>
   <div class="flexContainer" style="border-bottom-width: 4px">a</div>
+  <div class="flexContainer" style="padding: 4px">
+    <!-- (An abspos child shouldn't prevent us from getting our baseline from
+         the first flex item, which happens to be the second child.) -->
+    <div class="abs">abs</div>
+    <div style="font: 26px serif">a</div>
 </body>
 </html>
--- a/layout/reftests/w3c-css/submitted/flexbox/reftest.list
+++ b/layout/reftests/w3c-css/submitted/flexbox/reftest.list
@@ -45,18 +45,18 @@ fuzzy-if(Android,158,32) == flexbox-alig
 == flexbox-baseline-multi-item-horiz-001.html flexbox-baseline-multi-item-horiz-001-ref.html
 == flexbox-baseline-multi-item-vert-001.html flexbox-baseline-multi-item-vert-001-ref.html
 == flexbox-baseline-multi-line-horiz-001.html flexbox-baseline-multi-line-horiz-001-ref.html
 == flexbox-baseline-multi-line-horiz-002.html flexbox-baseline-multi-line-horiz-002-ref.html
 == flexbox-baseline-multi-line-horiz-003.html flexbox-baseline-multi-line-horiz-003-ref.html
 == flexbox-baseline-multi-line-horiz-004.html flexbox-baseline-multi-line-horiz-004-ref.html
 == flexbox-baseline-multi-line-vert-001.html flexbox-baseline-multi-line-vert-001-ref.html
 == flexbox-baseline-multi-line-vert-002.html flexbox-baseline-multi-line-vert-002-ref.html
-== flexbox-baseline-single-item-001a.html flexbox-baseline-single-item-001-ref.html
-== flexbox-baseline-single-item-001b.html flexbox-baseline-single-item-001-ref.html
+fails == flexbox-baseline-single-item-001a.html flexbox-baseline-single-item-001-ref.html # bug 1269045
+fails == flexbox-baseline-single-item-001b.html flexbox-baseline-single-item-001-ref.html # bug 1269045
 
 # Basic tests with with blocks as flex items
 == flexbox-basic-block-horiz-001.xhtml flexbox-basic-block-horiz-001-ref.xhtml
 == flexbox-basic-block-vert-001.xhtml flexbox-basic-block-vert-001-ref.xhtml
 
 # Tests for basic handling of <canvas>/<img>/etc as a flex item
 == flexbox-basic-canvas-horiz-001.xhtml   flexbox-basic-canvas-horiz-001-ref.xhtml
 == flexbox-basic-canvas-vert-001.xhtml    flexbox-basic-canvas-vert-001-ref.xhtml