Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NGBox_h | |
| 6 #define NGBox_h | |
| 7 | |
| 8 #include "core/CoreExport.h" | |
| 9 #include "core/layout/LayoutObject.h" | |
| 10 #include "platform/heap/Handle.h" | |
| 11 | |
| 12 namespace blink { | |
| 13 | |
| 14 class NGConstraintSpace; | |
| 15 class NGFragment; | |
|
Gleb Lanbin
2016/08/10 15:35:32
class ComputedStyle;
class LayoutObject;
ikilpatrick
2016/08/10 16:20:29
Done.
| |
| 16 | |
| 17 // Represents a node to be laid out. | |
| 18 class CORE_EXPORT NGBox final { | |
| 19 public: | |
| 20 explicit NGBox(const LayoutObject* layoutObject) | |
| 21 : m_layoutObject(layoutObject) {} | |
| 22 | |
| 23 operator bool() const { return m_layoutObject; } | |
| 24 | |
| 25 NGFragment* layout(const NGConstraintSpace&); | |
| 26 const ComputedStyle& style() const; | |
| 27 | |
| 28 // TODO(layout-ng): Returning a children iterator would be better here. | |
| 29 const NGBox firstChild() const; | |
| 30 const NGBox nextSibling() const; | |
| 31 | |
| 32 private: | |
| 33 const LayoutObject* m_layoutObject; | |
| 34 }; | |
| 35 | |
| 36 } // namespace blink | |
| 37 | |
| 38 #endif // NGBox_h | |
| OLD | NEW |