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

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

Issue 2438313003: [LayoutNG] Remove derived constraint spaces from opportunity iterator. (Closed)
Patch Set: address comments. 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_tree_node.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h
index a939933081f7e1cb93f786100d134de5b6136321..eb33d1752b8976f864c11ba9d11e9652d2110844 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_opportunity_tree_node.h
@@ -21,16 +21,14 @@ struct CORE_EXPORT NGLayoutOpportunityTreeNode
// Default constructor.
// Creates a Layout Opportunity tree node that is limited by it's own edge
// from above.
- // @param space Constraint space associated with this node.
- NGLayoutOpportunityTreeNode(const NGConstraintSpace* space);
+ // @param opportunity The layout opportunity for this node.
+ NGLayoutOpportunityTreeNode(const NGLogicalRect opportunity);
// Constructor that creates a node with explicitly set exclusion edge.
- // @param space Constraint space associated with this node.
- // @param exclusion_edge Edge that limits this node's space from above.
- NGLayoutOpportunityTreeNode(NGConstraintSpace* space, NGEdge exclusion_edge);
-
- // Constraint space that is associated with this node.
- Member<const NGConstraintSpace> space;
+ // @param opportunity The layout opportunity for this node.
+ // @param exclusion_edge Edge that limits this node's opportunity from above.
+ NGLayoutOpportunityTreeNode(const NGLogicalRect opportunity,
+ NGEdge exclusion_edge);
// Children of the node.
Member<NGLayoutOpportunityTreeNode> left;
@@ -40,11 +38,14 @@ struct CORE_EXPORT NGLayoutOpportunityTreeNode
// Exclusion that split apart this layout opportunity.
Member<const NGExclusion> exclusion;
+ // The top layout opportunity associated with this node.
+ NGLogicalRect opportunity;
+
// Edge that limits this layout opportunity from above.
NGEdge exclusion_edge;
// Whether this node is a leaf node.
- // The node is a leaf if it doen't have an exclusion that splits it apart.
+ // The node is a leaf if it doesn't have an exclusion that splits it apart.
bool IsLeafNode() const { return !exclusion; }
DECLARE_TRACE();

Powered by Google App Engine
This is Rietveld 408576698