Support pushing the flex item to the next page/column if it's desired size exceeds the remaining available block-size
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
People
(Reporter: TYLin, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
text/html
|
Details |
Per bug 1622935 comment 11, some data in a flex item can be lost in printing if the flex item contains some unbreakable content taller than the remaining available block-size allocated to it. See Attachment 9146697 [details] for an example.
Per bug 1622935 comment 14, we can fix the bug by push it to the next page/column if it's desired size exceeds the remaining available block-size.
Comment 1•5 years ago
|
||
The way this is supposed to work is that the flex item should have returned "BreakBefore" status if it didn't fit and can't break, on the condition that it's not already at the "top of the page" (mIsTopOfPage). Did that not happen for some reason? What frame type was this item?
Reporter | ||
Comment 2•5 years ago
|
||
Re-attach Daniel's Attachment 9146697 [details] in bug 1622935 comment 11 here. I add a second example where the block containing "def" has break-inside: avoid
, and the multicols now use column-fill:auto
.
Reporter | ||
Comment 3•5 years ago
|
||
(In reply to Mats Palmgren (:mats) from comment #1)
The way this is supposed to work is that the flex item should have returned "BreakBefore" status if it didn't fit and can't break, on the condition that it's not already at the "top of the page" (mIsTopOfPage). Did that not happen for some reason? What frame type was this item?
Part of the reason is that we haven't properly set mIsTopOfPage
for flex items yet when we create the child reflow input in ReflowFlexItem
, and we haven't considered in flex container's ReflowChildren
to push the flex item to next-in-flow if it returns "BreakBefore" status. We should fix it in this bug. So currently, the mIsTopOfPage
always true
for a flex container is in multicol; the bit inherits from parent's reflow input all the way from nsColumnSetFrame
.
However, even if I force set the mIsTopOfPage
to false
for flex item's reflow input, the block containing "def" in the first flex container (attached in comment 2) is still not returned "BreakBefore" status, unless the "def" block has "break-avoid:inside" (in the second flex container). Is this expected or a known bug?
Comment 4•5 years ago
|
||
Yeah, I think it's a long-standing bug in block layout. This might fix it.
Reporter | ||
Comment 5•5 years ago
|
||
Comment 6•5 years ago
|
||
Description
•