OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NGBlockNode_h | 5 #ifndef NGBlockNode_h |
6 #define NGBlockNode_h | 6 #define NGBlockNode_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_layout_input_node.h" | 9 #include "core/layout/ng/ng_layout_input_node.h" |
10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // Represents a node to be laid out. | 24 // Represents a node to be laid out. |
25 class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode { | 25 class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode { |
26 friend NGLayoutInputNode; | 26 friend NGLayoutInputNode; |
27 | 27 |
28 public: | 28 public: |
29 explicit NGBlockNode(LayoutObject*); | 29 explicit NGBlockNode(LayoutObject*); |
30 | 30 |
31 // TODO(layout-ng): make it private and declare a friend class to use in tests | 31 // TODO(layout-ng): make it private and declare a friend class to use in tests |
32 explicit NGBlockNode(ComputedStyle*); | 32 explicit NGBlockNode(ComputedStyle*); |
33 | 33 |
| 34 ~NGBlockNode() override; |
| 35 |
34 bool Layout(const NGConstraintSpace*, NGFragmentBase**) override; | 36 bool Layout(const NGConstraintSpace*, NGFragmentBase**) override; |
35 NGBlockNode* NextSibling() override; | 37 NGBlockNode* NextSibling() override; |
36 | 38 |
37 // Computes the value of min-content and max-content for this box. | 39 // Computes the value of min-content and max-content for this box. |
38 // The return value has the same meaning as for Layout. | 40 // The return value has the same meaning as for Layout. |
39 // If the underlying layout algorithm returns NotImplemented from | 41 // If the underlying layout algorithm returns NotImplemented from |
40 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes | 42 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes |
41 // using Layout with special constraint spaces. | 43 // using Layout with special constraint spaces. |
42 // It is not legal to interleave a pending Layout() with a pending | 44 // It is not legal to interleave a pending Layout() with a pending |
43 // ComputeOrSynthesizeMinAndMaxContentSizes (i.e. you have to call Layout | 45 // ComputeOrSynthesizeMinAndMaxContentSizes (i.e. you have to call Layout |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 87 |
86 DEFINE_TYPE_CASTS(NGBlockNode, | 88 DEFINE_TYPE_CASTS(NGBlockNode, |
87 NGLayoutInputNode, | 89 NGLayoutInputNode, |
88 node, | 90 node, |
89 node->Type() == NGLayoutInputNode::kLegacyBlock, | 91 node->Type() == NGLayoutInputNode::kLegacyBlock, |
90 node.Type() == NGLayoutInputNode::kLegacyBlock); | 92 node.Type() == NGLayoutInputNode::kLegacyBlock); |
91 | 93 |
92 } // namespace blink | 94 } // namespace blink |
93 | 95 |
94 #endif // NGBlockNode | 96 #endif // NGBlockNode |
OLD | NEW |