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 NGLayoutOpportunityTreeNode_h | 5 #ifndef NGLayoutOpportunityTreeNode_h |
6 #define NGLayoutOpportunityTreeNode_h | 6 #define NGLayoutOpportunityTreeNode_h |
7 | 7 |
8 #include "core/layout/ng/geometry/ng_edge.h" | 8 #include "core/layout/ng/ng_units.h" |
9 #include "core/layout/ng/geometry/ng_logical_rect.h" | |
10 #include "core/layout/ng/ng_exclusion.h" | |
11 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
12 | 10 |
13 namespace blink { | 11 namespace blink { |
14 | 12 |
| 13 |
15 // 3 node R-Tree that represents available space(left, bottom, right) or | 14 // 3 node R-Tree that represents available space(left, bottom, right) or |
16 // layout opportunity after the parent spatial rectangle is split by the | 15 // layout opportunity after the parent spatial rectangle is split by the |
17 // exclusion rectangle. | 16 // exclusion rectangle. |
18 struct CORE_EXPORT NGLayoutOpportunityTreeNode | 17 struct CORE_EXPORT NGLayoutOpportunityTreeNode |
19 : public GarbageCollected<NGLayoutOpportunityTreeNode> { | 18 : public GarbageCollected<NGLayoutOpportunityTreeNode> { |
20 public: | 19 public: |
21 // Default constructor. | 20 // Default constructor. |
22 // Creates a Layout Opportunity tree node that is limited by it's own edge | 21 // Creates a Layout Opportunity tree node that is limited by it's own edge |
23 // from above. | 22 // from above. |
24 // @param opportunity The layout opportunity for this node. | 23 // @param opportunity The layout opportunity for this node. |
(...skipping 21 matching lines...) Expand all Loading... |
46 | 45 |
47 // Whether this node is a leaf node. | 46 // Whether this node is a leaf node. |
48 // The node is a leaf if it doesn't have an exclusion that splits it apart. | 47 // The node is a leaf if it doesn't have an exclusion that splits it apart. |
49 bool IsLeafNode() const { return !exclusion; } | 48 bool IsLeafNode() const { return !exclusion; } |
50 | 49 |
51 DECLARE_TRACE(); | 50 DECLARE_TRACE(); |
52 }; | 51 }; |
53 | 52 |
54 } // namespace blink | 53 } // namespace blink |
55 #endif // NGLayoutOpportunityTreeNode_h | 54 #endif // NGLayoutOpportunityTreeNode_h |
OLD | NEW |