[LayoutNG] Abort a layout once the BFC offset is resolved

Desktop / Chromium - ikilpatrick [chromium.org] - 12 July 2017 15:49 EDT

This patch allows layouts to "abort" if they have resolved their BFC offset.

This occurs when there is a previous sibling which has an unpositioned float inside of it. We resolve the BFC offset, then abort the layout up to the point where we can begin the relayout (a parent which knows its BFC offset).

The algorithm in this state works exactly as before, except that floats are positioned at their calculated BFC offset.

BUG=635619

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

f905d51 [LayoutNG] Abort a layout once the BFC offset is resolved.
third_party/WebKit/LayoutTests/TestExpectations | 40 +--
.../WebKit/Source/core/layout/LayoutBlockFlow.h | 6 +-
.../layout/ng/inline/ng_inline_layout_algorithm.cc | 40 ++-
.../layout/ng/inline/ng_inline_layout_algorithm.h | 1 +
.../Source/core/layout/ng/inline/ng_inline_node.cc | 11 +-
.../core/layout/ng/inline/ng_line_breaker.cc | 29 +-
.../Source/core/layout/ng/inline/ng_line_breaker.h | 2 +
.../core/layout/ng/inline/ng_line_breaker_test.cc | 5 +-
.../core/layout/ng/ng_block_layout_algorithm.cc | 360 ++++++++++++++-------
.../core/layout/ng/ng_block_layout_algorithm.h | 63 ++--
.../layout/ng/ng_block_layout_algorithm_test.cc | 33 +-
.../WebKit/Source/core/layout/ng/ng_block_node.cc | 25 +-
.../Source/core/layout/ng/ng_constraint_space.cc | 11 +-
.../Source/core/layout/ng/ng_constraint_space.h | 2 +-
.../core/layout/ng/ng_constraint_space_builder.cc | 10 +-
.../WebKit/Source/core/layout/ng/ng_fragment.h | 3 +
.../Source/core/layout/ng/ng_fragment_builder.cc | 19 +-
.../Source/core/layout/ng/ng_fragment_builder.h | 19 +-
.../Source/core/layout/ng/ng_layout_result.cc | 6 +-
.../Source/core/layout/ng/ng_layout_result.h | 17 +-
20 files changed, 456 insertions(+), 246 deletions(-)

Upstream: git.chromium.org


  • Share