Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_box.cc |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_box.cc b/third_party/WebKit/Source/core/layout/ng/ng_box.cc |
| index 7f8a30fa105500bd6dd3abbdf290f4cbd5451c08..54c6bcd73db420c7a9a1efccb1ba26bbd5791a67 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_box.cc |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_box.cc |
| @@ -6,24 +6,23 @@ |
| #include "core/layout/LayoutObject.h" |
| #include "core/layout/ng/ng_block_layout_algorithm.h" |
| +#include "core/layout/ng/ng_fragment.h" |
| +#include "core/layout/LayoutBox.h" |
| namespace blink { |
| NGFragment* NGBox::layout(const NGConstraintSpace& constraintSpace) { |
| - NGBlockLayoutAlgorithm algorithm(style(), firstChild()); |
| - return algorithm.layout(constraintSpace); |
| + NGBlockLayoutAlgorithm algorithm(style(), iterator()); |
| + m_layoutObject->clearNeedsLayout(); |
| + NGFragment* fragement = algorithm.layout(constraintSpace); |
| + DCHECK(m_layoutObject->isBox()); |
| + toLayoutBox(m_layoutObject)->setLogicalWidth(fragement->inlineSize()); |
|
eae
2016/08/11 15:40:49
We probably want to add a fragment->size method an
Gleb Lanbin
2016/08/11 16:08:16
Acknowledged.
|
| + toLayoutBox(m_layoutObject)->setLogicalHeight(fragement->blockSize()); |
| + return fragement; |
| } |
| const ComputedStyle* NGBox::style() const { |
| return m_layoutObject->style(); |
| } |
| -const NGBox NGBox::firstChild() const { |
| - return NGBox(m_layoutObject->slowFirstChild()); |
| -} |
| - |
| -const NGBox NGBox::nextSibling() const { |
| - return NGBox(m_layoutObject->nextSibling()); |
| -} |
| - |
| } // namespace blink |