New issue
Advanced search Search tips

Issue 740993 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 635619



Sign in to add a comment

Make LayoutNG absolute positioning tests pass

Project Member Reported by atotic@chromium.org, Jul 11 2017

Issue description

LayoutNG fails many abspos tests. This is a tracking bug for investigations on why do these tests fail.
 

Comment 1 by atotic@chromium.org, Jul 11 2017

Blocking: 635619

Comment 2 Deleted

Comment 3 by atotic@chromium.org, Jul 12 2017

absolute-replaced-width-013.xht
absolute-replaced-width-027.xht 
These tests had incorrect visible description text. Fixed in w-p-t:

https://github.com/w3c/web-platform-tests/pull/6535

Comment 4 Deleted

Comment 6 by atotic@chromium.org, Jul 13 2017

absolute-replaced-width-036->071 are correct, but reference xht renders incorrectly because of inline layout.

Comment 7 by atotic@chromium.org, Jul 17 2017

Further failures:
external/wpt/css/css-grid-1/abspos/
- real problem, abspos is defined differently inside a grid

fast/multicol/dynamic/abspos-multicol-with-spanner-becomes-spanner.html
fast/block/abspos-child-container-changes-from-relative-to-static.html
fast/block/positioning/abspos-auto-left-and-width-change-parent-margin-left.html
fast/scrolling/abspos-relayout-overflow-style-change.html

Comment 8 by atotic@chromium.org, Jul 21 2017

also take a look at external/wpt/css/css-writing-modes-3

Comment 9 by atotic@chromium.org, Jul 24 2017

Many of the external/wpt/css/css-writing-modes-3 tests have #document as an abspos containing block. #document runs Legacy code, so these tests test legacy, not ng.

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 27 2017

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

commit 81f3d8c8ef14518dda29d230573c30fc28d6ca8b
Author: Aleks Totic <atotic@chromium.org>
Date: Thu Jul 27 14:25:16 2017

Out of flow replaced blocks implementation.

spec: https://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width

Main changes are:

# ng_out_of_flow_layout + ng_absolute_utils
If an element has an intrinsic size, and size is not explicit, use
intrinsic size instead.

# layout_ng_block_flow
If an oof block's containing block is LegacyLayout, and width/height are Auto, initialize constraint 
space with legacy width/height, unless width is shrink-to-fit.

Bug: 740993
Change-Id: If8540ab4de4211d4f332c0cb772a53bd247ab19c
Reviewed-on: https://chromium-review.googlesource.com/570927
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489917}
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/LayoutReplaced.h
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.h
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.cc
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.h
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
[modify] https://crrev.com/81f3d8c8ef14518dda29d230573c30fc28d6ca8b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 27 2017

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

commit aadbf80edf2856c935e2e46646b24c299b200904
Author: Aleks Totic <atotic@chromium.org>
Date: Thu Jul 27 23:00:00 2017

Bugfix: oof bad width/height in vertical mode

ng_out_of_flow_layout was using a ConstraintSpace whose writing mode was out
out of sync with child.style. The ng_out_of_flow_layout_part fixes this.

While fixing this bug, I mentioned to cbiesinger that ResolveInline/ResolveBlock
precondition that space and style's writing modes match is error prone, and
that we should add a DCHECK.

I added a DCHECK, and this surfaced a ng_block_layout_algo bug: a mismatch 
when margins were computed. This is fixed in ng_block_layout_algorithm.

Also, some C++ tests triggered the DCHECK, fixed them too.

Bug: 740993
Change-Id: I27150f29ed785d1ff8e7f6c9d8b872339aa31c4c
Reviewed-on: https://chromium-review.googlesource.com/583730
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490053}
[modify] https://crrev.com/aadbf80edf2856c935e2e46646b24c299b200904/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc
[modify] https://crrev.com/aadbf80edf2856c935e2e46646b24c299b200904/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/aadbf80edf2856c935e2e46646b24c299b200904/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
[modify] https://crrev.com/aadbf80edf2856c935e2e46646b24c299b200904/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
[modify] https://crrev.com/aadbf80edf2856c935e2e46646b24c299b200904/third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc
[modify] https://crrev.com/aadbf80edf2856c935e2e46646b24c299b200904/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Sep 8 2017

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

commit 5ec9012c6cb3dbd084099a70c210f529b577a046
Author: Aleks Totic <atotic@chromium.org>
Date: Fri Sep 08 21:19:12 2017

Fix abspos handling of MinMax

abspos used to assume MinMax was border width, not content width.

Annoying part is that we synthesize MinMax out of estimated block_width 
inside ComputeFullAbsoluteWithChildBlockSize.
This now has to be converted to content width adding yet another
layer of if statements in already iffy function.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I045e105cad6c684152fca5fe128d924333ee0ccc
Reviewed-on: https://chromium-review.googlesource.com/656312
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500676}
[modify] https://crrev.com/5ec9012c6cb3dbd084099a70c210f529b577a046/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/5ec9012c6cb3dbd084099a70c210f529b577a046/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc
[modify] https://crrev.com/5ec9012c6cb3dbd084099a70c210f529b577a046/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Sep 12 2017

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

commit 3d2d29a9be6a0a0c56486d54de88063ee3096e51
Author: Aleks Totic <atotic@chromium.org>
Date: Tue Sep 12 02:15:51 2017

Fix incorrect static position, and container_border_physical_offset_

I was not interpreting offset correctly if static position was kTopRight
and we were looking for RightInset.

Renamed methods RightInset (instead of RightPosition) trying to make 
it more explicit, and less error prone.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I97c12ef1adce31f73b01e4c20850dd18ac01c443
Reviewed-on: https://chromium-review.googlesource.com/658403
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501155}
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/geometry/ng_static_position.cc
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/geometry/ng_static_position.h
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_block_node.h
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.cc
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_length_utils.h
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/3d2d29a9be6a0a0c56486d54de88063ee3096e51/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h

Project Member

Comment 14 by bugdroid1@chromium.org, Sep 13 2017

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

commit de8d63e50825ea1f9bb50815db2399a438c8e03d
Author: Aleks Totic <atotic@chromium.org>
Date: Wed Sep 13 10:47:28 2017

OOF conflict resolution is logical, not physical

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I88f2d778c7f0351daf6165fefc0c8654f209dca7
Reviewed-on: https://chromium-review.googlesource.com/663426
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501590}
[modify] https://crrev.com/de8d63e50825ea1f9bb50815db2399a438c8e03d/third_party/WebKit/Source/core/layout/ng/geometry/ng_static_position.cc
[modify] https://crrev.com/de8d63e50825ea1f9bb50815db2399a438c8e03d/third_party/WebKit/Source/core/layout/ng/geometry/ng_static_position.h
[modify] https://crrev.com/de8d63e50825ea1f9bb50815db2399a438c8e03d/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc

After OOFLayoutPart handles abspos inside Legacy fix, following tests need to be looked at:

abspos inside objects:
external/wpt/css/css-writing-modes-3/abs-pos-non-replaced-icb-vlr-007.xht
external/wpt/css/css-writing-modes-3/abs-pos-non-replaced-icb-vlr-017.xht

abspos inside fixed:
compositing/overflow/fixed-element-escape-fixed-overflow-clip.html
compositing/squashing/attempting-to-squash-into-compositing-container.html
compositing/squashing/attempting-to-squash-into-stacking-ancestor.html

abspos inside inline:
fast/block/positioning/absolute-in-inline-ltr-2.html
fast/block/positioning/absolute-in-inline-ltr-3.html
fast/block/positioning/absolute-in-inline-ltr.html
fast/block/positioning/absolute-in-inline-short-ltr.html

Project Member

Comment 16 by bugdroid1@chromium.org, Oct 3 2017

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

commit 432871fa3846534a6834632a41d73cc7a6bc68b8
Author: Aleks Totic <atotic@chromium.org>
Date: Tue Oct 03 19:20:08 2017

LayoutNGBlockFlow::UpdateBlockLayout should use OOFLayoutPart

Bug: 740993
Change-Id: I703350c0e2b43843e476600b3bc127cd6b28a7a8
Reviewed-on: https://chromium-review.googlesource.com/665259
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506136}
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/geometry/ng_static_position.h
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.h
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.cc
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/ng_layout_input_node.h
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/432871fa3846534a6834632a41d73cc7a6bc68b8/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h

Project Member

Comment 17 by bugdroid1@chromium.org, Oct 9 2017

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

commit 48b8f42a4b7031362e7abf7e00d246364416775a
Author: Aleks Totic <atotic@chromium.org>
Date: Mon Oct 09 20:42:38 2017

Fixes "nested NG OOF blocks".

<body>
  <div id="A" position:fixed>
    <div id="B" position:fixed>

body is a containing block for both A&B. Existing code was not
positioning B, or propagating B's position to Legacy.

New code does that.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I74851ef7666ec2219ae51d0b8c45084b994edfec
Reviewed-on: https://chromium-review.googlesource.com/704015
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507473}
[modify] https://crrev.com/48b8f42a4b7031362e7abf7e00d246364416775a/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Oct 11 2017

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

commit e3b2cc17bedd15e44f4ff4ca763eabbdb98921bf
Author: Aleks Totic <atotic@chromium.org>
Date: Wed Oct 11 20:49:19 2017

Fix border writing mode mixup

Update expectations with newly passing tests.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ibba8866e0335c851f4e3d6ff2dabc0235f6bee2b
Reviewed-on: https://chromium-review.googlesource.com/709946
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508103}
[modify] https://crrev.com/e3b2cc17bedd15e44f4ff4ca763eabbdb98921bf/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/e3b2cc17bedd15e44f4ff4ca763eabbdb98921bf/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc
[modify] https://crrev.com/e3b2cc17bedd15e44f4ff4ca763eabbdb98921bf/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc

Project Member

Comment 19 by bugdroid1@chromium.org, Oct 19 2017

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

commit 1e6957e609f2ee2cc8eedf5d70222194fee02c3c
Author: Aleks Totic <atotic@chromium.org>
Date: Thu Oct 19 18:43:01 2017

Always add positioned objects to Legacy OOF container.

Add LayoutNGBlockFlow::CachedLayoutResultForTesting method to enable 
fragment access from unit tests.

# Reason for patch:

Legacy has a fast layout code path that does not call
LayoutNGBlockFlow::UpdateBlockLayout. This path updates 
overflow, and position of OOF descendants. Because of this, 
Legacy containers must know about all OOF descendants.

Existing code did not let Legacy containers know about NG OOF 
descendants. This CL fixes this.

# Unit tests problems.

This patch will affect future webkit_unit_tests. NGBlockNode::Layout 
will DCHECK if done outside of the performLayout cycle if 
NGBlockNode has OOF descendants. 

The core cause is this:
NGBlockNode::CopyFragmentToLegacyLayout calls 
LayoutBox::LayoutPositionedObjects. LayoutPositionedObjects 
asserts that View()->IsInPerformLayout()

This patch fixes four existing failing tests.

1) NGBlockLayoutAlgorithmTest.CollapsingMarginsEmptyBlockWithClearance
Fixed by inspecting LayoutObjects instead of fragments.

2) NGOutOfFlowLayoutPartTest.FixedInsideAbs
Fixed by 

3) NGOutOfFlowLayoutPartTest.OrthogonalWritingMode1
4) NGOutOfFlowLayoutPartTest.OrthogonalWritingMode2
Removed, code already covered by existing LayoutTests.

Bug: 740993
Change-Id: I3a87ef5cdac883517bc3db33e0569668161ff806
Reviewed-on: https://chromium-review.googlesource.com/722760
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510149}
[modify] https://crrev.com/1e6957e609f2ee2cc8eedf5d70222194fee02c3c/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
[modify] https://crrev.com/1e6957e609f2ee2cc8eedf5d70222194fee02c3c/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.h
[modify] https://crrev.com/1e6957e609f2ee2cc8eedf5d70222194fee02c3c/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
[modify] https://crrev.com/1e6957e609f2ee2cc8eedf5d70222194fee02c3c/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
[modify] https://crrev.com/1e6957e609f2ee2cc8eedf5d70222194fee02c3c/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/1e6957e609f2ee2cc8eedf5d70222194fee02c3c/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h
[modify] https://crrev.com/1e6957e609f2ee2cc8eedf5d70222194fee02c3c/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part_test.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Oct 25 2017

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

commit 8a2b2664219f83910c11089258fa1dcadc4a6d87
Author: Aleks Totic <atotic@chromium.org>
Date: Wed Oct 25 17:30:22 2017

[LayoutNG] Part 1 of 3: Move block_size to NGContainerFragmentBuilder

Also removes obsolete comment

All 3 parts of CL will do the following:

Inline blocks can be OOFDescendants, and can contain OOFDescendants.
These changes move NGFragment OOF methods out of NGFragmentBuilder
and into NGContainerFragmentBuilder.

Changes are separated into 3 CLs:

1) Move block_size to NGContainerFragmentBuilder
  block_size was declared in both NGFragmentBuilder, and NGLineBoxFragmentBuilder
2) NGOutOfFlowPositionedDescendant.node must be NGLayoutInputNode,
  not NGBlockNode
  this also required moving UseOldOutOfFlowPositioning into NGLayoutInputNode.
3) move NGFragmentBuilder::AddOutOfFlowChildCandidate and
GetAndClearOutOfFlowDescendantCandidates
to NGContainerFragmentBuilder

Bug: 740993
Change-Id: I98b5b82ba02ebdd7a330d457ad1614d7439e3350
Reviewed-on: https://chromium-review.googlesource.com/736891
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511502}
[modify] https://crrev.com/8a2b2664219f83910c11089258fa1dcadc4a6d87/third_party/WebKit/Source/core/layout/ng/inline/ng_line_box_fragment_builder.cc
[modify] https://crrev.com/8a2b2664219f83910c11089258fa1dcadc4a6d87/third_party/WebKit/Source/core/layout/ng/inline/ng_line_box_fragment_builder.h
[modify] https://crrev.com/8a2b2664219f83910c11089258fa1dcadc4a6d87/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h
[modify] https://crrev.com/8a2b2664219f83910c11089258fa1dcadc4a6d87/third_party/WebKit/Source/core/layout/ng/ng_container_fragment_builder.h
[modify] https://crrev.com/8a2b2664219f83910c11089258fa1dcadc4a6d87/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
[modify] https://crrev.com/8a2b2664219f83910c11089258fa1dcadc4a6d87/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h

Project Member

Comment 21 by bugdroid1@chromium.org, Oct 27 2017

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

commit eab0851ea33f7556e63fc0cb7a51600089c3c72c
Author: Aleks Totic <atotic@chromium.org>
Date: Fri Oct 27 00:10:20 2017

[LayoutNG] Part 3 of 3: Move NGFragBuilder::AddOOFChildCandidate to NGContainerFragmentBuilder

Also move GetAndClearOutOfFlowDescendantCandidates

This is the last part of the 3 part refactor.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I834f393e76a83d5860e1fa9445bde755a33a9507
Reviewed-on: https://chromium-review.googlesource.com/736901
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512031}
[modify] https://crrev.com/eab0851ea33f7556e63fc0cb7a51600089c3c72c/third_party/WebKit/Source/core/layout/ng/ng_container_fragment_builder.cc
[modify] https://crrev.com/eab0851ea33f7556e63fc0cb7a51600089c3c72c/third_party/WebKit/Source/core/layout/ng/ng_container_fragment_builder.h
[modify] https://crrev.com/eab0851ea33f7556e63fc0cb7a51600089c3c72c/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
[modify] https://crrev.com/eab0851ea33f7556e63fc0cb7a51600089c3c72c/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h

Project Member

Comment 22 by bugdroid1@chromium.org, Nov 1 2017

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

commit fc5997e3897a6c0f468a509dce08b0d802ce190a
Author: Aleks Totic <atotic@chromium.org>
Date: Wed Nov 01 06:10:33 2017

[LayoutNG] Inline static position and OOFDescendant propagation

This patch computes static position in inline layout, and propagates
OOFDescendants up the fragment tree.

kojii: I've added NGInlineLayoutAlgorithm::CurrentDirection method. 
Rename suggestions welcome.

Interesting bits:

1) LayoutBlock::LayoutPositionedObject 
LayoutBlock::LayoutPositionedObject had to be modified because it would
relayout already positioned OOF. The way it decided relayout was 
needed was by positioning the element, and then comparing its position
to position it already had. NG and Legacy would disagree here by a
fraction of a pixel, and this would trigger relayout.

My fix skips this check if LayoutNGBlockFlow is a containing block.

2) Failing tests: there are 23 new failures, and 159 passes.

I've examined the failures. Will need help from inline team on 2a, 2b
and 2c.

2a) DCHECK inline_size < 0
animations/interpolation/letter-spacing-interpolation.html
animations/interpolation/word-spacing-interpolation.html
fast/inline/empty-inline-create-linebox.html
fast/text/text-large-negative-letter-spacing-with-opacity.html
fast/text/text-letter-spacing.html
fast/text/international/rtl-negative-letter-spacing.html
css2.1/t0803-c5502-imrgn-r-03-b-a.html
css2.1/t0804-c5507-ipadn-r-03-b-a.html

2b) bad static position. Block is being positioned by inline-layout-algorithm,
instead of block-layout-algorithm. Should start a new line
external/wpt/css/CSS2/normal-flow/block-non-replaced-width-001.xht
external/wpt/css/CSS2/normal-flow/inline-block-replaced-height-004.xht
external/wpt/css/CSS2/normal-flow/inline-block-replaced-height-005.xht
external/wpt/css/CSS2/normal-flow/inline-block-replaced-height-007.xht
external/wpt/css/CSS2/normal-flow/inline-replaced-height-004.xht
external/wpt/css/CSS2/normal-flow/inline-replaced-height-005.xht
external/wpt/css/CSS2/normal-flow/inline-replaced-height-007.xht
fast/css/sticky/sticky-vertically-overconstrained.html

2c) <span> has many <br>. NG includes <br> in line height, Legacy does not. FF
  does not at all
fast/replaced/absolute-position-percentage-height.html

2d) passes on reload. Content might not be laid out when document.onload() fires
Fully correct (like FF), unlike Legacy which fails 2 tests.
fast/box-sizing/replaced.html

2e) some relayout multicol weirdness
fast/multicol/dynamic/relayout-abspos-in-relpos-spanner.html
ietestcenter/css3/multicolumn/column-containing-block-001.htm
ietestcenter/css3/multicolumn/column-width-applies-to-008.htm
ietestcenter/css3/multicolumn/column-width-applies-to-014.htm

2f) unusual test: svg, shadow roots, i am not sure what is going on
svg/foreign-object-under-shadow-root-under-hidden.html



Bug: 740993
Change-Id: I0eab6ec0ee87bdb10c9a69df0e18f19bcaafef68
Reviewed-on: https://chromium-review.googlesource.com/738870
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513087}
[modify] https://crrev.com/fc5997e3897a6c0f468a509dce08b0d802ce190a/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/fc5997e3897a6c0f468a509dce08b0d802ce190a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
[modify] https://crrev.com/fc5997e3897a6c0f468a509dce08b0d802ce190a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/fc5997e3897a6c0f468a509dce08b0d802ce190a/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.h
[modify] https://crrev.com/fc5997e3897a6c0f468a509dce08b0d802ce190a/third_party/WebKit/Source/core/layout/ng/ng_container_fragment_builder.cc
[modify] https://crrev.com/fc5997e3897a6c0f468a509dce08b0d802ce190a/third_party/WebKit/Source/core/layout/ng/ng_container_fragment_builder.h

Project Member

Comment 25 by bugdroid1@chromium.org, Nov 14 2017

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

commit e45a8dbba0aedb381a82baa0cba214d90b767dcc
Author: Aleks Totic <atotic@chromium.org>
Date: Tue Nov 14 06:20:45 2017

[LayoutNG] OOFLayout need to pass container writing mode to abspos utils

They are needed to resolve overconstrained constraints per spec.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I6766fe17603148212b22d2c1f6f23fc9e9b46bb6
Reviewed-on: https://chromium-review.googlesource.com/762177
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516211}
[modify] https://crrev.com/e45a8dbba0aedb381a82baa0cba214d90b767dcc/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc
[modify] https://crrev.com/e45a8dbba0aedb381a82baa0cba214d90b767dcc/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.h
[modify] https://crrev.com/e45a8dbba0aedb381a82baa0cba214d90b767dcc/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc
[modify] https://crrev.com/e45a8dbba0aedb381a82baa0cba214d90b767dcc/third_party/WebKit/Source/core/layout/ng/ng_length_utils.cc
[modify] https://crrev.com/e45a8dbba0aedb381a82baa0cba214d90b767dcc/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 27 by bugdroid1@chromium.org, Dec 5 2017

Project Member

Comment 28 by bugdroid1@chromium.org, Dec 8 2017

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

commit 8a2d1cfb784c46e7ea78ad8e6f0394c9a389dd2b
Author: Aleks Totic <atotic@chromium.org>
Date: Fri Dec 08 07:55:38 2017

[LayoutNG] Compute inline-cb fragments in container fragment builder

Part 3 of 4 of inline containing block CL
https://chromium-review.googlesource.com/c/chromium/src/+/777707

This CL computes start and end fragments of the inline containing block.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I69abba33130b2b535ac39404ad58a3b72cd9bd39
Reviewed-on: https://chromium-review.googlesource.com/811885
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522736}
[modify] https://crrev.com/8a2d1cfb784c46e7ea78ad8e6f0394c9a389dd2b/third_party/WebKit/Source/core/layout/ng/ng_container_fragment_builder.cc
[modify] https://crrev.com/8a2d1cfb784c46e7ea78ad8e6f0394c9a389dd2b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
[modify] https://crrev.com/8a2d1cfb784c46e7ea78ad8e6f0394c9a389dd2b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h

Project Member

Comment 29 by bugdroid1@chromium.org, Dec 13 2017

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

commit 3a6221f724303371bd9a57cb5af8b33998e5291b
Author: Aleks Totic <atotic@chromium.org>
Date: Wed Dec 13 01:00:26 2017

[LayoutNG] Position descendants in inline containing block.

Part 4 of 4 of inline containing block for OOF descendants
https://chromium-review.googlesource.com/c/chromium/src/+/777707

Geometry of computing the containing block coordinates is complex.

In the old code, all containing block geometry was stored as members of
NGOutOfFlowLayoutPart.

With inline containing blocks, each inline-cb can have a different geometry.
Code was refactored so that cb geometry is configurable per descendant.

Bug: 740993
Change-Id: I3dd392472081ac6b09dd6a2540d142ba9966f3a6
Reviewed-on: https://chromium-review.googlesource.com/818333
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523635}
[modify] https://crrev.com/3a6221f724303371bd9a57cb5af8b33998e5291b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
[modify] https://crrev.com/3a6221f724303371bd9a57cb5af8b33998e5291b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/3a6221f724303371bd9a57cb5af8b33998e5291b/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h

Project Member

Comment 30 by bugdroid1@chromium.org, Dec 15 2017

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

commit dea1003f0a878c336b3a6a0635ee5ba35170f530
Author: Aleks Totic <atotic@chromium.org>
Date: Fri Dec 15 08:31:55 2017

[LayoutNG] Always copy margins to Legacy

The reason for this change is test failure:
fast/block/positioned-bottom-margin.html

<style>
  #abs {
    position:absolute;
    width:auto;
    height:auto;
    top:0px;bottom:0px;left:0px;right:0px;
    min-height:200px;
  }
  #mrg {
    height: 1000px;
    margin-top: 50px;
    margin-bottom: 50px;
  }
</style>
<body>
  <div id="abs"><div id="mrg"></div></div>
</body>

In this document, #mrg margin affects body overflow.
The overflow is computed by Legacy code ComputeOverflow()
ComputeOverflow() uses margin structs stored on Legacy.

I've talked to Ian about it, and he suggested this change.
It fixes this bug, and lots of grid ones, with 2 new border-image
failures.

I do not understand this code well, WDYT about always calling
SetMargin()

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I29816e4bea210d63874124a50a65b7001525d752
Reviewed-on: https://chromium-review.googlesource.com/827548
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524352}
[modify] https://crrev.com/dea1003f0a878c336b3a6a0635ee5ba35170f530/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
[modify] https://crrev.com/dea1003f0a878c336b3a6a0635ee5ba35170f530/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc

Project Member

Comment 31 by bugdroid1@chromium.org, Dec 16 2017

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

commit 762d8538528b19ad970a2fc525ca1252c6d1c863
Author: Aleks Totic <atotic@chromium.org>
Date: Sat Dec 16 00:41:39 2017

[LayoutNG] UpdateMargins is no longer needed by LayoutNGBlockFlow

After CL 827548, margins are always copied to Legacy.
Additional copy in LayoutNGBlockFlow is no longer needed.
Ian says so.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: If1aee4b15a966d58bd62f66190fdf00f035ed0b4
Reviewed-on: https://chromium-review.googlesource.com/830474
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524538}
[modify] https://crrev.com/762d8538528b19ad970a2fc525ca1252c6d1c863/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
[modify] https://crrev.com/762d8538528b19ad970a2fc525ca1252c6d1c863/third_party/WebKit/Source/core/layout/ng/layout_ng_mixin.cc
[modify] https://crrev.com/762d8538528b19ad970a2fc525ca1252c6d1c863/third_party/WebKit/Source/core/layout/ng/layout_ng_mixin.h

Project Member

Comment 33 by bugdroid1@chromium.org, Dec 25 2017

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

commit bf39d455c09afa1da8eee86e14331d729d655c42
Author: Aleks Totic <atotic@chromium.org>
Date: Mon Dec 25 07:49:42 2017

[LayoutNG] Better Legacy abspos handling

The major part of this commit is saving of static position for Legacy.
We used to save static position when fragment was added to its parent fragment.
This does not work for TextFragment in:

Box
  LineBox
    TextFragment

because Legacy expects TextFragment offset wrt Box, not LineBox.

This is fixed by setting static position when it is known wrt LayoutObject
LegacyLayout expects. The attempt to save happens in:

NGContainerFragmentBuilder::GetAndClearOutOfFlowDescendantCandidates
NGBlockNode only saves its offset if containing fragment matches Legacy expectation.

Minor part of this commit is initial steps for handling abspos inline fragments whose
containing block is Legacy. Previously, they were not handled as block fragments.
This patch does not complete this work, this is left as a TODO inside
NGOutOfFlowLayoutPart::ComputeInlineContainingBlocks. I need to figure out
how to compute these in Legacy code. But, there is a DCHECK that now triggers
in ~10 tests:
external/wpt/css/css-position/position-relative-table-tbody-left-absolute-child.html
....

Bug: 740993
Change-Id: Id8fd3be830799322746ddc0c6e0537c08bcfaeb7
Reviewed-on: https://chromium-review.googlesource.com/843018
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526171}
[modify] https://crrev.com/bf39d455c09afa1da8eee86e14331d729d655c42/third_party/WebKit/Source/core/layout/ng/inline/ng_inline_layout_algorithm.cc
[modify] https://crrev.com/bf39d455c09afa1da8eee86e14331d729d655c42/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
[modify] https://crrev.com/bf39d455c09afa1da8eee86e14331d729d655c42/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc
[modify] https://crrev.com/bf39d455c09afa1da8eee86e14331d729d655c42/third_party/WebKit/Source/core/layout/ng/ng_block_node.h
[modify] https://crrev.com/bf39d455c09afa1da8eee86e14331d729d655c42/third_party/WebKit/Source/core/layout/ng/ng_container_fragment_builder.cc
[modify] https://crrev.com/bf39d455c09afa1da8eee86e14331d729d655c42/third_party/WebKit/Source/core/layout/ng/ng_container_fragment_builder.h
[modify] https://crrev.com/bf39d455c09afa1da8eee86e14331d729d655c42/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
[modify] https://crrev.com/bf39d455c09afa1da8eee86e14331d729d655c42/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
[modify] https://crrev.com/bf39d455c09afa1da8eee86e14331d729d655c42/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 34 by bugdroid1@chromium.org, Dec 28 2017

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

commit 71cfe1fa662aa0b440d3aef993aa41ad1602e116
Author: Aleks Totic <atotic@chromium.org>
Date: Thu Dec 28 05:19:56 2017

[LayoutNG] Better legacy static pos computation

layout_ng_block_flow fixes static position computation. It used to be
based on ContainerBlock(), not Container() legacy funcitons expect.

ng_out_of_flow_layout_part() replaces DCHECK with NOTIMPLEMENTED. Since
only 1 remaining test fails with NOTIMPLEMENTED, I am unsure whether
implementation is necessary.

Failing test includes perspective and column width:
compositing/overflow/get-transform-from-non-box-container.html

Bug: 740993
Change-Id: Ia880b923f5fe07521498365efc46380dbb2877c2
Reviewed-on: https://chromium-review.googlesource.com/845142
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526274}
[modify] https://crrev.com/71cfe1fa662aa0b440d3aef993aa41ad1602e116/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
[modify] https://crrev.com/71cfe1fa662aa0b440d3aef993aa41ad1602e116/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 35 by bugdroid1@chromium.org, Dec 28 2017

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

commit 2b38ceb8d26dfd7cd2607935e88ef31a81c38f78
Author: Aleks Totic <atotic@chromium.org>
Date: Thu Dec 28 21:45:02 2017

[LayoutNG] Pass Container() to NGOutOfFlowLayout instead of ContainerBlock()

Fixes external/wpt/css/css-position/position-relative-* DCHECK crashes

Had to modify NGOutOfFlowLayoutPart constructor.

It used to take NGBlockNode to compute scrollbar sizes,
contains_absolute, and contains_fixed.

Containing block can be arbitrary LayoutBoxModelObject with inline blocks.
None of NG*Nodes can be constructed from LayoutBoxModelObject.
=> NGOutOfFlowLayoutPart constructor cannot take NG*Node, but must take
all required LayoutObject properties instead.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I731800feddf5d53a9104f62d9d616f56a6195671
Reviewed-on: https://chromium-review.googlesource.com/845499
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526328}
[modify] https://crrev.com/2b38ceb8d26dfd7cd2607935e88ef31a81c38f78/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/2b38ceb8d26dfd7cd2607935e88ef31a81c38f78/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
[modify] https://crrev.com/2b38ceb8d26dfd7cd2607935e88ef31a81c38f78/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/2b38ceb8d26dfd7cd2607935e88ef31a81c38f78/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.cc
[modify] https://crrev.com/2b38ceb8d26dfd7cd2607935e88ef31a81c38f78/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/2b38ceb8d26dfd7cd2607935e88ef31a81c38f78/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h
[modify] https://crrev.com/2b38ceb8d26dfd7cd2607935e88ef31a81c38f78/third_party/WebKit/Source/core/layout/ng/ng_page_layout_algorithm.cc

Project Member

Comment 36 by bugdroid1@chromium.org, Dec 28 2017

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

commit 4c6ac7360ad3ad406cfeed41b2644718bb6b6369
Author: Aleks Totic <atotic@chromium.org>
Date: Thu Dec 28 22:05:50 2017

[LayoutNG] Relax DCHECK if saturated

This turns two additional crashes into PASS.

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I0c430294a4642a16bb3ed9f48e32f57c4dbb1e8a
Reviewed-on: https://chromium-review.googlesource.com/846024
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526331}
[modify] https://crrev.com/4c6ac7360ad3ad406cfeed41b2644718bb6b6369/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/4c6ac7360ad3ad406cfeed41b2644718bb6b6369/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc

Project Member

Comment 37 by bugdroid1@chromium.org, Dec 28 2017

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

commit 1ba104fbd5e9af68817fbcc88e2a76b654eaaf39
Author: Bruce Dawson <brucedawson@chromium.org>
Date: Thu Dec 28 23:56:28 2017

Revert "[LayoutNG] Pass Container() to NGOutOfFlowLayout instead of ContainerBlock()"

This reverts commit 2b38ceb8d26dfd7cd2607935e88ef31a81c38f78.

Reason for revert: Suspected of causing 176 unexpected failures such as:
http/tests/navigation/timerredirect-frames.html failed unexpectedly (text diff)

Original change's description:
> [LayoutNG] Pass Container() to NGOutOfFlowLayout instead of ContainerBlock()
> 
> Fixes external/wpt/css/css-position/position-relative-* DCHECK crashes
> 
> Had to modify NGOutOfFlowLayoutPart constructor.
> 
> It used to take NGBlockNode to compute scrollbar sizes,
> contains_absolute, and contains_fixed.
> 
> Containing block can be arbitrary LayoutBoxModelObject with inline blocks.
> None of NG*Nodes can be constructed from LayoutBoxModelObject.
> => NGOutOfFlowLayoutPart constructor cannot take NG*Node, but must take
> all required LayoutObject properties instead.
> 
> Bug: 740993
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
> Change-Id: I731800feddf5d53a9104f62d9d616f56a6195671
> Reviewed-on: https://chromium-review.googlesource.com/845499
> Commit-Queue: Aleks Totic <atotic@chromium.org>
> Reviewed-by: Koji Ishii <kojii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#526328}

TBR=kojii@chromium.org,atotic@chromium.org

Change-Id: Ifb9e4eb8efd5207fc5ea2d4dd2d31381eda64e6e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/846242
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526338}
[modify] https://crrev.com/1ba104fbd5e9af68817fbcc88e2a76b654eaaf39/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/1ba104fbd5e9af68817fbcc88e2a76b654eaaf39/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
[modify] https://crrev.com/1ba104fbd5e9af68817fbcc88e2a76b654eaaf39/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/1ba104fbd5e9af68817fbcc88e2a76b654eaaf39/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.cc
[modify] https://crrev.com/1ba104fbd5e9af68817fbcc88e2a76b654eaaf39/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/1ba104fbd5e9af68817fbcc88e2a76b654eaaf39/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h
[modify] https://crrev.com/1ba104fbd5e9af68817fbcc88e2a76b654eaaf39/third_party/WebKit/Source/core/layout/ng/ng_page_layout_algorithm.cc

Project Member

Comment 38 by bugdroid1@chromium.org, Jan 7 2018

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

commit 6dfcfd3b6fbc8966365121a475507c3325231cbb
Author: Aleks Totic <atotic@chromium.org>
Date: Sun Jan 07 16:44:39 2018

Reland "[LayoutNG] Pass Container() to NGOutOfFlowLayout instead of ContainerBlock()"

This is a reland of 2b38ceb8d26dfd7cd2607935e88ef31a81c38f78
Original change's description:
> [LayoutNG] Pass Container() to NGOutOfFlowLayout instead of ContainerBlock()
> 
> Fixes external/wpt/css/css-position/position-relative-* DCHECK crashes
> 
> Had to modify NGOutOfFlowLayoutPart constructor.
> 
> It used to take NGBlockNode to compute scrollbar sizes,
> contains_absolute, and contains_fixed.
> 
> Containing block can be arbitrary LayoutBoxModelObject with inline blocks.
> None of NG*Nodes can be constructed from LayoutBoxModelObject.
> => NGOutOfFlowLayoutPart constructor cannot take NG*Node, but must take
> all required LayoutObject properties instead.
> 
> Bug: 740993
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
> Change-Id: I731800feddf5d53a9104f62d9d616f56a6195671
> Reviewed-on: https://chromium-review.googlesource.com/845499
> Commit-Queue: Aleks Totic <atotic@chromium.org>
> Reviewed-by: Koji Ishii <kojii@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#526328}

Bug: 740993
Change-Id: I707cbb81ebae967c870d65c53a7acbfd225f22c3
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/846459
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527539}
[modify] https://crrev.com/6dfcfd3b6fbc8966365121a475507c3325231cbb/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/6dfcfd3b6fbc8966365121a475507c3325231cbb/third_party/WebKit/Source/core/layout/ng/layout_ng_block_flow.cc
[modify] https://crrev.com/6dfcfd3b6fbc8966365121a475507c3325231cbb/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
[modify] https://crrev.com/6dfcfd3b6fbc8966365121a475507c3325231cbb/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm.cc
[modify] https://crrev.com/6dfcfd3b6fbc8966365121a475507c3325231cbb/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/6dfcfd3b6fbc8966365121a475507c3325231cbb/third_party/WebKit/Source/core/layout/ng/ng_out_of_flow_layout_part.h
[modify] https://crrev.com/6dfcfd3b6fbc8966365121a475507c3325231cbb/third_party/WebKit/Source/core/layout/ng/ng_page_layout_algorithm.cc

Project Member

Comment 40 by bugdroid1@chromium.org, Feb 28 2018

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

commit 2ae8acd553952028b30ef18198fc2dc3f22b7f9b
Author: Aleks Totic <atotic@chromium.org>
Date: Wed Feb 28 18:28:55 2018

[LayoutNG] Fix DCHECK by early return if no results

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I38981d061a410067921984516eb9f1894762e8ca
Reviewed-on: https://chromium-review.googlesource.com/940563
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539892}
[modify] https://crrev.com/2ae8acd553952028b30ef18198fc2dc3f22b7f9b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/2ae8acd553952028b30ef18198fc2dc3f22b7f9b/third_party/WebKit/Source/core/layout/ng/ng_container_fragment_builder.cc

Project Member

Comment 41 by bugdroid1@chromium.org, Mar 14 2018

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

commit 63ef5ab7911026afe081d70f2bc7a98f47c2a281
Author: Aleks Totic <atotic@chromium.org>
Date: Wed Mar 14 23:33:27 2018

Fix abspos DCHECK crash

Bug: 740993
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I88816900bd0b55b6b6d8c5b139a2819ebfa1a9a3
Reviewed-on: https://chromium-review.googlesource.com/963510
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543236}
[modify] https://crrev.com/63ef5ab7911026afe081d70f2bc7a98f47c2a281/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/63ef5ab7911026afe081d70f2bc7a98f47c2a281/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc

Project Member

Comment 42 by bugdroid1@chromium.org, Jun 12 2018

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

commit 8e9f74f8b700dfbb3b7613c0ac96ab51fbcf4c5d
Author: Aleks Totic <atotic@chromium.org>
Date: Tue Jun 12 06:55:31 2018

[LayoutNG] Fix abspos intrinsic width crash

MinMax sizes were not being computed when needed
for min-width or min-height.

Bug: 740993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I5a2cb318acc80255c6416cd28b3c695ea32287ff
Reviewed-on: https://chromium-review.googlesource.com/1096441
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566341}
[modify] https://crrev.com/8e9f74f8b700dfbb3b7613c0ac96ab51fbcf4c5d/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/8e9f74f8b700dfbb3b7613c0ac96ab51fbcf4c5d/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc

Project Member

Comment 44 by bugdroid1@chromium.org, Jun 28 2018

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

commit cfc362075decc975920c8c820967bcd612ee2a13
Author: Aleks Totic <atotic@chromium.org>
Date: Thu Jun 28 23:15:19 2018

[LayoutNG] Fix abspos percentage margins

Margins were being computed incorrectly in abspos_utils.
Margins were not being copied to Legacy.

The tricky part is that if node is using old block layout,
strange margins get computed because of the way we enforce
abspos child size:
SetIsFixedSizeInline
causes block layout to compute margins wrt that fixed size.

The fix is to let Legacy block layout compute margins
incorrectly, and set them to correct values afterwards.

Bug: 740993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I6e9354fdcad0e0703bd35ad849300be9f223f618
Reviewed-on: https://chromium-review.googlesource.com/1119078
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571318}
[modify] https://crrev.com/cfc362075decc975920c8c820967bcd612ee2a13/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/cfc362075decc975920c8c820967bcd612ee2a13/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.cc
[modify] https://crrev.com/cfc362075decc975920c8c820967bcd612ee2a13/third_party/blink/renderer/core/layout/ng/ng_absolute_utils.h
[modify] https://crrev.com/cfc362075decc975920c8c820967bcd612ee2a13/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/cfc362075decc975920c8c820967bcd612ee2a13/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.h

Project Member

Comment 45 by bugdroid1@chromium.org, Jun 30 2018

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

commit db337e1e0d26ffcf70cd51f1bfc2fdcf8fa99699
Author: Aleks Totic <atotic@chromium.org>
Date: Sat Jun 30 07:54:43 2018

[LayoutNG] Rebaseline test correctly

This test's baseline was incorrect. Child's writing mode is influencing
its offset inside parent. IE matches NG rendering.

Bug: 740993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I779db404ca3e4c8960a95e09beaa854294260dca
Reviewed-on: https://chromium-review.googlesource.com/1121247
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571768}
[modify] https://crrev.com/db337e1e0d26ffcf70cd51f1bfc2fdcf8fa99699/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/db337e1e0d26ffcf70cd51f1bfc2fdcf8fa99699/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/db337e1e0d26ffcf70cd51f1bfc2fdcf8fa99699/third_party/WebKit/LayoutTests/fast/writing-mode/table-percent-width-quirk-expected.png
[delete] https://crrev.com/5538ae2c7014de871d041670d77b2acadfc0376d/third_party/WebKit/LayoutTests/virtual/layout_ng/fast/writing-mode/table-percent-width-quirk-expected.txt

Project Member

Comment 46 by bugdroid1@chromium.org, Jul 3

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

commit 1bea478ee2ff443922054cb99f9cd5a9c374ac1f
Author: Aleks Totic <atotic@chromium.org>
Date: Tue Jul 03 00:32:53 2018

[LayoutNG] Fix abspos crash caused by edge conditions

Bug: 740993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Iebb2dea88b6e111893de79e86854d92dcd3932f8
Reviewed-on: https://chromium-review.googlesource.com/1123114
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572054}
[modify] https://crrev.com/1bea478ee2ff443922054cb99f9cd5a9c374ac1f/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/1bea478ee2ff443922054cb99f9cd5a9c374ac1f/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 47 by bugdroid1@chromium.org, Jul 3

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

commit 8f71c40c22da29292639e6acc04c6f97ea04390e
Author: Aleks Totic <atotic@chromium.org>
Date: Tue Jul 03 02:45:13 2018

[LayoutNG] Fix incorrect DCHECK

Bug: 740993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Iec59abf8eef6091655001374be6795aeef87760f
Reviewed-on: https://chromium-review.googlesource.com/1123166
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572088}
[modify] https://crrev.com/8f71c40c22da29292639e6acc04c6f97ea04390e/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/8f71c40c22da29292639e6acc04c6f97ea04390e/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 48 by bugdroid1@chromium.org, Jul 11

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

commit 6835de4bfb66eee37b4fde4e9477f6955571f8c3
Author: Aleks Totic <atotic@chromium.org>
Date: Wed Jul 11 08:06:40 2018

[LayoutNG] fix inline abspos inside container with border

Static position needs to be adjusted based upon block container
padding box, not upon inline container padding box.

Bug: 740993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ib6a5fbb27a56f7a724a52366988cfbd5063d2e36
Reviewed-on: https://chromium-review.googlesource.com/1132532
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574102}
[modify] https://crrev.com/6835de4bfb66eee37b4fde4e9477f6955571f8c3/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/6835de4bfb66eee37b4fde4e9477f6955571f8c3/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 49 by bugdroid1@chromium.org, Jul 12

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

commit f321a196a45bce7d32257d0b93b472dba89e205a
Author: Aleks Totic <atotic@chromium.org>
Date: Thu Jul 12 08:24:12 2018

[LayoutNG] Fix static position for inline containing block

Bug: 740993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Iacdfc2694b2522c06a2512000ed1ca7f043b7541
Reviewed-on: https://chromium-review.googlesource.com/1134386
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574504}
[modify] https://crrev.com/f321a196a45bce7d32257d0b93b472dba89e205a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
[modify] https://crrev.com/f321a196a45bce7d32257d0b93b472dba89e205a/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 50 by bugdroid1@chromium.org, Dec 7

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

commit 249af433d7f20d80d1d9cc225333ead0ef67d47f
Author: Aleks Totic <atotic@chromium.org>
Date: Fri Dec 07 04:49:28 2018

[LayoutNG] DCHECK that inline container is containing block

Bug: 740993
Change-Id: Ie8abce134861f5a5a7cf694225da7073c48ae773
Reviewed-on: https://chromium-review.googlesource.com/c/1321167
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614610}
[modify] https://crrev.com/249af433d7f20d80d1d9cc225333ead0ef67d47f/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc

Project Member

Comment 52 by bugdroid1@chromium.org, Jan 5

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

commit a72679ce5e5aa12bd77bdaa636f00ad5cdc1ca00
Author: Aleks Totic <atotic@chromium.org>
Date: Sat Jan 05 01:50:00 2019

[LayoutNG] OOF inline containing box for continuations

This is a possible way to fix:
external/wpt/css/CSS2/abspos/abspos-in-block-in-inline-in-relpos-inline.html

The problem:
Split inlines generate LayoutTree that looks something like this:
LayoutNGBlockFlow DIV style="height:200px;"
  LayoutNGBlockFlow (anonymous)
    LayoutInline (relative positioned) continuation=0x3c190 SPAN id="containingBlock"
  LayoutNGBlockFlow (anonymous) (relative positioned)
    LayoutNGBlockFlow (positioned) DIV id="target"
  LayoutNGBlockFlow (anonymous)
    LayoutInline (relative positioned) SPAN id="notContainingBlock"
      LayoutInline (relative positioned) 0x3c190 SPAN id="containingBlock"

#target is OOF, with SPAN.#containingBlockOfTarget OOF containing block.

Containing block boundaries are defined by LayoutInline which
is split by continuations into 2 LayoutInline.
Even worse, #target does not have containingBlock in parent chain.

Legacy handles only parts of this problem:
containing block static position, and width are
found by traversing anonymous parent continuation chain.
Location/height of containing LayoutInline are not handled.

I think we can fix this correctly, but it is a little tricky.

Step 1 is to detect when our NGOutOfFlowLayoutPart container is
Anonymous + Relative Position (signal Legacy uses to trigger).
When this happens, we can traverse Anonymous continuation to
find LayoutInline which is the true css container. Then we
let #target bubble to parent, and let parent position it.

Step 2 is positioning by anonymous's parent. This is slightly
different from what we did before, because parent needs to find
inline containing block bounds, but is not ChildrenInline().
Instead, it needs to find those bounds by traversing
anonymous children's lineboxes.

Step 3 is correcting offset generated by NGOutOfFlowLayoutPart::LayoutDescendant
Paint layer expect offset from css containing block, so we generate
that.

This is very much an edge case in our test suite. There are only
3 tests that hit "split inline is a containing block". They all pass now.

Bug: 740993
Change-Id: I694dfa277d6579ee1b775122d8216cfbbad81301
Reviewed-on: https://chromium-review.googlesource.com/c/1374910
Commit-Queue: Aleks Totic <atotic@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620149}
[modify] https://crrev.com/a72679ce5e5aa12bd77bdaa636f00ad5cdc1ca00/third_party/blink/renderer/core/layout/layout_box_model_object.h
[modify] https://crrev.com/a72679ce5e5aa12bd77bdaa636f00ad5cdc1ca00/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.cc
[modify] https://crrev.com/a72679ce5e5aa12bd77bdaa636f00ad5cdc1ca00/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.cc
[modify] https://crrev.com/a72679ce5e5aa12bd77bdaa636f00ad5cdc1ca00/third_party/blink/renderer/core/layout/ng/ng_container_fragment_builder.h
[modify] https://crrev.com/a72679ce5e5aa12bd77bdaa636f00ad5cdc1ca00/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h
[modify] https://crrev.com/a72679ce5e5aa12bd77bdaa636f00ad5cdc1ca00/third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.cc
[modify] https://crrev.com/a72679ce5e5aa12bd77bdaa636f00ad5cdc1ca00/third_party/blink/web_tests/FlagExpectations/enable-blink-features=LayoutNG

Sign in to add a comment