Use Layout Opportunity Iterator to position new FC blocks

Desktop / Chromium - glebl [chromium.org] - 20 April 2017 00:39 EDT

This patch fixes the use case when we need to use Layout Opportunity Iterator to position a block that establishes a new formatting context.

BUG=635619 TEST=NGBlockLayoutAlgorithmTest.NewFcBlockWithAdjoiningFloatCollapsesMargins

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

c873e80 Use Layout Opportunity Iterator to position new FC blocks.
third_party/WebKit/LayoutTests/TestExpectations | 5 +-
.../layout/ng/inline/ng_inline_layout_algorithm.cc | 8 +-
.../core/layout/ng/ng_block_layout_algorithm.cc | 258 ++++++++++++---------
.../core/layout/ng/ng_block_layout_algorithm.h | 58 ++++-
.../layout/ng/ng_block_layout_algorithm_test.cc | 73 +++++-
.../Source/core/layout/ng/ng_floating_object.h | 5 +
.../Source/core/layout/ng/ng_floats_utils.cc | 59 ++---
.../WebKit/Source/core/layout/ng/ng_floats_utils.h | 10 +-
.../Source/core/layout/ng/ng_fragment_builder.cc | 19 +-
.../Source/core/layout/ng/ng_fragment_builder.h | 9 +-
.../Source/core/layout/ng/ng_layout_algorithm.h | 1 +
.../Source/core/layout/ng/ng_layout_input_node.h | 4 +-
.../layout/ng/ng_layout_opportunity_iterator.cc | 22 ++
.../layout/ng/ng_layout_opportunity_iterator.h | 8 +
14 files changed, 349 insertions(+), 190 deletions(-)

Upstream: git.chromium.org


  • Share