| Index: third_party/WebKit/Source/core/layout/ng/ng_box.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_box.cc b/third_party/WebKit/Source/core/layout/ng/ng_box.cc
|
| index 3b628478e2967cf451e9567814fb6b3dd5be630d..482f2f40c237d835fb48fa013864594ec0ab4d73 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_box.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_box.cc
|
| @@ -34,7 +34,8 @@ bool NGBox::Layout(const NGConstraintSpace* constraint_space,
|
| algorithm_ = new NGBlockLayoutAlgorithm(Style(), FirstChild());
|
| // Change the coordinate system of the constraint space.
|
| NGConstraintSpace* child_constraint_space = new NGConstraintSpace(
|
| - FromPlatformWritingMode(Style()->getWritingMode()), constraint_space);
|
| + FromPlatformWritingMode(Style()->getWritingMode()),
|
| + FromPlatformDirection(Style()->direction()), constraint_space);
|
|
|
| NGPhysicalFragment* fragment = nullptr;
|
| if (!algorithm_->Layout(child_constraint_space, &fragment))
|
| @@ -83,10 +84,14 @@ bool NGBox::Layout(const NGConstraintSpace* constraint_space,
|
| }
|
| LayoutRect overflow = layout_box_->layoutOverflowRect();
|
| // TODO(layout-ng): This does not handle writing modes correctly (for
|
| - // overflow & the enums)
|
| + // overflow)
|
| NGFragmentBuilder builder(NGPhysicalFragmentBase::FragmentBox);
|
| builder.SetInlineSize(layout_box_->logicalWidth())
|
| .SetBlockSize(layout_box_->logicalHeight())
|
| + .SetDirection(
|
| + FromPlatformDirection(layout_box_->styleRef().direction()))
|
| + .SetWritingMode(
|
| + FromPlatformWritingMode(layout_box_->styleRef().getWritingMode()))
|
| .SetInlineOverflow(overflow.width())
|
| .SetBlockOverflow(overflow.height());
|
| fragment_ = builder.ToFragment();
|
|
|