New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 653690 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Page / column break before a first in-flow block child should generally not be allowed

Reported by msten...@opera.com, Oct 6 2016

Issue description

If a block has break-inside:avoid and it is too tall to fit in the current fragmentainer, we push it to the next one, even if there's no break opportunity there.

https://drafts.csswg.org/css-break-3/#possible-breaks

Discovered while working on  bug 533736 .
 
tc.html
236 bytes View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/256093e6ead7db6f7269d8af50a82906891f0caf

commit 256093e6ead7db6f7269d8af50a82906891f0caf
Author: mstensho <mstensho@opera.com>
Date: Fri Oct 07 19:21:03 2016

Don't break before a first in-flow block container.

There's no break opportunity there, but break-inside:avoid used to trick us
into inserting a break there anyway in some cases.

As part of this work, we need allowsPaginationStrut() to check better if a
strut is allowed, or it might just end up getting eaten and forgotten about by
a first in-flow block further up in the tree. This matters for monolithic
content [1], such as lines and image blocks. We should never break inside
those, so allow breaking before them, even if they are the first piece of
content inside some block (just like we did before this change).
break-before-first-line-in-first-child.html and image-block-as-first-child.html
test that we don't regress in this regard.

Also removed a FIXME about checking for sufficient height. This would be
incorrect to fix. If there's no break point here, we have to propagate the
strut, if we're allowed to.

Had to update some tests, and even rename one, because they relied on the old
buggy behavior.

[1] https://drafts.csswg.org/css-break-3/#possible-breaks

BUG= 653690 

Review-Url: https://codereview.chromium.org/2400083003
Cr-Commit-Position: refs/heads/master@{#423926}

[add] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fast/multicol/break-before-first-line-in-first-child-expected.txt
[add] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fast/multicol/break-before-first-line-in-first-child.html
[modify] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fast/multicol/forced-break-in-nested-columns.html
[modify] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fast/multicol/nested-short-first-row-unsplittable-block.html
[delete] https://crrev.com/96e5488ff8ee752b774b20c3eea3ffd0227a70d6/third_party/WebKit/LayoutTests/fast/multicol/soft-break-before-first-child-expected.txt
[delete] https://crrev.com/96e5488ff8ee752b774b20c3eea3ffd0227a70d6/third_party/WebKit/LayoutTests/fast/multicol/soft-break-before-first-child.html
[add] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fragmentation/avoid-break-inside-first-child-expected.txt
[add] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fragmentation/avoid-break-inside-first-child-nested-expected.txt
[add] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fragmentation/avoid-break-inside-first-child-nested.html
[add] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fragmentation/avoid-break-inside-first-child.html
[add] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fragmentation/image-block-as-first-child-expected.txt
[add] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/LayoutTests/fragmentation/image-block-as-first-child.html
[modify] https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp

Comment 2 by msten...@opera.com, Oct 7 2016

Status: Fixed (was: Assigned)

Sign in to add a comment