зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1622935 Part 4a - Add base single-line column/row flex container fragmentation reftests. r=dholbert
The reftests added in this commit are "base" versions in the sense that they'll be copied with edits in a later commit. Differential Revision: https://phabricator.services.mozilla.com/D73168
This commit is contained in:
Родитель
a5796ce405
Коммит
113a61e82e
|
@ -0,0 +1,96 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Flexbox Test Reference: Fragmentation of single-line column flex container</title>
|
||||
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
|
||||
|
||||
<style>
|
||||
.multicol {
|
||||
height: 50px;
|
||||
width: 190px;
|
||||
column-width: 40px;
|
||||
column-fill: auto;
|
||||
column-gap: 10px;
|
||||
border: 5px solid orange;
|
||||
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
|
||||
}
|
||||
.flexContainer {
|
||||
background: gray;
|
||||
/* border-width is 0 by default; some sub-testcases will increase it. */
|
||||
border: 0 solid lightgray;
|
||||
}
|
||||
.border-padding {
|
||||
border-width: 10px 0;
|
||||
padding: 5px 0;
|
||||
}
|
||||
.gap {
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
|
||||
header {
|
||||
background: cyan;
|
||||
height: 50px;
|
||||
}
|
||||
nav, article, footer {
|
||||
width: 30px;
|
||||
}
|
||||
nav {
|
||||
background: magenta;
|
||||
height: 25px;
|
||||
}
|
||||
article {
|
||||
background: yellow;
|
||||
height: 25px;
|
||||
position: relative;
|
||||
left: 5px;
|
||||
}
|
||||
footer {
|
||||
background: black;
|
||||
height: 50px;
|
||||
position: relative;
|
||||
left: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<!-- Basic one without any margin/border/padding. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with margin-top. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer" style="margin-top: 25px">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container not at the top of the column/page. -->
|
||||
<div class="multicol">
|
||||
<div style="height: 25px"></div>
|
||||
<div class="flexContainer">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with border and padding. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer border-padding">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with border, padding, and row-gap. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer border-padding">
|
||||
<header></header><div class="gap"></div><nav></nav><div class="gap"></div><article></article><div class="gap"></div><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Flexbox Test: Fragmentation of height:auto single-line column flex container with fixed height flex items</title>
|
||||
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
|
||||
<link rel="match" href="flexbox-single-column-1-ref.html">
|
||||
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line column flex container, with various combinations of margin/border/padding, alignments, and row-gap.">
|
||||
|
||||
<style>
|
||||
.multicol {
|
||||
height: 50px;
|
||||
width: 190px;
|
||||
column-width: 40px;
|
||||
column-fill: auto;
|
||||
column-gap: 10px;
|
||||
border: 5px solid orange;
|
||||
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
|
||||
}
|
||||
.flexContainer {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: column;
|
||||
background: gray;
|
||||
/* border-width is 0 by default; some sub-testcases will increase it. */
|
||||
border: 0 solid lightgray;
|
||||
}
|
||||
.border-padding {
|
||||
border-width: 10px 0;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
|
||||
header {
|
||||
background: cyan;
|
||||
height: 50px;
|
||||
}
|
||||
nav, article, footer {
|
||||
width: 30px;
|
||||
}
|
||||
nav {
|
||||
background: magenta;
|
||||
height: 25px;
|
||||
align-self: flex-start;
|
||||
}
|
||||
article {
|
||||
background: yellow;
|
||||
height: 25px;
|
||||
align-self: center;
|
||||
}
|
||||
footer {
|
||||
background: black;
|
||||
height: 50px;
|
||||
align-self: flex-end;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<!-- Basic one without any margin/border/padding. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with margin-top. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer" style="margin-top: 25px">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container not at the top of the column/page. -->
|
||||
<div class="multicol">
|
||||
<div style="height: 25px"></div>
|
||||
<div class="flexContainer">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with border and padding. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer border-padding">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with border, padding, and row-gap. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer border-padding" style="row-gap: 5px">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,111 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Flexbox Test Reference: Fragmentation of single-line row flex container</title>
|
||||
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
|
||||
|
||||
<style>
|
||||
.multicol {
|
||||
height: 50px;
|
||||
width: 320px;
|
||||
column-count: 3;
|
||||
column-fill: auto;
|
||||
column-gap: 10px;
|
||||
border: 5px solid orange;
|
||||
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
|
||||
}
|
||||
.flexContainer {
|
||||
background: gray;
|
||||
/* border-width is 0 by default; some sub-testcases will increase it. */
|
||||
border: 0 solid lightgray;
|
||||
height: 100px;
|
||||
position: relative;
|
||||
}
|
||||
.border-padding {
|
||||
border-width: 10px 0;
|
||||
padding: 5px 0;
|
||||
}
|
||||
.gap {
|
||||
width: 4px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
|
||||
header, nav, article, footer {
|
||||
width: 25px;
|
||||
}
|
||||
header {
|
||||
background: cyan;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
}
|
||||
nav {
|
||||
background: magenta;
|
||||
height: 25px;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 25px;
|
||||
}
|
||||
article {
|
||||
background: yellow;
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 50px;
|
||||
}
|
||||
footer {
|
||||
background: black;
|
||||
height: 75px;
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
left: 75px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<!-- Basic one without any margin/border/padding. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with margin-top. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer" style="margin-top: 25px">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container not at the top of the column/page. -->
|
||||
<div class="multicol">
|
||||
<div style="height: 25px"></div>
|
||||
<div class="flexContainer">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with border and padding. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer border-padding">
|
||||
<!-- Adjust top to simulate padding. -->
|
||||
<header style="top: 5px"></header><nav style="top: 5px"></nav>
|
||||
<article style="top: 30px"></article><footer style="top: 30px"></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with border, padding, and column-gap. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer border-padding">
|
||||
<header style="width: 22px; top: 5px"></header>
|
||||
<nav style="width: 22px; top: 5px; left: 26px"></nav>
|
||||
<article style="width: 22px; top: 30px; left: 52px;"></article>
|
||||
<footer style="width: 22px; top: 30px; left: 78px;"></footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Flexbox Test: Fragmentation of height:auto single-line row flex container with fixed height flex items</title>
|
||||
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
|
||||
<link rel="author" title="Mozilla" href="http://www.mozilla.org/">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#pagination">
|
||||
<link rel="match" href="flexbox-single-row-1-ref.html">
|
||||
<meta name="assert" content="This test verifies fragmentation of fixed height flex items in a height:auto single-line row flex container, with various combinations of margin/border/padding, alignments, and column-gap.">
|
||||
|
||||
<style>
|
||||
.multicol {
|
||||
height: 50px;
|
||||
width: 320px;
|
||||
column-count: 3;
|
||||
column-fill: auto;
|
||||
column-gap: 10px;
|
||||
border: 5px solid orange;
|
||||
margin-bottom: 5px; /* Just to separate each sub-testcase visually. */
|
||||
}
|
||||
.flexContainer {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
background: gray;
|
||||
/* border-width is 0 by default; some sub-testcases will increase it. */
|
||||
border: 0 solid lightgray;
|
||||
}
|
||||
.border-padding {
|
||||
border-width: 10px 0;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
/* Note: flex items are in visual order as "CMYK": cyan, magenta, yellow, black. */
|
||||
header, nav, article, footer {
|
||||
flex-grow: 1;
|
||||
}
|
||||
header {
|
||||
background: cyan;
|
||||
height: 100px;
|
||||
}
|
||||
nav {
|
||||
background: magenta;
|
||||
height: 25px;
|
||||
align-self: flex-start;
|
||||
}
|
||||
article {
|
||||
background: yellow;
|
||||
height: 50px;
|
||||
align-self: center;
|
||||
}
|
||||
footer {
|
||||
background: black;
|
||||
height: 75px;
|
||||
align-self: flex-end;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<!-- Basic one without any margin/border/padding. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with margin-top. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer" style="margin-top: 25px">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container not at the top of the column/page. -->
|
||||
<div class="multicol">
|
||||
<div style="height: 25px"></div>
|
||||
<div class="flexContainer">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with border and padding. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer border-padding">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Test a container with border, padding, and column-gap. -->
|
||||
<div class="multicol">
|
||||
<div class="flexContainer border-padding" style="column-gap: 4px">
|
||||
<header></header><nav></nav><article></article><footer></footer>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -39,3 +39,9 @@ fuzzy-if(Android&&webrender,0-128,0-10) == flexbox-empty-2d.html flexbox-empty-2
|
|||
== flexbox-unbreakable-child-3c-wrap.html flexbox-unbreakable-child-3-ref.html
|
||||
== flexbox-unbreakable-child-3d.html flexbox-unbreakable-child-3-ref.html
|
||||
== flexbox-unbreakable-child-3d-wrap.html flexbox-unbreakable-child-3-ref.html
|
||||
|
||||
# Tests for how we fragment flex items in a single-line column flex container.
|
||||
== flexbox-single-column-1a.html flexbox-single-column-1-ref.html
|
||||
|
||||
# Tests for how we fragment flex items in a single-line row flex container.
|
||||
== flexbox-single-row-1a.html flexbox-single-row-1-ref.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче