Bug 1000957: Reftests for flexbox single-line size clamping. draft
authorEmilio Cobos Álvarez <ecoal95@gmail.com>
Tue, 09 Aug 2016 10:17:55 -0700
changeset 398829 929d2f7a3dbc9a2d296023a7306c2028a45921fd
parent 398759 0e2b1dc013213675ab35042b8a931f8226a3d7bc
child 527762 107b3ca8b9671eeb2152ce02a69f5454f07d6872
push id25645
push userbmo:ealvarez@mozilla.com
push dateTue, 09 Aug 2016 20:43:39 +0000
bugs1000957
milestone51.0a1
Bug 1000957: Reftests for flexbox single-line size clamping. MozReview-Commit-ID: 9R7ooFmdrVe
layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-1-ref.html
layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-1.html
layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-2-ref.html
layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-2.html
layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-3-ref.html
layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-3.html
layout/reftests/w3c-css/submitted/flexbox/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-1-ref.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<meta charset="utf-8">
+<title>CSS Test Reference</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecoal95@gmail.com">
+<style>
+.container {
+  display: block;
+  background: gray;
+  max-height: 200px;
+}
+.panel {
+  background: lightblue;
+  width: 150px;
+  height: 200px;
+  border: 1px solid purple;
+  box-sizing: border-box;
+}
+</style>
+<div class="container">
+  <div class="panel">
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-1.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<meta charset="utf-8">
+<title>CSS Test: Single-line flex containers should clamp their line's height to the container's computed min and max cross-size.</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecoal95@gmail.com">
+<link rel="match" href="flexbox-single-line-clamp-1-ref.html">
+<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#algo-cross-line">
+<style>
+.container {
+  display: flex;
+  background: gray;
+  max-height: 200px;
+}
+.panel {
+  background: lightblue;
+  width: 150px;
+  border: 1px solid purple;
+  box-sizing: border-box;
+}
+.tall-child {
+  width: 50px;
+  height: 400px;
+}
+</style>
+<div class="container">
+  <div class="panel">
+    <div class="tall-child"></div>
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-2-ref.html
@@ -0,0 +1,26 @@
+<!doctype html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<meta charset="utf-8">
+<title>CSS Test Reference</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecoal95@gmail.com">
+<style>
+.container {
+  background: gray;
+  height: 500px;
+  width: 250px;
+}
+.panel {
+  background: lightblue;
+  border: 1px solid purple;
+  height: 100px;
+}
+</style>
+<div class="container">
+  <div class="panel">
+  </div>
+  <div class="panel">
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-2.html
@@ -0,0 +1,39 @@
+<!doctype html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<meta charset="utf-8">
+<title>CSS Test: Single-line flex containers should clamp their line's height to the container's computed min and max cross-size.</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecoal95@gmail.com">
+<link rel="match" href="flexbox-single-line-clamp-2-ref.html">
+<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#algo-cross-line">
+<style>
+.container {
+  display: flex;
+  background: gray;
+  height: 500px;
+  flex-direction: column;
+  max-width: 250px;
+}
+.panel {
+  background: lightblue;
+  border: 1px solid purple;
+}
+.small-box {
+  width: 100px;
+  height: 100px;
+}
+.big-box {
+  width: 500px;
+  height: 100px;
+}
+</style>
+<div class="container">
+  <div class="panel">
+    <div class="small-box"></div>
+  </div>
+  <div class="panel">
+    <div class="big-box"></div>
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-3-ref.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<meta charset="utf-8">
+<title>CSS Test Reference</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecoal95@gmail.com">
+<style>
+.container {
+  background: gray;
+  height: 80px;
+}
+.panel {
+  background: lightblue;
+  width: 150px;
+  height: 80px;
+}
+.contents {
+  height: 10px;
+  width: 10px;
+  background: purple;
+}
+</style>
+</head>
+<div class="container">
+  <div class="panel">
+    <div class="contents"></div>
+  </div>
+</div>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-single-line-clamp-3.html
@@ -0,0 +1,38 @@
+<!doctype html>
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<meta charset="utf-8">
+<title>CSS Test: Single-line flex containers should clamp their line's height to the container's computed min and max cross-size.</title>
+<link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
+<link rel="match" href="flexbox-single-line-clamp-3-ref.html">
+<link rel="help" href="https://www.w3.org/TR/css-flexbox-1/#algo-cross-line">
+<style>
+.container {
+  display: flex;
+  background: gray;
+  min-height: 80px;
+
+  /* Don't let (default) align-content:stretch save us
+     by stretching the line to fit the container! The point
+     here is that the line should already be clamped to the
+     container's min-height. */
+  align-content: flex-start;
+}
+.panel {
+  background: lightblue;
+  width: 150px;
+}
+.contents {
+  height: 10px;
+  width: 10px;
+  background: purple;
+}
+</style>
+</head>
+<div class="container">
+  <div class="panel">
+    <div class="contents"></div>
+  </div>
+</div>
--- a/layout/reftests/w3c-css/submitted/flexbox/reftest.list
+++ b/layout/reftests/w3c-css/submitted/flexbox/reftest.list
@@ -197,8 +197,13 @@ test-pref(layout.css.vertical-text.enabl
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-002.html flexbox-writing-mode-002-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-003.html flexbox-writing-mode-003-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-004.html flexbox-writing-mode-004-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-005.html flexbox-writing-mode-005-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-006.html flexbox-writing-mode-006-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-007.html flexbox-writing-mode-007-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-008.html flexbox-writing-mode-008-ref.html
 test-pref(layout.css.vertical-text.enabled,true) == flexbox-writing-mode-009.html flexbox-writing-mode-009-ref.html
+
+# Single-line size clamping
+== flexbox-single-line-clamp-1.html flexbox-single-line-clamp-1-ref.html
+== flexbox-single-line-clamp-2.html flexbox-single-line-clamp-2-ref.html
+== flexbox-single-line-clamp-3.html flexbox-single-line-clamp-3-ref.html