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

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

Issue 2483683003: [LayoutNG] Split apart storage for AvailableSize and PercentageSize. (Closed)
Patch Set: rebase. Created 4 years, 1 month 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 184b0a25c005b52aed84768b5a3327a4eacf4773..df55a93fa8b6c0e2558037540602fcaac2f2bb99 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
@@ -28,7 +28,7 @@ class CORE_EXPORT NGConstraintSpace final
public:
// Constructs a constraint space based on an existing backing
// NGPhysicalConstraintSpace. Sets this constraint space's size to the
- // physical constraint space's container size, converted to logical
+ // physical constraint space's available size, converted to logical
// coordinates.
NGConstraintSpace(NGWritingMode, NGDirection, NGPhysicalConstraintSpace*);
@@ -64,20 +64,20 @@ class CORE_EXPORT NGConstraintSpace final
// exclusion is set in physical coordinates.
void AddExclusion(const NGLogicalRect& exclusion) const;
- // Size of the container. Used for the following three cases:
- // 1) Percentage resolution.
- // 2) Resolving absolute positions of children.
- // 3) Defining the threshold that triggers the presence of a scrollbar. Only
- // applies if the corresponding scrollbarTrigger flag has been set for the
- // direction.
- NGLogicalSize ContainerSize() const;
+ // The size to use for percentage resolution.
+ // See: https://drafts.csswg.org/css-sizing/#percentage-sizing
+ NGLogicalSize PercentageResolutionSize() const;
+
+ // The available space size.
+ // See: https://drafts.csswg.org/css-sizing/#available
+ NGLogicalSize AvailableSize() const;
// Offset relative to the root constraint space.
NGLogicalOffset Offset() const { return offset_; }
void SetOffset(const NGLogicalOffset& offset) { offset_ = offset; }
// Returns the effective size of the constraint space. Equal to the
- // ContainerSize() for the root constraint space but derived constraint spaces
+ // AvailableSize() for the root constraint space but derived constraint spaces
// return the size of the layout opportunity.
virtual NGLogicalSize Size() const { return size_; }
void SetSize(const NGLogicalSize& size) { size_ = size; }
@@ -86,7 +86,7 @@ class CORE_EXPORT NGConstraintSpace final
// Formatting Context.
bool IsNewFormattingContext() const;
- // Whether exceeding the containerSize triggers the presence of a scrollbar
+ // Whether exceeding the AvailableSize() triggers the presence of a scrollbar
// for the indicated direction.
// If exceeded the current layout should be aborted and invoked again with a
// constraint space modified to reserve space for a scrollbar.
« no previous file with comments | « third_party/WebKit/Source/core/layout/ng/ng_box.cc ('k') | 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