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

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

Issue 2451553005: Add NGLogicalOrigin and NGLogicalLeader parameters to NGLayoutOpportunityIterator. (Closed)
Patch Set: do not redefine default LayoutOpportunities parameters Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
index e71fffaf89368d3e4a16bb6eeca86c3fd9ce2be3..da9c9432df65902381fd5bc6e512fe43b59c851e 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_iterator.h
@@ -21,9 +21,20 @@ typedef Vector<NGLayoutOpportunity> NGLayoutOpportunities;
class CORE_EXPORT NGLayoutOpportunityIterator final
: public GarbageCollectedFinalized<NGLayoutOpportunityIterator> {
public:
- NGLayoutOpportunityIterator(NGConstraintSpace* space,
- unsigned clear,
- bool for_inline_or_bfc);
+ // Default constructor.
+ //
+ // @param space Constraint space with exclusions for which this iterator needs
+ // to generate layout opportunities.
+ // @param origin_point Optional origin_point parameter that is used as a
+ // default start point for layout opportunities.
+ // @param leader_point Optional 'leader' parameter that is used to specify the
+ // ending point of temporary excluded rectangle which
+ // starts from 'origin'. This rectangle may represent a
+ // text fragment for example.
+ NGLayoutOpportunityIterator(
+ NGConstraintSpace* space,
+ const NGLogicalOrigin origin_point = NGLogicalOrigin(),
+ const NGLogicalLeader leader_point = NGLogicalLeader());
// Gets the next Layout Opportunity or nullptr if the search is exhausted.
// TODO(chrome-layout-team): Refactor with using C++ <iterator> library.
@@ -46,6 +57,8 @@ class CORE_EXPORT NGLayoutOpportunityIterator final
}
Member<NGConstraintSpace> constraint_space_;
+ const NGLogicalOrigin origin_point_;
+ const NGLogicalLeader leader_point_;
NGLayoutOpportunities opportunities_;
NGLayoutOpportunities::const_iterator opportunity_iter_;

Powered by Google App Engine
This is Rietveld 408576698