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

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

Issue 2283233002: [LayoutNG] Construct ConstraintSpace form Physical (Closed)
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698