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 NGLayoutOpportunityIterator_h | 5 #ifndef NGLayoutOpportunityIterator_h |
6 #define NGLayoutOpportunityIterator_h | 6 #define NGLayoutOpportunityIterator_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "core/layout/ng/ng_constraint_space.h" | |
10 #include "core/layout/ng/ng_layout_opportunity_tree_node.h" | 9 #include "core/layout/ng/ng_layout_opportunity_tree_node.h" |
11 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
12 #include "wtf/Optional.h" | 11 #include "wtf/Optional.h" |
13 #include "wtf/Vector.h" | 12 #include "wtf/Vector.h" |
14 | 13 |
15 namespace blink { | 14 namespace blink { |
16 | 15 |
| 16 class NGConstraintSpace; |
17 typedef NGLogicalRect NGLayoutOpportunity; | 17 typedef NGLogicalRect NGLayoutOpportunity; |
18 typedef Vector<NGLayoutOpportunity> NGLayoutOpportunities; | 18 typedef Vector<NGLayoutOpportunity> NGLayoutOpportunities; |
19 | 19 |
20 class CORE_EXPORT NGLayoutOpportunityIterator final { | 20 class CORE_EXPORT NGLayoutOpportunityIterator final { |
21 STACK_ALLOCATED(); | |
22 | |
23 public: | 21 public: |
24 // Default constructor. | 22 // Default constructor. |
25 // | 23 // |
26 // @param space Constraint space with exclusions for which this iterator needs | 24 // @param space Constraint space with exclusions for which this iterator needs |
27 // to generate layout opportunities. | 25 // to generate layout opportunities. |
28 // @param opt_origin_point Optional origin_point parameter that is used as a | 26 // @param opt_origin_point Optional origin_point parameter that is used as a |
29 // default start point for layout opportunities. | 27 // default start point for layout opportunities. |
30 // @param opt_leader_point Optional 'leader' parameter that is used to specify | 28 // @param opt_leader_point Optional 'leader' parameter that is used to specify |
31 // the ending point of temporary excluded rectangle | 29 // the ending point of temporary excluded rectangle |
32 // which starts from 'origin'. This rectangle may | 30 // which starts from 'origin'. This rectangle may |
(...skipping 21 matching lines...) Expand all Loading... |
54 const NGConstraintSpace* constraint_space_; | 52 const NGConstraintSpace* constraint_space_; |
55 | 53 |
56 NGLayoutOpportunities opportunities_; | 54 NGLayoutOpportunities opportunities_; |
57 NGLayoutOpportunities::const_iterator opportunity_iter_; | 55 NGLayoutOpportunities::const_iterator opportunity_iter_; |
58 Persistent<NGLayoutOpportunityTreeNode> opportunity_tree_root_; | 56 Persistent<NGLayoutOpportunityTreeNode> opportunity_tree_root_; |
59 }; | 57 }; |
60 | 58 |
61 } // namespace blink | 59 } // namespace blink |
62 | 60 |
63 #endif // NGLayoutOpportunityIterator_h | 61 #endif // NGLayoutOpportunityIterator_h |
OLD | NEW |