| Index: third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
|
| index a108dbfab7c70003983ec3048c1c2c8eef9c4def..39f878b3a21c9100f73f860e6402037ea706afa8 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
|
| @@ -331,10 +331,12 @@ void NGInlineLayoutAlgorithm::LayoutAndPositionFloat(
|
| NGLogicalOffset origin_offset =
|
| GetOriginPointForFloats(ConstraintSpace(), content_size_);
|
| NGLogicalOffset from_offset = ConstraintSpace().BfcOffset();
|
| - // TODO(glebl): add margins calculation.
|
| - NGBoxStrut margins;
|
| + const ComputedStyle& float_style = node->Style();
|
| + NGBoxStrut margins = ComputeMargins(ConstraintSpace(), float_style,
|
| + ConstraintSpace().WritingMode(),
|
| + ConstraintSpace().Direction());
|
| RefPtr<NGFloatingObject> floating_object = NGFloatingObject::Create(
|
| - node->Style(), float_space->WritingMode(), current_opportunity_.size,
|
| + float_style, float_space->WritingMode(), current_opportunity_.size,
|
| origin_offset, from_offset, margins,
|
| layout_result->PhysicalFragment().get());
|
|
|
|
|