| 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..56a6008cb7e2155a096f4a0100dbe07da71e35b8 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,22 @@
|
|
|
| #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_layoutBox->clearNeedsLayout();
|
| + NGFragment* fragment = algorithm.layout(constraintSpace);
|
| + m_layoutBox->setLogicalWidth(fragment->inlineSize());
|
| + m_layoutBox->setLogicalHeight(fragment->blockSize());
|
| + return fragment;
|
| }
|
|
|
| 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());
|
| + return m_layoutBox->style();
|
| }
|
|
|
| } // namespace blink
|
|
|