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

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

Issue 2346403002: [layoutng] Create correct constraint spaces for children (Closed)
Patch Set: fix assert failures Created 4 years, 3 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_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 1fb3ed7a8ff94e96b543c6f56ced4c6ec4207a46..33c402cf28099818cf1e09141e969ddd70496e88 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
@@ -26,28 +26,35 @@ class CORE_EXPORT NGConstraintSpace final
: public GarbageCollected<NGConstraintSpace> {
public:
// Constructs a constraint space with a new backing NGPhysicalConstraintSpace.
+ // The size will be used for both for the physical constraint space's
+ // container size and this constraint space's Size().
NGConstraintSpace(NGWritingMode, NGDirection, NGLogicalSize);
// Constructs a constraint space based on an existing backing
- // NGPhysicalConstraintSpace.
+ // NGPhysicalConstraintSpace. Sets this constraint space's size to the
+ // physical constraint space's container size, converted to logical
+ // coordinates.
+ // TODO(layout-ng): Do we need this constructor?
NGConstraintSpace(NGWritingMode, NGDirection, NGPhysicalConstraintSpace*);
// Constructs a constraint space with a different NGWritingMode and
- // NGDirection.
+ // NGDirection that's otherwise identical.
NGConstraintSpace(NGWritingMode, NGDirection, const NGConstraintSpace*);
// Constructs a derived constraint space sharing the same backing
- // NGPhysicalConstraintSpace, NGWritingMode and NGDirection.
+ // NGPhysicalConstraintSpace, NGWritingMode and NGDirection. Primarily for use
+ // by NGLayoutOpportunityIterator.
NGConstraintSpace(const NGConstraintSpace& other,
NGLogicalOffset,
NGLogicalSize);
- // Constructs a derived constraint space sharing the same backing
- // NGPhysicalConstraintSpace, a different NGWritingMode and NGDirection.
+ // Constructs a derived constraint space that shares the exclusions of the
+ // input constraint space, but has a different container size, writing mode
+ // and direction. Sets the offset to zero. For use by layout algorithms
+ // to use as the basis to find layout opportunities for children.
NGConstraintSpace(NGWritingMode,
NGDirection,
const NGConstraintSpace& other,
- NGLogicalOffset,
NGLogicalSize);
// This should live on NGBox or another layout bridge and probably take a root

Powered by Google App Engine
This is Rietveld 408576698