Index: third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc |
index 80c877909c1f43faad520520ecb33c2e8f2a44a0..8aae66ee05dfdd52563b6002f1d539bc1fdaf49a 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc |
@@ -131,10 +131,9 @@ const NGLayoutOpportunity FindLayoutOpportunityForFragment( |
NGLogicalOffset adjusted_origin_point = |
AdjustToTopEdgeAlignmentRule(*space, origin_point); |
- NGLayoutOpportunityIterator* opportunity_iter = |
- space->LayoutOpportunities(adjusted_origin_point); |
+ NGLayoutOpportunityIterator opportunity_iter(space, adjusted_origin_point); |
NGLayoutOpportunity opportunity; |
- NGLayoutOpportunity opportunity_candidate = opportunity_iter->Next(); |
+ NGLayoutOpportunity opportunity_candidate = opportunity_iter.Next(); |
while (!opportunity_candidate.IsEmpty()) { |
opportunity = opportunity_candidate; |
@@ -143,7 +142,8 @@ const NGLayoutOpportunity FindLayoutOpportunityForFragment( |
auto fragment_inline_size = fragment.InlineSize() + margins.InlineSum(); |
if (opportunity.size.inline_size >= fragment_inline_size) |
break; |
- opportunity_candidate = opportunity_iter->Next(); |
+ |
+ opportunity_candidate = opportunity_iter.Next(); |
} |
return opportunity; |
} |