Commit 991fc690 authored by Morten Stenshorne's avatar Morten Stenshorne Committed by Commit Bot

[LayoutNG] FinishLayout() doesn't need all those arguments.

Change-Id: Iae482240741fd096e42df9b842dbfbca146e0070
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1677055
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672651}
parent 0faea2dd
......@@ -344,7 +344,7 @@ NGBlockLayoutAlgorithm::LayoutWithInlineChildLayoutContext() {
inline scoped_refptr<const NGLayoutResult> NGBlockLayoutAlgorithm::Layout(
NGInlineChildLayoutContext* inline_child_layout_context) {
LogicalSize border_box_size = container_builder_.InitialBorderBoxSize();
const LogicalSize border_box_size = container_builder_.InitialBorderBoxSize();
child_available_size_ =
ShrinkAvailableSize(border_box_size, border_scrollbar_padding_);
......@@ -528,16 +528,12 @@ inline scoped_refptr<const NGLayoutResult> NGBlockLayoutAlgorithm::Layout(
// To save space of the stack when we recurse into children, the rest of this
// function is continued within |FinishLayout|. However it should be read as
// one function.
return FinishLayout(&previous_inflow_position, border_box_size,
container_builder_.Borders(),
container_builder_.Scrollbar());
return FinishLayout(&previous_inflow_position);
}
scoped_refptr<const NGLayoutResult> NGBlockLayoutAlgorithm::FinishLayout(
NGPreviousInflowPosition* previous_inflow_position,
LogicalSize border_box_size,
const NGBoxStrut& borders,
const NGBoxStrut& scrollbars) {
NGPreviousInflowPosition* previous_inflow_position) {
LogicalSize border_box_size = container_builder_.InitialBorderBoxSize();
NGMarginStrut end_margin_strut = previous_inflow_position->margin_strut;
// If the current layout is a new formatting context, we need to encapsulate
......@@ -676,7 +672,9 @@ scoped_refptr<const NGLayoutResult> NGBlockLayoutAlgorithm::FinishLayout(
// layout.
if (!container_builder_.AdjoiningFloatTypes() ||
ConstraintSpace().ForcedBfcBlockOffset()) {
NGOutOfFlowLayoutPart(Node(), ConstraintSpace(), borders + scrollbars,
NGBoxStrut borders_and_scrollbars =
container_builder_.Borders() + container_builder_.Scrollbar();
NGOutOfFlowLayoutPart(Node(), ConstraintSpace(), borders_and_scrollbars,
&container_builder_)
.Run();
}
......
......@@ -66,11 +66,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm
inline scoped_refptr<const NGLayoutResult> Layout(
NGInlineChildLayoutContext* inline_child_layout_context);
scoped_refptr<const NGLayoutResult> FinishLayout(
NGPreviousInflowPosition*,
LogicalSize border_box_size,
const NGBoxStrut& borders,
const NGBoxStrut& scrollbars);
scoped_refptr<const NGLayoutResult> FinishLayout(NGPreviousInflowPosition*);
// Return the BFC block offset of this block.
LayoutUnit BfcBlockOffset() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment