Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Issue 2400083003: Don't break before a first in-flow block container. (Closed)

Created:
4 years, 2 months ago by mstensho (USE GERRIT)
Modified:
4 years, 2 months ago
Reviewers:
eae
CC:
chromium-reviews, szager+layoutwatch_chromium.org, zoltan1, blink-reviews-layout_chromium.org, pdr+renderingwatchlist_chromium.org, eae+blinkwatch, leviw+renderwatch, jchaffraix+rendering, blink-reviews, mstensho (USE GERRIT)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf Cr-Commit-Position: refs/heads/master@{#423926}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+110 lines, -42 lines) Patch
A + third_party/WebKit/LayoutTests/fast/multicol/break-before-first-line-in-first-child.html View 1 chunk +4 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/multicol/break-before-first-line-in-first-child-expected.txt View 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/multicol/forced-break-in-nested-columns.html View 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/multicol/nested-short-first-row-unsplittable-block.html View 1 chunk +1 line, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/multicol/soft-break-before-first-child.html View 1 chunk +0 lines, -10 lines 0 comments Download
D third_party/WebKit/LayoutTests/fast/multicol/soft-break-before-first-child-expected.txt View 1 chunk +0 lines, -6 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/avoid-break-inside-first-child.html View 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/avoid-break-inside-first-child-expected.txt View 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/avoid-break-inside-first-child-nested.html View 1 chunk +15 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/avoid-break-inside-first-child-nested-expected.txt View 1 chunk +4 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fragmentation/image-block-as-first-child.html View 1 chunk +13 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/fragmentation/image-block-as-first-child-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 4 chunks +44 lines, -23 lines 0 comments Download

Messages

Total messages: 12 (7 generated)
mstensho (USE GERRIT)
4 years, 2 months ago (2016-10-07 18:47:41 UTC) #6
eae
OK, LGTM
4 years, 2 months ago (2016-10-07 18:56:10 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2400083003/1
4 years, 2 months ago (2016-10-07 19:09:56 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-07 19:21:25 UTC) #10
commit-bot: I haz the power
4 years, 2 months ago (2016-10-07 19:24:51 UTC) #12
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/256093e6ead7db6f7269d8af50a82906891f0caf
Cr-Commit-Position: refs/heads/master@{#423926}

Powered by Google App Engine
This is Rietveld 408576698