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

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

Issue 2954953002: [LayoutNG] Abort a layout once the BFC offset is resolved. (Closed)
Patch Set: rebase. Created 3 years, 5 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 89880d1b61e48c78c4cfa3ce729b72c148561fc0..39b0537bd317058cbf53c35696ed67c819a4b42b 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
@@ -145,7 +145,7 @@ NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetIsAnonymous(
NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetUnpositionedFloats(
Vector<RefPtr<NGUnpositionedFloat>>& unpositioned_floats) {
- unpositioned_floats_.swap(unpositioned_floats);
+ unpositioned_floats_ = unpositioned_floats;
return *this;
}
@@ -210,10 +210,10 @@ RefPtr<NGConstraintSpace> NGConstraintSpaceBuilder::ToConstraintSpace(
WTF::Optional<NGLogicalOffset> floats_bfc_offset =
is_new_fc_ ? WTF::nullopt : floats_bfc_offset_;
- // The inline_offsets of the bfc_offset and floats_bfc_offset should match.
- if (floats_bfc_offset)
- DCHECK_EQ(bfc_offset.inline_offset,
- floats_bfc_offset.value().inline_offset);
+ if (floats_bfc_offset) {
+ floats_bfc_offset = NGLogicalOffset(
+ {bfc_offset.inline_offset, floats_bfc_offset.value().block_offset});
+ }
if (is_in_parallel_flow) {
return AdoptRef(new NGConstraintSpace(

Powered by Google App Engine
This is Rietveld 408576698