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

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

Issue 2770483002: CS of out-of-flow positioned objects should have is_new_fc == true (Closed)
Patch Set: Created 3 years, 9 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 1974084634b56e33c59333b99bfbadad196081e4..5b39d9bfa5cbe81989974c9a1a67618070aab13a 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
@@ -22,7 +22,8 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(
is_inline_direction_triggers_scrollbar_(false),
is_block_direction_triggers_scrollbar_(false),
fragmentation_type_(parent_space->BlockFragmentationType()),
- is_new_fc_(parent_space->IsNewFormattingContext()),
+ is_new_fc_(false),
+ is_parent_new_fc_(parent_space->IsNewFormattingContext()),
is_anonymous_(false),
text_direction_(static_cast<unsigned>(parent_space->Direction())),
bfc_offset_(parent_space->bfc_offset_),
@@ -39,6 +40,7 @@ NGConstraintSpaceBuilder::NGConstraintSpaceBuilder(NGWritingMode writing_mode)
is_block_direction_triggers_scrollbar_(false),
fragmentation_type_(kFragmentNone),
is_new_fc_(false),
+ is_parent_new_fc_(false),
is_anonymous_(false),
text_direction_(static_cast<unsigned>(TextDirection::kLtr)),
exclusions_(new NGExclusions()) {}
@@ -175,8 +177,7 @@ RefPtr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace(
// Reset things that do not pass the Formatting Context boundary.
std::shared_ptr<NGExclusions> exclusions(
- is_new_fc_ ? std::make_shared<NGExclusions>() : exclusions_);
- NGLogicalOffset bfc_offset = is_new_fc_ ? NGLogicalOffset() : bfc_offset_;
+ is_parent_new_fc_ ? std::make_shared<NGExclusions>() : exclusions_);
ikilpatrick 2017/03/23 16:39:59 yeah i'm not sure that I understand this, exclusio
Gleb Lanbin 2017/03/24 20:10:05 updated based on the offline discussion.
NGMarginStrut margin_strut = is_new_fc_ ? NGMarginStrut() : margin_strut_;
WTF::Optional<LayoutUnit> clearance_offset =
is_new_fc_ ? WTF::nullopt : clearance_offset_;
@@ -191,7 +192,8 @@ RefPtr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace(
is_inline_direction_triggers_scrollbar_,
is_block_direction_triggers_scrollbar_,
static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_,
- is_anonymous_, margin_strut, bfc_offset, exclusions, clearance_offset));
+ is_anonymous_, margin_strut, bfc_offset_, exclusions,
+ clearance_offset));
}
return adoptRef(new NGConstraintSpace(
out_writing_mode, static_cast<TextDirection>(text_direction_),
@@ -201,7 +203,7 @@ RefPtr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace(
is_block_direction_triggers_scrollbar_,
is_inline_direction_triggers_scrollbar_,
static_cast<NGFragmentationType>(fragmentation_type_), is_new_fc_,
- is_anonymous_, 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