Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h |
| diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h |
| index c98d6f933222e1fa938e8cb7fb6f864066dfbe38..7bd8819f4713e8b9c4ee816df120bbdea41b6246 100644 |
| --- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h |
| +++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.h |
| @@ -27,15 +27,26 @@ class CORE_EXPORT NGConstraintSpace |
| // Constructs a constraint space with a new backing NGPhysicalConstraintSpace. |
| NGConstraintSpace(NGWritingMode writing_mode, NGLogicalSize container_size); |
| + // Constructs a constraint space based on an existing backing |
| + // NGPhysicalConstraintSpace. |
| + NGConstraintSpace(NGWritingMode writing_mode, NGPhysicalConstraintSpace*); |
| + |
| // Constructs a constraint space with a different NGWritingMode. |
| NGConstraintSpace(NGWritingMode writing_mode, |
| const NGConstraintSpace* constraint_space) |
| - : physical_space_(constraint_space->physical_space_), |
| + : physical_space_(constraint_space->PhysicalSpace()), |
| writing_mode_(writing_mode) {} |
| + // TODO: This should either be removed or also take an offset (if we merge |
| + // this with NGDerivedConstraintSpace). |
| NGConstraintSpace(const NGConstraintSpace& other, |
| NGLogicalSize container_size); |
| + NGPhysicalConstraintSpace* PhysicalSpace() const { return physical_space_; } |
|
cbiesinger
2016/08/29 16:37:42
Personally I'd name this PhysicalConstraintSpace b
|
| + NGWritingMode WritingMode() const { |
| + return static_cast<NGWritingMode>(writing_mode_); |
| + } |
| + |
| // Size of the container. Used for the following three cases: |
| // 1) Percentage resolution. |
| // 2) Resolving absolute positions of children. |