Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_block_node.cc |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc |
| index bbd61ec7daee402fd6fceb1ae045ec573c505fb3..c7453b9b8acacb8faad562d2adfe4dc9a286ae9f 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_block_node.cc |
| @@ -65,10 +65,11 @@ void FragmentPositionUpdated(const NGPhysicalFragment& fragment) { |
| // Similar to FragmentPositionUpdated but for floats. |
| // - Updates layout object's geometric information. |
| // - Creates legacy FloatingObject and attached it to the provided parent. |
| -void FloatingObjectPositionedUpdated(NGFloatingObject* ng_floating_object, |
| - LayoutBox* parent) { |
| +void FloatingObjectPositionedUpdated( |
| + const NGPositionedFloat& ng_positioned_float, |
|
Gleb Lanbin
2017/05/08 19:03:38
positioned_float or float
ikilpatrick
2017/05/08 19:18:19
Done.
|
| + LayoutBox* parent) { |
| NGPhysicalBoxFragment* box_fragment = |
| - ToNGPhysicalBoxFragment(ng_floating_object->fragment.Get()); |
| + ToNGPhysicalBoxFragment(ng_positioned_float.fragment.Get()); |
| FragmentPositionUpdated(*box_fragment); |
| LayoutBox* layout_box = ToLayoutBox(box_fragment->GetLayoutObject()); |
| @@ -78,7 +79,7 @@ void FloatingObjectPositionedUpdated(NGFloatingObject* ng_floating_object, |
| FloatingObject* floating_object = |
| ToLayoutBlockFlow(parent)->InsertFloatingObject(*layout_box); |
| floating_object->SetIsInPlacedTree(false); |
| - floating_object->SetX(ng_floating_object->left_offset); |
| + floating_object->SetX(ng_positioned_float.left_offset); |
| floating_object->SetY(box_fragment->TopOffset()); |
| floating_object->SetIsPlaced(true); |
| floating_object->SetIsInPlacedTree(true); |
| @@ -302,9 +303,9 @@ void NGBlockNode::CopyFragmentDataToLayoutBox( |
| // We may still have unpositioned floats when we reach the root box. |
| if (!layout_box_->Parent()) { |
| - for (const RefPtr<NGFloatingObject>& floating_object : |
| + for (const NGPositionedFloat& positioned_float : |
| fragment->PositionedFloats()) { |
| - FloatingObjectPositionedUpdated(floating_object.Get(), layout_box_); |
| + FloatingObjectPositionedUpdated(positioned_float, layout_box_); |
| } |
| } |
| @@ -312,11 +313,10 @@ void NGBlockNode::CopyFragmentDataToLayoutBox( |
| if (child_fragment->IsPlaced()) |
| FragmentPositionUpdated(ToNGPhysicalBoxFragment(*child_fragment)); |
| - for (const RefPtr<NGFloatingObject>& floating_object : |
| + for (const NGPositionedFloat& positioned_float : |
| ToNGPhysicalBoxFragment(child_fragment.Get())->PositionedFloats()) { |
| FloatingObjectPositionedUpdated( |
| - floating_object.Get(), |
| - ToLayoutBox(child_fragment->GetLayoutObject())); |
| + positioned_float, ToLayoutBox(child_fragment->GetLayoutObject())); |
| } |
| } |