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