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 |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ec5e82b2e329052b3664cfa46a132f5a86ddf7b8 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_box.cc |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "core/layout/ng/ng_box.h" |
| + |
| +#include "core/layout/LayoutObject.h" |
| +#include "core/layout/ng/ng_block_layout_algorithm.h" |
| + |
| +namespace blink { |
| + |
| +NGFragment* NGBox::layout(const NGConstraintSpace& constraintSpace) { |
| + NGBlockLayoutAlgorithm algorithm(style(), firstChild()); |
| + return algorithm.layout(constraintSpace); |
| +} |
| + |
| +const ComputedStyle* NGBox::style() const { |
| + return m_layoutObject->mutableStyle(); |
|
cbiesinger
2016/08/10 16:21:43
This can now be style()
|
| +} |
| + |
| +const NGBox NGBox::firstChild() const { |
| + return NGBox(m_layoutObject->slowFirstChild()); |
| +} |
| + |
| +const NGBox NGBox::nextSibling() const { |
| + return NGBox(m_layoutObject->nextSibling()); |
| +} |
| + |
| +} // namespace blink |