New issue
Advanced search Search tips

Issue 798844 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[LayoutNG] Margins after unforced fragmentainer breaks should be ignored

Project Member Reported by mstensho@chromium.org, Jan 3 2018

Issue description

NG doesn't yet support this. Only margins after forced breaks should be retained.

Spec: https://drafts.csswg.org/css-break/#break-margins

Test: fast/multicol/break-after-always-bottom-margin.html
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 10 2018

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

commit 9c60ca34ed08e399f078b651b68964b53c4bd39e
Author: Morten Stenshorne <mstensho@chromium.org>
Date: Wed Jan 10 23:04:27 2018

[LayoutNG] Handle block-start margins after breaks properly.

We need to know which of the fragment breaks are forced and not.
Block-start (logical top) margins after forced breaks should be
retained, while those at soft breaks should be ignored. [1]

In order to handle margins at fragmentainer boundaries correctly, we
need a more precise way of checking whether we're resuming layout of a
node or not. Having a break token or not isn't all we need to check. We
also need to know if a fragment for the node has already been created.
We used to check if used block size was larger than 0 to figure this
out, but that isn't really enough either, since it's possible to create
an empty fragment (a regular block with only float children that
fragment, for instance). Therefore, make it possible to create
"break-before" tokens.  We used to simply create special tokens with
zero block size used. Now there's a flag that marks the token as a
"break-before".

[1] https://drafts.csswg.org/css-break/#break-margins

Bug:  798844 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I80277ac20bd437832a6a9e4444e10e9d65e021fe
Reviewed-on: https://chromium-review.googlesource.com/860137
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528462}
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_block_break_token.cc
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_block_break_token.h
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_block_child_iterator.cc
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.cc
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.h
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.h
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.cc
[modify] https://crrev.com/9c60ca34ed08e399f078b651b68964b53c4bd39e/third_party/WebKit/Source/core/layout/ng/ng_fragmentation_utils.h

Status: Fixed (was: Assigned)

Sign in to add a comment