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

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

Issue 2435803005: Initial implementation of LayoutNG's block layout algorithm for floats. (Closed)
Patch Set: fix PositionFragment's doc, added TODO to fix floats with margins and add more test expectations. Created 4 years, 2 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 131dbb918730e85ec9d65421cd3e883720c14304..7b7904be52113a2524388543339cc93bbe1bcaef 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
@@ -61,7 +61,16 @@ class CORE_EXPORT NGConstraintSpace final
// NGConstraintSpace or a NGPhysicalConstraintSpace.
static NGConstraintSpace* CreateFromLayoutObject(const LayoutBox&);
- NGPhysicalConstraintSpace* PhysicalSpace() const { return physical_space_; }
+ // Mutable Getters.
+ // TODO(layout-dev): remove const constraint from MutablePhysicalSpace method
+ NGPhysicalConstraintSpace* MutablePhysicalSpace() const {
+ return physical_space_;
+ }
+
+ // Read-only Getters.
+ const NGPhysicalConstraintSpace* PhysicalSpace() const {
+ return physical_space_;
+ }
NGDirection Direction() const { return static_cast<NGDirection>(direction_); }
@@ -69,6 +78,11 @@ class CORE_EXPORT NGConstraintSpace final
return static_cast<NGWritingMode>(writing_mode_);
}
+ // Adds the exclusion in the physical constraint space.
+ // Passing the exclusion ignoring the writing mode is fine here since the
+ // exclusion is set in physical coordinates.
+ void AddExclusion(const NGExclusion* exclusion) const;
+
// Size of the container. Used for the following three cases:
// 1) Percentage resolution.
// 2) Resolving absolute positions of children.

Powered by Google App Engine
This is Rietveld 408576698