Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Side by Side Diff: third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h

Issue 2477843002: Revert of Add support of leader_point in NGLayoutOpportunityIterator. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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" 9 #include "core/layout/ng/ng_constraint_space.h"
10 #include "core/layout/ng/ng_layout_opportunity_tree_node.h" 10 #include "core/layout/ng/ng_layout_opportunity_tree_node.h"
(...skipping 15 matching lines...) Expand all
26 // @param space Constraint space with exclusions for which this iterator needs 26 // @param space Constraint space with exclusions for which this iterator needs
27 // to generate layout opportunities. 27 // to generate layout opportunities.
28 // @param origin_point Optional origin_point parameter that is used as a 28 // @param origin_point Optional origin_point parameter that is used as a
29 // default start point for layout opportunities. 29 // default start point for layout opportunities.
30 // @param leader_point Optional 'leader' parameter that is used to specify the 30 // @param leader_point Optional 'leader' parameter that is used to specify the
31 // ending point of temporary excluded rectangle which 31 // ending point of temporary excluded rectangle which
32 // starts from 'origin'. This rectangle may represent a 32 // starts from 'origin'. This rectangle may represent a
33 // text fragment for example. 33 // text fragment for example.
34 NGLayoutOpportunityIterator( 34 NGLayoutOpportunityIterator(
35 NGConstraintSpace* space, 35 NGConstraintSpace* space,
36 const NGLogicalOffset& origin_point = NGLogicalOffset(), 36 const NGLogicalOffset origin_point = NGLogicalOffset(),
37 const NGLogicalOffset& leader_point = NGLogicalOffset()); 37 const NGLogicalOffset leader_point = NGLogicalOffset());
38 38
39 // Gets the next Layout Opportunity or nullptr if the search is exhausted. 39 // Gets the next Layout Opportunity or nullptr if the search is exhausted.
40 // TODO(chrome-layout-team): Refactor with using C++ <iterator> library. 40 // TODO(chrome-layout-team): Refactor with using C++ <iterator> library.
41 const NGLayoutOpportunity Next(); 41 const NGLayoutOpportunity Next();
42 42
43 DEFINE_INLINE_VIRTUAL_TRACE() { 43 DEFINE_INLINE_VIRTUAL_TRACE() {
44 visitor->trace(constraint_space_); 44 visitor->trace(constraint_space_);
45 visitor->trace(opportunity_tree_root_); 45 visitor->trace(opportunity_tree_root_);
46 } 46 }
47 47
48 private: 48 private:
49 // Mutable Getters. 49 // Mutable Getters.
50 NGLayoutOpportunityTreeNode* MutableOpportunityTreeRoot() { 50 NGLayoutOpportunityTreeNode* MutableOpportunityTreeRoot() {
51 return opportunity_tree_root_.get(); 51 return opportunity_tree_root_.get();
52 } 52 }
53 53
54 // Read-only Getters. 54 // Read-only Getters.
55 const NGLayoutOpportunityTreeNode* OpportunityTreeRoot() const { 55 const NGLayoutOpportunityTreeNode* OpportunityTreeRoot() const {
56 return opportunity_tree_root_.get(); 56 return opportunity_tree_root_.get();
57 } 57 }
58 58
59 Member<NGConstraintSpace> constraint_space_; 59 Member<NGConstraintSpace> constraint_space_;
60 const NGLogicalOffset leader_point_;
60 61
61 NGLayoutOpportunities opportunities_; 62 NGLayoutOpportunities opportunities_;
62 NGLayoutOpportunities::const_iterator opportunity_iter_; 63 NGLayoutOpportunities::const_iterator opportunity_iter_;
63 Member<NGLayoutOpportunityTreeNode> opportunity_tree_root_; 64 Member<NGLayoutOpportunityTreeNode> opportunity_tree_root_;
64 }; 65 };
65 66
66 } // namespace blink 67 } // namespace blink
67 68
68 #endif // NGLayoutOpportunityIterator_h 69 #endif // NGLayoutOpportunityIterator_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698