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

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: 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_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 edf3598f0f9c165e62563e049e9b4d4ca4961d4b..d5622b2c6a2735efec3ebbb4a582ac30f7e4af50 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
@@ -148,12 +148,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());
@@ -239,9 +233,16 @@ RefPtr<NGLayoutResult> NGFragmentBuilder::ToBoxFragment() {
children_, positioned_floats_, baselines_,
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