| 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..8543417ed581e8465d1379a2db9ad050ec88a1d9 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,10 @@ 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,
|
| +void FloatingObjectPositionedUpdated(const NGPositionedFloat& positioned_float,
|
| LayoutBox* parent) {
|
| NGPhysicalBoxFragment* box_fragment =
|
| - ToNGPhysicalBoxFragment(ng_floating_object->fragment.Get());
|
| + ToNGPhysicalBoxFragment(positioned_float.fragment.Get());
|
| FragmentPositionUpdated(*box_fragment);
|
|
|
| LayoutBox* layout_box = ToLayoutBox(box_fragment->GetLayoutObject());
|
| @@ -78,7 +78,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(positioned_float.left_offset);
|
| floating_object->SetY(box_fragment->TopOffset());
|
| floating_object->SetIsPlaced(true);
|
| floating_object->SetIsInPlacedTree(true);
|
| @@ -302,9 +302,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 +312,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()));
|
| }
|
| }
|
|
|
|
|