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

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

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.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
index 5ea85591fb6a755835df5cda15452d82510f5f2c..8dc1948a602e03887943597135b898ec5a1278a0 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.h
@@ -9,6 +9,7 @@
#include "core/layout/ng/inline/ng_physical_text_fragment.h"
#include "core/layout/ng/ng_break_token.h"
#include "core/layout/ng/ng_constraint_space.h"
+#include "core/layout/ng/ng_layout_result.h"
#include "core/layout/ng/ng_out_of_flow_positioned_descendant.h"
#include "core/layout/ng/ng_physical_fragment.h"
#include "core/layout/ng/ng_positioned_float.h"
@@ -17,8 +18,6 @@
namespace blink {
-class NGLayoutResult;
-
class CORE_EXPORT NGFragmentBuilder final {
DISALLOW_NEW();
@@ -49,9 +48,6 @@ class CORE_EXPORT NGFragmentBuilder final {
NGFragmentBuilder& SetBfcOffset(const NGLogicalOffset& offset);
- NGFragmentBuilder& AddUnpositionedFloat(
- RefPtr<NGUnpositionedFloat> unpositioned_float);
-
// Builder has non-trivial out-of-flow descendant methods.
// These methods are building blocks for implementation of
// out-of-flow descendants by layout algorithms.
@@ -106,18 +102,13 @@ class CORE_EXPORT NGFragmentBuilder final {
// Creates the fragment. Can only be called once.
RefPtr<NGLayoutResult> ToBoxFragment();
- Vector<RefPtr<NGPhysicalFragment>>& MutableChildren() { return children_; }
+ RefPtr<NGLayoutResult> Abort(NGLayoutResult::NGLayoutResultStatus);
Vector<NGLogicalOffset>& MutableOffsets() { return offsets_; }
- // Mutable list of floats that need to be positioned.
- Vector<RefPtr<NGUnpositionedFloat>>& MutableUnpositionedFloats() {
- return unpositioned_floats_;
- }
-
- // List of floats that need to be positioned.
- const Vector<RefPtr<NGUnpositionedFloat>>& UnpositionedFloats() const {
- return unpositioned_floats_;
+ void SwapUnpositionedFloats(
+ Vector<RefPtr<NGUnpositionedFloat>>* unpositioned_floats) {
+ unpositioned_floats_.swap(*unpositioned_floats);
}
const WTF::Optional<NGLogicalOffset>& BfcOffset() const {

Powered by Google App Engine
This is Rietveld 408576698