Closed Bug 1890238 Opened 3 months ago Closed 2 months ago

Implement forced page break on flex items

Categories

(Core :: Layout: Flexbox, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: TYLin, Assigned: TYLin)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

We haven't implement any forced break on flex item yet. Specifically, we want to implement break-before and break-after on flex items for those values currently supported by gecko. Firefox's lacks any forced break support for multicol (bug 1840944), so we can start from paginated mode.

Relevant spec:

  1. https://drafts.csswg.org/css-break-3/#break-between
  2. https://drafts.csswg.org/css-flexbox-1/#pagination
Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Depends on: 1891866

Flex container is the only frame type in layout using childReflowStatus when
naming the nsReflowStatus variable for child. Drop "Reflow" for brevity and
for the consistency with childrenStatus in ReflowChildren().

This patch stops the frame constructor from inserting nsPageBreakFrame as a flex
item, because flex container does not rely on it to do forced page break at all,
and nsPageBreakFrame can produce wrong layout result.

The majority of this patch is to honor forced break values on flex items in
nsFlexContainerFrame::ReflowChildren(). In this patch, we don't handle avoid
break values such as break-before:avoid and break-after:avoid since they are
not handled in other frame types yet.

WPTs are added in later parts.

The flex items in 068 variants have no border because they can have some
fuzziness on the column-reverse flex container.

Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/31b65c4aa8e6
Part 1 - Rename childReflowStatus to childStatus. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/3f8e6f37ef78
Part 2 - Honor forced break values on flex items. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/30ff87c59be6
Part 3 - Add WPT for forced break value on flex items in printing. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/93734abeec9d
Part 4 - Add WPT for forced break value propagation from flex items in printing. r=dholbert
https://hg.mozilla.org/integration/autoland/rev/de885bd06d1e
Part 5 - Add WPT for forced break value propagation from flex items in multicol. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46063 for changes under testing/web-platform/tests
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: