зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1642694 - Build display list for frames in flex container's overflow container list. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D77855
This commit is contained in:
Родитель
420d41344c
Коммит
2f7da4b95f
|
@ -2641,6 +2641,9 @@ void nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||||
nsDisplayListCollection tempLists(aBuilder);
|
nsDisplayListCollection tempLists(aBuilder);
|
||||||
|
|
||||||
DisplayBorderBackgroundOutline(aBuilder, tempLists);
|
DisplayBorderBackgroundOutline(aBuilder, tempLists);
|
||||||
|
if (GetPrevInFlow()) {
|
||||||
|
DisplayOverflowContainers(aBuilder, tempLists);
|
||||||
|
}
|
||||||
|
|
||||||
// Our children are all block-level, so their borders/backgrounds all go on
|
// Our children are all block-level, so their borders/backgrounds all go on
|
||||||
// the BlockBorderBackgrounds list.
|
// the BlockBorderBackgrounds list.
|
||||||
|
|
|
@ -0,0 +1,76 @@
|
||||||
|
<!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 a fixed height single-line column flex container and a fixed height flex item that has overflows</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 {
|
||||||
|
display: block;
|
||||||
|
background: gray;
|
||||||
|
/* border-width is 0 by default; some sub-testcases will increase it. */
|
||||||
|
border: 0 solid lightgray;
|
||||||
|
/* Height is deliberately made shorter than its flex items. */
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
.border-padding {
|
||||||
|
border-width: 10px 0;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
article {
|
||||||
|
width: 30px;
|
||||||
|
/* Height is deliberately made shorter than its <div> child. */
|
||||||
|
height: 70px;
|
||||||
|
background: cyan;
|
||||||
|
}
|
||||||
|
article > div {
|
||||||
|
width: 20px;
|
||||||
|
height: 140px;
|
||||||
|
background: magenta;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<!-- Basic one without any margin/border/padding. -->
|
||||||
|
<div class="multicol">
|
||||||
|
<div class="flexContainer">
|
||||||
|
<article><div></div></article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Test a container with margin-top. -->
|
||||||
|
<div class="multicol">
|
||||||
|
<div class="flexContainer" style="margin-top: 25px">
|
||||||
|
<article><div></div></article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Test a container not at the top of the column/page. -->
|
||||||
|
<div class="multicol">
|
||||||
|
<div style="height: 25px"></div>
|
||||||
|
<div class="flexContainer">
|
||||||
|
<article><div></div></article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Test a container with border and padding. -->
|
||||||
|
<div class="multicol">
|
||||||
|
<div class="flexContainer border-padding">
|
||||||
|
<article><div></div></article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,81 @@
|
||||||
|
<!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 a fixed height single-line column flex container and a fixed height flex item that has overflows</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-6-ref.html">
|
||||||
|
<meta name="assert" content="This test verifies fragmentation of a fixed height flex item that has overflows in a fixed height single-line column flex container.">
|
||||||
|
|
||||||
|
<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;
|
||||||
|
/* Height is deliberately made shorter than its flex items. */
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
.border-padding {
|
||||||
|
border-width: 10px 0;
|
||||||
|
padding: 5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
article {
|
||||||
|
width: 30px;
|
||||||
|
/* Height is deliberately made shorter than its <div> child. */
|
||||||
|
height: 70px;
|
||||||
|
background: cyan;
|
||||||
|
}
|
||||||
|
article > div {
|
||||||
|
width: 20px;
|
||||||
|
height: 140px;
|
||||||
|
background: magenta;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<!-- Basic one without any margin/border/padding. -->
|
||||||
|
<div class="multicol">
|
||||||
|
<div class="flexContainer">
|
||||||
|
<article><div></div></article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Test a container with margin-top. -->
|
||||||
|
<div class="multicol">
|
||||||
|
<div class="flexContainer" style="margin-top: 25px">
|
||||||
|
<article><div></div></article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Test a container not at the top of the column/page. -->
|
||||||
|
<div class="multicol">
|
||||||
|
<div style="height: 25px"></div>
|
||||||
|
<div class="flexContainer">
|
||||||
|
<article><div></div></article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Test a container with border and padding. -->
|
||||||
|
<div class="multicol">
|
||||||
|
<div class="flexContainer border-padding">
|
||||||
|
<article><div></div></article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -56,6 +56,7 @@ fuzzy-if(Android&&webrender,0-128,0-10) == flexbox-empty-2d.html flexbox-empty-2
|
||||||
== flexbox-single-column-3b.html flexbox-single-column-3-ref.html
|
== flexbox-single-column-3b.html flexbox-single-column-3-ref.html
|
||||||
== flexbox-single-column-4.html flexbox-single-column-4-ref.html
|
== flexbox-single-column-4.html flexbox-single-column-4-ref.html
|
||||||
== flexbox-single-column-5.html flexbox-single-column-5-ref.html
|
== flexbox-single-column-5.html flexbox-single-column-5-ref.html
|
||||||
|
== flexbox-single-column-6.html flexbox-single-column-6-ref.html
|
||||||
|
|
||||||
# Tests for how we fragment flex items in a single-line row flex container.
|
# 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
|
== flexbox-single-row-1a.html flexbox-single-row-1-ref.html
|
||||||
|
|
Загрузка…
Ссылка в новой задаче