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 56d0fad1e665d019a98e43b8fa0610599e88193c..cbcefad9e042cc2bdc0332c572a84651d18ec117 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 |
@@ -15,8 +15,8 @@ namespace blink { |
NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm( |
PassRefPtr<const ComputedStyle> style, |
- NGBox firstChild) |
- : m_style(style), m_firstChild(firstChild) {} |
+ NGBoxIterator boxIterator) |
+ : m_style(style), m_boxIterator(boxIterator) {} |
NGFragment* NGBlockLayoutAlgorithm::layout( |
const NGConstraintSpace& constraintSpace) { |
@@ -24,10 +24,9 @@ NGFragment* NGBlockLayoutAlgorithm::layout( |
computeInlineSizeForFragment(constraintSpace, *m_style); |
HeapVector<Member<const NGFragmentBase>> childFragments; |
- |
LayoutUnit contentSize; |
- for (NGBox curr = m_firstChild; curr; curr.nextSibling()) { |
- NGFragment* fragment = curr.layout(constraintSpace); |
+ for (NGBox box : m_boxIterator) { |
+ NGFragment* fragment = box.layout(constraintSpace); |
// TODO(layout-ng): Take margins into account |
fragment->setOffset(LayoutUnit(), contentSize); |
contentSize += fragment->blockSize(); |