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 15 matching lines...) Expand all Loading... |
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; | 34 ~NGBlockNode() override; |
35 | 35 |
36 bool Layout(const NGConstraintSpace*, NGFragmentBase**) override; | 36 bool Layout(NGConstraintSpace*, NGFragmentBase**) override; |
37 NGBlockNode* NextSibling() override; | 37 NGBlockNode* NextSibling() override; |
38 | 38 |
39 // 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. |
40 // The return value has the same meaning as for Layout. | 40 // The return value has the same meaning as for Layout. |
41 // If the underlying layout algorithm returns NotImplemented from | 41 // If the underlying layout algorithm returns NotImplemented from |
42 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes | 42 // ComputeMinAndMaxContentSizes, this function will synthesize these sizes |
43 // using Layout with special constraint spaces. | 43 // using Layout with special constraint spaces. |
44 // 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 |
45 // ComputeOrSynthesizeMinAndMaxContentSizes (i.e. you have to call Layout | 45 // ComputeOrSynthesizeMinAndMaxContentSizes (i.e. you have to call Layout |
46 // often enough that it returns true before calling | 46 // often enough that it returns true before calling |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 DEFINE_TYPE_CASTS(NGBlockNode, | 91 DEFINE_TYPE_CASTS(NGBlockNode, |
92 NGLayoutInputNode, | 92 NGLayoutInputNode, |
93 node, | 93 node, |
94 node->Type() == NGLayoutInputNode::kLegacyBlock, | 94 node->Type() == NGLayoutInputNode::kLegacyBlock, |
95 node.Type() == NGLayoutInputNode::kLegacyBlock); | 95 node.Type() == NGLayoutInputNode::kLegacyBlock); |
96 | 96 |
97 } // namespace blink | 97 } // namespace blink |
98 | 98 |
99 #endif // NGBlockNode | 99 #endif // NGBlockNode |
OLD | NEW |