| Index: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
|
| index 452acc60a06ab40985b40c50a90f3d45c6c0d6bd..e8e441e9c6df3f30ba2eec8463317d67eb9afdec 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
|
| @@ -53,6 +53,8 @@ bool NGBlockLayoutAlgorithm::Layout(const NGConstraintSpace* constraint_space,
|
| content_size_ = border_and_padding_.block_start;
|
|
|
| builder_ = new NGFragmentBuilder(NGPhysicalFragmentBase::FragmentBox);
|
| + builder_->SetDirection(constraint_space->Direction());
|
| + builder_->SetWritingMode(constraint_space->WritingMode());
|
| builder_->SetInlineSize(inline_size).SetBlockSize(block_size);
|
| current_child_ = first_child_;
|
| state_ = kStateChildLayout;
|
| @@ -64,7 +66,9 @@ bool NGBlockLayoutAlgorithm::Layout(const NGConstraintSpace* constraint_space,
|
| if (!current_child_->Layout(constraint_space_for_children_, &fragment))
|
| return false;
|
| NGBoxStrut child_margins = computeMargins(
|
| - *constraint_space_for_children_, *current_child_->Style());
|
| + *constraint_space_for_children_, *current_child_->Style(),
|
| + constraint_space_for_children_->WritingMode(),
|
| + constraint_space_for_children_->Direction());
|
|
|
| LayoutUnit margin_block_start = CollapseMargins(
|
| *constraint_space, child_margins, fragment->MarginStrut());
|
|
|