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

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

Issue 2954953002: [LayoutNG] Abort a layout once the BFC offset is resolved. (Closed)
Patch Set: ./ 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_fragment_builder.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
index f8cc737256746d1dc8dccb1b1ea71eca21d57307..710c759a42414904c04b7ae47351a310c27f155a 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
@@ -147,12 +147,6 @@ NGFragmentBuilder& NGFragmentBuilder::AddOutOfFlowChildCandidate(
return *this;
}
-NGFragmentBuilder& NGFragmentBuilder::AddUnpositionedFloat(
- RefPtr<NGUnpositionedFloat> unpositioned_float) {
- unpositioned_floats_.push_back(std::move(unpositioned_float));
- return *this;
-}
-
void NGFragmentBuilder::GetAndClearOutOfFlowDescendantCandidates(
Vector<NGOutOfFlowPositionedDescendant>* descendant_candidates) {
DCHECK(descendant_candidates->IsEmpty());
@@ -232,9 +226,16 @@ RefPtr<NGLayoutResult> NGFragmentBuilder::ToBoxFragment() {
children_, positioned_floats_, border_edges_.ToPhysical(writing_mode_),
std::move(break_token)));
- return AdoptRef(
- new NGLayoutResult(std::move(fragment), oof_positioned_descendants_,
- unpositioned_floats_, bfc_offset_, end_margin_strut_));
+ return AdoptRef(new NGLayoutResult(
+ std::move(fragment), oof_positioned_descendants_, unpositioned_floats_,
+ bfc_offset_, end_margin_strut_, NGLayoutResult::kSuccess));
+}
+
+RefPtr<NGLayoutResult> NGFragmentBuilder::Abort(
+ NGLayoutResult::NGLayoutResultStatus status) {
+ return AdoptRef(new NGLayoutResult(
+ nullptr, Vector<NGOutOfFlowPositionedDescendant>(), unpositioned_floats_,
+ bfc_offset_, end_margin_strut_, status));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698