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

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

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.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
index 460f4372fed583967dd8f3eb6585528e11a0ec8f..92aa92c639408922b7e93c3307bddcb14994aaac 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space.cc
@@ -31,7 +31,7 @@ NGConstraintSpace::NGConstraintSpace(NGWritingMode writing_mode,
NGConstraintSpace::NGConstraintSpace(NGWritingMode writing_mode,
NGDirection direction,
const NGConstraintSpace* constraint_space)
- : physical_space_(constraint_space->PhysicalSpace()),
+ : physical_space_(constraint_space->MutablePhysicalSpace()),
offset_(constraint_space->Offset()),
size_(constraint_space->Size()),
writing_mode_(writing_mode),
@@ -40,7 +40,7 @@ NGConstraintSpace::NGConstraintSpace(NGWritingMode writing_mode,
NGConstraintSpace::NGConstraintSpace(const NGConstraintSpace& other,
NGLogicalOffset offset,
NGLogicalSize size)
- : physical_space_(other.PhysicalSpace()),
+ : physical_space_(other.MutablePhysicalSpace()),
offset_(offset),
size_(size),
writing_mode_(other.WritingMode()),
@@ -101,6 +101,10 @@ NGConstraintSpace* NGConstraintSpace::CreateFromLayoutObject(
return derived_constraint_space;
}
+void NGConstraintSpace::AddExclusion(const NGExclusion* exclusion) const {
+ MutablePhysicalSpace()->AddExclusion(exclusion);
+}
+
NGLogicalSize NGConstraintSpace::ContainerSize() const {
return physical_space_->container_size_.ConvertToLogical(
static_cast<NGWritingMode>(writing_mode_));

Powered by Google App Engine
This is Rietveld 408576698