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

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

Issue 2456973002: [LayoutNG] Move ng_block_layout_algorithm to use constraint space builder. (Closed)
Patch Set: rebase. 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 199fee72ea41e2c4d77e53e584a7bcb198b4330a..89915b93dd19587c520cb0a75d99501a60d83b05 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
@@ -21,18 +21,6 @@ NGConstraintSpace::NGConstraintSpace(NGWritingMode writing_mode,
writing_mode_(writing_mode),
direction_(direction) {}
-NGConstraintSpace::NGConstraintSpace(NGWritingMode writing_mode,
- NGDirection direction,
- const NGConstraintSpace& other,
- NGLogicalSize size)
- : size_(size), writing_mode_(writing_mode), direction_(direction) {
- physical_space_ =
- new NGPhysicalConstraintSpace(size.ConvertToPhysical(writing_mode));
- for (const auto& exclusion : other.PhysicalSpace()->Exclusions()) {
- physical_space_->AddExclusion(exclusion);
- }
-}
-
NGConstraintSpace* NGConstraintSpace::CreateFromLayoutObject(
const LayoutBox& box) {
bool fixed_inline = false, fixed_block = false, is_new_fc = false;
@@ -91,6 +79,10 @@ NGLogicalSize NGConstraintSpace::ContainerSize() const {
static_cast<NGWritingMode>(writing_mode_));
}
+void NGConstraintSpace::SetSize(NGLogicalSize size) {
+ size_ = size;
+}
+
bool NGConstraintSpace::IsNewFormattingContext() const {
return physical_space_->is_new_fc_;
}

Powered by Google App Engine
This is Rietveld 408576698