Bug 1269046 part 11: Add reftests for CSS Alignment of absolutely positioned flex children.
authorDaniel Holbert <dholbert@cs.stanford.edu>
Mon, 31 Oct 2016 08:59:40 -0700
changeset 347026 995211b23a553e1518e8c79570d27f5c4fd0bb86
parent 347025 5c85b7c93c5e86011e180451c86bae49dcc49f4e
child 347027 fa43713a681d3bd2c482a25a2895d1cd63533d77
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1269046
milestone52.0a1
Bug 1269046 part 11: Add reftests for CSS Alignment of absolutely positioned flex children. MozReview-Commit-ID: FpWhqZdyvBr
layout/generic/crashtests/crashtests.list
layout/generic/crashtests/flex-nested-abspos-1.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-002.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-003-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-003.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-004-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-004.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-005-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-005.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-006-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-006.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-007-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-007.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-008-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-008.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-rtl-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-rtl-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-rtl-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-rtl-002.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-vertWM-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-vertWM-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-vertWM-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-vertWM-002.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-002.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-003-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-003.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-004-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-004.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-005-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-005.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-006-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-006.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-007-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-007.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-008-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-008.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-002.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-003-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-003.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-004-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-004.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-002.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-003-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-003.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-004-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-004.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-fallback-align-content-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-fallback-align-content-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-fallback-justify-content-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-fallback-justify-content-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-002.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-003-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-003.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-004-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-004.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-005-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-005.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-006-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-006.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-007-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-007.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-008-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-008.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-rtl-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-rtl-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-rtl-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-rtl-002.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-vertWM-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-vertWM-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-vertWM-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-vertWM-002.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-self-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-self-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-margin-001-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-margin-001.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-margin-002-ref.html
layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-margin-002.html
layout/reftests/w3c-css/submitted/align3/reftest.list
layout/reftests/w3c-css/submitted/reftest.list
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -610,16 +610,17 @@ pref(dom.details_element.enabled,true) l
 pref(dom.details_element.enabled,true) load details-display-none-summary-1.html
 pref(dom.details_element.enabled,true) load details-display-none-summary-2.html
 pref(dom.details_element.enabled,true) load details-display-none-summary-3.html
 pref(dom.details_element.enabled,true) load details-open-overflow-auto.html
 pref(dom.details_element.enabled,true) load details-open-overflow-hidden.html
 pref(dom.details_element.enabled,true) load details-three-columns.html
 load first-letter-638937-1.html
 load first-letter-638937-2.html
+load flex-nested-abspos-1.html
 pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLine,15) asserts(0-100) load font-inflation-762332.html # bug 762332
 load outline-on-frameset.xhtml
 pref(dom.details_element.enabled,true) load summary-position-out-of-flow.html
 load text-overflow-bug666751-1.html
 load text-overflow-bug666751-2.html
 load text-overflow-bug670564.xhtml
 load text-overflow-bug671796.xhtml
 load text-overflow-bug713610.html
new file mode 100644
--- /dev/null
+++ b/layout/generic/crashtests/flex-nested-abspos-1.html
@@ -0,0 +1,7 @@
+<!DOCTYPE html>
+<div style="display:flex">
+  <div style="position: absolute">
+    <div style="position: absolute">
+    </div>
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-001-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-001.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-001-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row wrap;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-002-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-002.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row wrap-reverse flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-002-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-003-ref.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-003.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row-reverse flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-003-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row-reverse wrap;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-004-ref.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-004.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row-reverse wrap-reverse flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-004-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row-reverse wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-005-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-005.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a column flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-005-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column wrap;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-006-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-006.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a column wrap-reverse flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-006-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-007-ref.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-top: 4px; }
+    .small > .container > * { margin-top: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-007.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a column-reverse flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-007-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column-reverse wrap;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-008-ref.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-top: 4px; }
+    .small > .container > * { margin-top: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-008.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a column-reverse wrap-reverse flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-008-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column-reverse wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-rtl-001-ref.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-rtl-001.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a RTL row flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-rtl-001-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row wrap;
+      direction: rtl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-rtl-002-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { margin-left: 8px }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { /* nothing special */ }
+    .small .alignStart  { margin-left: -4px }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { /* nothing special */ }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignEnd"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignEnd"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-rtl-002.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a RTL column flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-rtl-002-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column wrap;
+      direction: rtl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-vertWM-001-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { margin-left: 8px }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { /* nothing special */ }
+    .small .alignStart  { margin-left: -4px }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { /* nothing special */ }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-vertWM-001.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a vertical-rl row flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-vertWM-001-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row wrap;
+      writing-mode: vertical-rl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-vertWM-002-ref.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignCenter"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignCenter"><!--stretch (+ align-self:center)--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-content-vertWM-002.html
@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a vertical-rl column flex container, with various "align-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-content-vertWM-002-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column wrap;
+      writing-mode: vertical-rl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+      /* This "align-self" only gets a chance to take effect when our container
+         has "align-content: stretch". In that case, it helps us verify that
+         the container's "align-content: stretch" is actually taking effect
+         and stretching the flex line (and giving us space to center in). */
+      align-self: center;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="align-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="align-content: baseline"><div></div></div>
+    <div class="container" style="align-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="align-content: center"><div></div></div>
+    <div class="container" style="align-content: start"><div></div></div>
+    <div class="container" style="align-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="align-content: flex-start"><div></div></div>
+    <div class="container" style="align-content: flex-end"><div></div></div>
+    <div class="container" style="align-content: left"><div></div></div>
+    <div class="container" style="align-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-001-ref.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-001.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-001-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-002-ref.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-002.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row wrap-reverse flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-002-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-003-ref.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-003.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row-reverse flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-003-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-004-ref.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-004.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row-reverse wrap-reverse flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-004-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row-reverse wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-005-ref.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-005.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a column flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-005-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-006-ref.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-006.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a column wrap-reverse flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-006-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-007-ref.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-top: 4px; }
+    .small > .container > * { margin-top: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-007.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a column-reverse flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-007-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-008-ref.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-top: 4px; }
+    .small > .container > * { margin-top: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-008.html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a column-reverse wrap-reverse flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-008-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column-reverse wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-001-ref.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-001.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a RTL row flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-rtl-001-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row;
+      direction: rtl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-002-ref.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-002.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos LTR children in a RTL row flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-rtl-002-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row;
+      direction: rtl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      direction: ltr;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-003-ref.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { margin-left: 8px }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { /* nothing special */ }
+    .small .alignStart  { margin-left: -4px }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { /* nothing special */ }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignEnd"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignEnd"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-003.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a RTL column flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-rtl-003-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column;
+      direction: rtl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-004-ref.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { margin-left: 8px }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { /* nothing special */ }
+    .small .alignStart  { margin-left: -4px }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { /* nothing special */ }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-start--></div></div>
+    <div class="container"><div class="alignStart"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignEnd"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-start--></div></div>
+    <div class="container"><div class="alignStart"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignEnd"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-rtl-004.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos LTR children in a RTL column flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-rtl-004-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column;
+      direction: rtl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      direction: ltr;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-001-ref.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { margin-left: 8px }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { /* nothing special */ }
+    .small .alignStart  { margin-left: -4px }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { /* nothing special */ }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-001.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a vertical-rl row flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-vertWM-001-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row;
+      writing-mode: vertical-rl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-002-ref.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { margin-left: 8px }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { /* nothing special */ }
+    .small .alignStart  { margin-left: -4px }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { /* nothing special */ }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-start--></div></div>
+    <div class="container"><div class="alignStart"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-start--></div></div>
+    <div class="container"><div class="alignStart"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-002.html
@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos horizontal-tb children in a vertical-rl row flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-vertWM-002-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row;
+      writing-mode: vertical-rl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      writing-mode: horizontal-tb;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-003-ref.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignStart"><!--self-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-003.html
@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a vertical-rl column flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-vertWM-003-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column;
+      writing-mode: vertical-rl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-004-ref.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   > .container > * { margin-left: 8px; }
+    .small > .container > * { margin-left: -4px; }
+
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-start--></div></div>
+    <div class="container"><div class="alignStart"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div class="alignStart"><!--auto--></div></div>
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <self-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <div class="container"><div class="alignEnd"><!--self-start--></div></div>
+    <div class="container"><div class="alignStart"><!--self-end--></div></div>
+    <br>
+    <!-- <self-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-align-self-vertWM-004.html
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos vertical-lr + RTL children in a vertical-rl column flex container, with various "align-self" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-align-self-vertWM-004-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column;
+      writing-mode: vertical-rl;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      writing-mode: vertical-lr;
+      direction: rtl;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various align-self values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-self -->
+    <!-- auto | normal | stretch -->
+    <div class="container"><div style="align-self: auto"></div></div>
+    <div class="container"><div style="align-self: normal"></div></div>
+    <div class="container"><div style="align-self: stretch"></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div style="align-self: baseline"></div></div>
+    <div class="container"><div style="align-self: last-baseline"></div></div>
+    <br>
+    <!-- <self-position>, part 1 -->
+    <div class="container"><div style="align-self: center"></div></div>
+    <div class="container"><div style="align-self: start"></div></div>
+    <div class="container"><div style="align-self: end"></div></div>
+    <div class="container"><div style="align-self: self-start"></div></div>
+    <div class="container"><div style="align-self: self-end"></div></div>
+    <br>
+    <!-- <self-position>, part 2 -->
+    <div class="container"><div style="align-self: flex-start"></div></div>
+    <div class="container"><div style="align-self: flex-end"></div></div>
+    <div class="container"><div style="align-self: left"></div></div>
+    <div class="container"><div style="align-self: right"></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-fallback-align-content-001-ref.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- <content-distribution> with implied fallback -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-distribution> with explicit "flex-end" fallback -->
+    <div class="container"><div class="alignEnd"><!--space-between--></div></div>
+    <div class="container"><div class="alignEnd"><!--space-around--></div></div>
+    <div class="container"><div class="alignEnd"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignEnd"><!--stretch--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- <content-distribution> with implied fallback -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-distribution> with explicit "flex-end" fallback -->
+    <div class="container"><div class="alignEnd"><!--space-between--></div></div>
+    <div class="container"><div class="alignEnd"><!--space-around--></div></div>
+    <div class="container"><div class="alignEnd"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignEnd"><!--stretch--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-fallback-align-content-001.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row flex container, with various "align-content" values with explicit fallback values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-fallback-align-content-001-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row wrap;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- <content-distribution> with implied fallback -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-distribution> with explicit "flex-end" fallback -->
+    <div class="container" style="align-content: space-between flex-end"><div></div></div>
+    <div class="container" style="align-content: space-around flex-end"><div></div></div>
+    <div class="container" style="align-content: space-evenly flex-end"><div></div></div>
+    <div class="container" style="align-content: stretch flex-end"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- <content-distribution> with implied fallback -->
+    <div class="container" style="align-content: space-between"><div></div></div>
+    <div class="container" style="align-content: space-around"><div></div></div>
+    <div class="container" style="align-content: space-evenly"><div></div></div>
+    <div class="container" style="align-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-distribution> with explicit "flex-end" fallback -->
+    <div class="container" style="align-content: space-between flex-end"><div></div></div>
+    <div class="container" style="align-content: space-around flex-end"><div></div></div>
+    <div class="container" style="align-content: space-evenly flex-end"><div></div></div>
+    <div class="container" style="align-content: stretch flex-end"><div></div></div>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-fallback-justify-content-001-ref.html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- <content-distribution> with implied fallback -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-distribution> with explicit "flex-end" fallback -->
+    <div class="container"><div class="alignEnd"><!--space-between--></div></div>
+    <div class="container"><div class="alignEnd"><!--space-around--></div></div>
+    <div class="container"><div class="alignEnd"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- <content-distribution> with implied fallback -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-distribution> with explicit "flex-end" fallback -->
+    <div class="container"><div class="alignEnd"><!--space-between--></div></div>
+    <div class="container"><div class="alignEnd"><!--space-around--></div></div>
+    <div class="container"><div class="alignEnd"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-fallback-justify-content-001.html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row flex container, with various "justify-content" values with explicit fallback values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#justify-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-fallback-justify-content-001-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- <content-distribution> with implied fallback -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-distribution> with explicit "flex-end" fallback -->
+    <div class="container" style="justify-content: space-between flex-end"><div></div></div>
+    <div class="container" style="justify-content: space-around flex-end"><div></div></div>
+    <div class="container" style="justify-content: space-evenly flex-end"><div></div></div>
+    <div class="container" style="justify-content: stretch flex-end"><div></div></div>
+    <!-- Note: specifically for flex containers, in the justify-content axis,
+         "stretch behaves as flex-start (ignoring the specified fallback
+         alignment, if any." https://drafts.csswg.org/css-align-3/#distribution-flex -->
+    <br>
+  </div>
+  <div class="small">
+    <!-- <content-distribution> with implied fallback -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-distribution> with explicit "flex-end" fallback -->
+    <div class="container" style="justify-content: space-between flex-end"><div></div></div>
+    <div class="container" style="justify-content: space-around flex-end"><div></div></div>
+    <div class="container" style="justify-content: space-evenly flex-end"><div></div></div>
+    <div class="container" style="justify-content: stretch flex-end"><div></div></div>
+    <!-- As noted above, the explicit fallback for "stretch" is ignored here. -->
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-001-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-001.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row flex container, with various "justify-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#justify-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-justify-content-001-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-002-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-002.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row wrap-reverse flex container, with various "justify-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#justify-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-justify-content-002-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-003-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignEnd"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignEnd"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignEnd"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignEnd"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-003.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row-reverse flex container, with various "justify-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#justify-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-justify-content-003-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row-reverse wrap;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-004-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-left: 4px }
+    .big   .alignEnd    { margin-left: 8px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-left: -2px }
+    .small .alignEnd    { margin-left: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignEnd"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignEnd"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignEnd"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignEnd"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignEnd"><!--flex-start--></div></div>
+    <div class="container"><div class="alignStart"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignEnd"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-004.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a row-reverse wrap-reverse flex container, with various "justify-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#justify-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-justify-content-004-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: row-reverse wrap-reverse;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-005-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-005.html
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Test: Static position of abspos children in a column flex container, with various "justify-content" values</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <link rel="help" href="https://drafts.csswg.org/css-align-3/#justify-abspos-static">
+  <link rel="match" href="flex-abspos-staticpos-justify-content-005-ref.html">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: flex;
+      flex-flow: column;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      position: absolute;
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container" style="justify-content: normal"><div></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container" style="justify-content: baseline"><div></div></div>
+    <div class="container" style="justify-content: last-baseline"><div></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container" style="justify-content: space-between"><div></div></div>
+    <div class="container" style="justify-content: space-around"><div></div></div>
+    <div class="container" style="justify-content: space-evenly"><div></div></div>
+    <div class="container" style="justify-content: stretch"><div></div></div>
+    <br>
+    <!-- <content-position>, part 1 -->
+    <div class="container" style="justify-content: center"><div></div></div>
+    <div class="container" style="justify-content: start"><div></div></div>
+    <div class="container" style="justify-content: end"><div></div></div>
+    <br>
+    <!-- <content-position>, part 2 -->
+    <div class="container" style="justify-content: flex-start"><div></div></div>
+    <div class="container" style="justify-content: flex-end"><div></div></div>
+    <div class="container" style="justify-content: left"><div></div></div>
+    <div class="container" style="justify-content: right"><div></div></div>
+    <br>
+  </div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/align3/flex-abspos-staticpos-justify-content-006-ref.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<head>
+  <title>CSS Reference</title>
+  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+  <meta charset="utf-8">
+  <style>
+    .container {
+      display: block;
+      padding: 1px 2px;
+      border: 1px solid black;
+      background: yellow;
+      margin-bottom: 5px;
+      margin-right: 5px;
+      float: left; /* For testing in "rows" of containers */
+    }
+    br { clear: both }
+
+    .big > .container {
+      height: 10px;
+      width: 16px;
+    }
+    .small > .container {
+      height: 2px;
+      width: 4px;
+    }
+
+    .container > * {
+      background: teal;
+      height: 6px;
+      width: 8px;
+    }
+    .big   .alignStart  { /* nothing special */ }
+    .big   .alignCenter { margin-top: 2px }
+    .big   .alignEnd    { margin-top: 4px }
+    .small .alignStart  { /* nothing special */ }
+    .small .alignCenter { margin-top: -2px }
+    .small .alignEnd    { margin-top: -4px }
+  </style>
+</head>
+<body>
+  <div class="big">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->
+    <!-- normal -->
+    <div class="container"><div class="alignStart"><!--normal--></div></div>
+    <br>
+    <!-- <baseline-position> -->
+    <div class="container"><div class="alignStart"><!--baseline--></div></div>
+    <div class="container"><div class="alignEnd"><!--last-baseline--></div></div>
+    <br>
+    <!-- <content-distribution> -->
+    <div class="container"><div class="alignStart"><!--space-between--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-around--></div></div>
+    <div class="container"><div class="alignCenter"><!--space-evenly--></div></div>
+    <div class="container"><div class="alignStart"><!--stretch--></div></div>
+    <br>
+    <!-- <content-position>, part 1: -->
+    <div class="container"><div class="alignCenter"><!--center--></div></div>
+    <div class="container"><div class="alignStart"><!--start--></div></div>
+    <div class="container"><div class="alignEnd"><!--end--></div></div>
+    <br>
+    <!-- <content-position>, part 2: -->
+    <div class="container"><div class="alignStart"><!--flex-start--></div></div>
+    <div class="container"><div class="alignEnd"><!--flex-end--></div></div>
+    <div class="container"><div class="alignStart"><!--left--></div></div>
+    <div class="container"><div class="alignStart"><!--right--></div></div>
+    <br>
+  </div>
+  <div class="small">
+    <!-- The various justify-content values, from
+         https://www.w3.org/TR/css-align-3/#propdef-align-content -->