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 be7236629f3e953921dd7d25078f1b020a646e57..34d28101df0aad9ef5fe89aed4cae9520f30fc38 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 |
@@ -12,15 +12,19 @@ |
namespace blink { |
-NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm(const ComputedStyle* style) |
- : m_style(style) {} |
+NGBlockLayoutAlgorithm::NGBlockLayoutAlgorithm(NGBox box) : m_box(box) {} |
NGFragment* NGBlockLayoutAlgorithm::layout( |
const NGConstraintSpace& constraintSpace) { |
- LayoutUnit inlineSize = valueForLength(m_style->logicalWidth(), |
+ LayoutUnit inlineSize = valueForLength(m_box.style().logicalWidth(), |
constraintSpace.inlineContainerSize()); |
- LayoutUnit blockSize = valueForLength(m_style->logicalHeight(), |
+ LayoutUnit blockSize = valueForLength(m_box.style().logicalHeight(), |
constraintSpace.blockContainerSize()); |
+ |
+ for (NGBox curr = m_box.firstChild(); curr; curr.nextSibling()) { |
+ curr.layout(constraintSpace); |
+ } |
+ |
return new NGFragment(inlineSize, blockSize, inlineSize, blockSize); |
} |