| Index: third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc
|
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc
|
| index d1519fd17eed9bf2e2e8a29397d55b479cd937fe..6c4bb884619cbe238524314d64db2891f0541a6a 100644
|
| --- a/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc
|
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_floats_utils.cc
|
| @@ -56,7 +56,8 @@ const NGLayoutOpportunity FindLayoutOpportunityForFragment(
|
| opportunity = opportunity_candidate;
|
| // Checking opportunity's block size is not necessary as a float cannot be
|
| // positioned on top of another float inside of the same constraint space.
|
| - auto fragment_inline_size = fragment.InlineSize() + margins.InlineSum();
|
| + auto fragment_inline_size =
|
| + fragment.Size().inline_size + margins.InlineSum();
|
| if (opportunity.size.inline_size >= fragment_inline_size)
|
| break;
|
|
|
| @@ -97,9 +98,7 @@ NGExclusion CreateExclusion(const NGFragment& fragment,
|
| NGLogicalRect& rect = exclusion.rect;
|
| rect.offset = opportunity.offset;
|
| rect.offset.inline_offset += float_offset;
|
| -
|
| - rect.size.inline_size = fragment.InlineSize() + margins.InlineSum();
|
| - rect.size.block_size = fragment.BlockSize() + margins.BlockSum();
|
| + rect.size = fragment.Size() + margins;
|
| return exclusion;
|
| }
|
|
|
| @@ -136,16 +135,15 @@ NGLogicalOffset PositionFloat(NGFloatingObject* floating_object,
|
| // an empty opportunity can mean 2 things:
|
| // - search for layout opportunities is exhausted.
|
| // - opportunity has an infinite size. That's because CS is infinite.
|
| - opportunity = NGLayoutOpportunity(
|
| - NGLogicalOffset(),
|
| - NGLogicalSize(float_fragment.InlineSize(), float_fragment.BlockSize()));
|
| + opportunity = NGLayoutOpportunity(NGLogicalOffset(), float_fragment.Size());
|
| }
|
|
|
| // Calculate the float offset if needed.
|
| LayoutUnit float_offset;
|
| if (floating_object->exclusion_type == NGExclusion::kFloatRight) {
|
| LayoutUnit float_margin_box_inline_size =
|
| - float_fragment.InlineSize() + floating_object->margins.InlineSum();
|
| + float_fragment.Size().inline_size +
|
| + floating_object->margins.InlineSum();
|
| float_offset = opportunity.size.inline_size - float_margin_box_inline_size;
|
| }
|
|
|
|
|