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

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

Issue 2714803002: [LayoutNG] Allow block-flow layout to be fragmented using new approach. (Closed)
Patch Set: rebase. Created 3 years, 10 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_builder.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
index e37eece2f0a9d366f580e8d65f797ad5972357ab..99200f333d10c086e8d65dbd823fcfabaefad482 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
@@ -23,6 +23,7 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(
is_block_direction_triggers_scrollbar_(false),
fragmentation_type_(parent_space->BlockFragmentationType()),
is_new_fc_(parent_space->IsNewFormattingContext()),
+ is_anonymous_(false),
text_direction_(static_cast<unsigned>(parent_space->Direction())),
bfc_offset_(parent_space->bfc_offset_),
exclusions_(parent_space->Exclusions()) {}
@@ -38,6 +39,7 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(NGWritingMode writing_mode)
is_block_direction_triggers_scrollbar_(false),
fragmentation_type_(kFragmentNone),
is_new_fc_(false),
+ is_anonymous_(false),
text_direction_(static_cast<unsigned>(TextDirection::kLtr)),
exclusions_(new NGExclusions()) {}
@@ -129,6 +131,12 @@ NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetIsNewFormattingContext(
return *this;
}
+NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetIsAnonymous(
+ bool is_anonymous) {
+ is_anonymous_ = is_anonymous;
+ return *this;
+}
+
NGConstraintSpace* NGConstraintSpaceBuilder::ToConstraintSpace(
NGWritingMode out_writing_mode) {
// Whether the child and the containing block are parallel to each other.
@@ -183,7 +191,7 @@ NGConstraintSpace* NGConstraintSpaceBuilder::ToConstraintSpace(
is_inline_direction_triggers_scrollbar_,
is_block_direction_triggers_scrollbar_,
static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_,
- margin_strut, bfc_offset, exclusions, clearance_offset);
+ is_anonymous_, margin_strut, bfc_offset, exclusions, clearance_offset);
}
return new NGConstraintSpace(
out_writing_mode, static_cast<TextDirection>(text_direction_),
@@ -193,7 +201,7 @@ NGConstraintSpace* NGConstraintSpaceBuilder::ToConstraintSpace(
is_block_direction_triggers_scrollbar_,
is_inline_direction_triggers_scrollbar_,
static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_,
- margin_strut, bfc_offset, exclusions, clearance_offset);
+ is_anonymous_, margin_strut, bfc_offset, exclusions, clearance_offset);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698