From 2f7da4b95f1c97306725bfcfd877ac34e290e6dc Mon Sep 17 00:00:00 2001 From: Ting-Yu Lin Date: Wed, 3 Jun 2020 03:52:29 +0000 Subject: [PATCH] Bug 1642694 - Build display list for frames in flex container's overflow container list. r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D77855 --- layout/generic/nsFlexContainerFrame.cpp | 3 + .../flexbox-single-column-6-ref.html | 76 +++++++++++++++++ .../pagination/flexbox-single-column-6.html | 81 +++++++++++++++++++ .../reftests/flexbox/pagination/reftest.list | 1 + 4 files changed, 161 insertions(+) create mode 100644 layout/reftests/flexbox/pagination/flexbox-single-column-6-ref.html create mode 100644 layout/reftests/flexbox/pagination/flexbox-single-column-6.html diff --git a/layout/generic/nsFlexContainerFrame.cpp b/layout/generic/nsFlexContainerFrame.cpp index dc24ff132663..a71f090b8d06 100644 --- a/layout/generic/nsFlexContainerFrame.cpp +++ b/layout/generic/nsFlexContainerFrame.cpp @@ -2641,6 +2641,9 @@ void nsFlexContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder, nsDisplayListCollection tempLists(aBuilder); DisplayBorderBackgroundOutline(aBuilder, tempLists); + if (GetPrevInFlow()) { + DisplayOverflowContainers(aBuilder, tempLists); + } // Our children are all block-level, so their borders/backgrounds all go on // the BlockBorderBackgrounds list. diff --git a/layout/reftests/flexbox/pagination/flexbox-single-column-6-ref.html b/layout/reftests/flexbox/pagination/flexbox-single-column-6-ref.html new file mode 100644 index 000000000000..f2a1e6c8bbe8 --- /dev/null +++ b/layout/reftests/flexbox/pagination/flexbox-single-column-6-ref.html @@ -0,0 +1,76 @@ + + + + + CSS Flexbox Test Reference: Fragmentation of a fixed height single-line column flex container and a fixed height flex item that has overflows + + + + + + + +
+
+
+
+
+ + +
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+ + diff --git a/layout/reftests/flexbox/pagination/flexbox-single-column-6.html b/layout/reftests/flexbox/pagination/flexbox-single-column-6.html new file mode 100644 index 000000000000..350e97bb844a --- /dev/null +++ b/layout/reftests/flexbox/pagination/flexbox-single-column-6.html @@ -0,0 +1,81 @@ + + + + + CSS Flexbox Test: Fragmentation of a fixed height single-line column flex container and a fixed height flex item that has overflows + + + + + + + + + + +
+
+
+
+
+ + +
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+ + diff --git a/layout/reftests/flexbox/pagination/reftest.list b/layout/reftests/flexbox/pagination/reftest.list index 319f2d8ec43e..355b0d8b3da3 100644 --- a/layout/reftests/flexbox/pagination/reftest.list +++ b/layout/reftests/flexbox/pagination/reftest.list @@ -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-4.html flexbox-single-column-4-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. == flexbox-single-row-1a.html flexbox-single-row-1-ref.html