Chromium Code Reviews| 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 e3947244818cd5d27deb316034b61d55fa5e3552..55099c69f7d74be5b030388d65143fefbdf303d8 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 |
| @@ -18,38 +18,39 @@ struct 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) : space(space) { |
| - exclusion_edge.start = space->Offset().inline_offset; |
| - exclusion_edge.end = exclusion_edge.start + space->Size().inline_size; |
| + // @param layout_area The layout area for this node. |
| + NGLayoutOpportunityTreeNode(const NGLogicalRect layout_area) |
| + : layout_area(layout_area) { |
| + exclusion_edge.start = layout_area.offset.inline_offset; |
| + exclusion_edge.end = exclusion_edge.start + layout_area.size.inline_size; |
| } |
| // 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) |
| - : space(space), exclusion_edge(exclusion_edge) {} |
| - |
| - // Constraint space that is associated with this node. |
| - Member<const NGConstraintSpace> space; |
| + NGLayoutOpportunityTreeNode(const NGLogicalRect layout_area, |
| + NGEdge exclusion_edge) |
| + : layout_area(layout_area), exclusion_edge(exclusion_edge) {} |
| // Children of the node. |
| Member<NGLayoutOpportunityTreeNode> left; |
| Member<NGLayoutOpportunityTreeNode> bottom; |
| Member<NGLayoutOpportunityTreeNode> right; |
| - // Exclusion that split apart this layout opportunity. |
| + // Exclusion that split apart this layout area. |
| Member<const NGExclusion> exclusion; |
| - // Edge that limits this layout opportunity from above. |
| + // The top layout area associated with this node. |
| + NGLogicalRect layout_area; |
|
ikilpatrick
2016/10/21 20:24:11
I renamed this area, as if it has an exclusion it
Gleb Lanbin
2016/10/21 21:06:59
how about this
struct NGLayoutOpportunityTreeNode
ikilpatrick
2016/10/21 21:45:27
Renamed back to opportunity for now.
|
| + |
| + // Edge that limits this layout area 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; } |
| DEFINE_INLINE_TRACE() { |
| - visitor->trace(space); |
| visitor->trace(left); |
| visitor->trace(bottom); |
| visitor->trace(right); |