DescriptionClass A fragmentainer break points also exist between zero-height blocks.
We used to base class A break point [1] detection on whether we were at the
start of the container, location-wise (atBeforeSideOfBlock). That's not
sufficient. It's obviously okay to collapse margins through a zero-height
block, and basically pretend that it doesn't exist for the sake of margin
collapsing. But this isn't true for fragmentation. Class A break points [1]
exist between any two in-flow blocks, regardless of the height of said blocks.
Therefore we cannot propagate the pagination strut caused by a line inside a
block following an empty first-child block. We still need to keep the check for
whether we are at the start of the container, though, because if we aren't, it
means that we have a class C break point [1].
This CL introduces the BlockChildrenLayoutInfo class, which is used as a state
object during block children layout. This replaces MarginInfo and LayoutUnit
previousFloatLogicalBottom, which is what we used to pass back and forth. They
have now been wrapped into BlockChildrenLayoutInfo, along with a new piece of
information: whether we're laying out the first in-flow child or not. This
information is what we now use to detect if we're at a class A break point [1]
or not.
[1] https://drafts.csswg.org/css-break/#possible-breaks
R=leviw@chromium.org
BUG=223068
Committed: https://crrev.com/fe283ea1ad33abe251cbb4a921f7f836085bab82
Cr-Commit-Position: refs/heads/master@{#380625}
Patch Set 1 #Patch Set 2 : Regression fixed: missed a class C break opportunity. Updated the documentation. #
Total comments: 4
Patch Set 3 : rebase master #Patch Set 4 : Link to the scriptures. #
Messages
Total messages: 13 (6 generated)
|