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

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

Issue 2722763002: [LayoutNG] Switch NGBreakToken to being RefCounted. (Closed)
Patch Set: add comments Created 3 years, 10 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_block_layout_algorithm.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
index f0d9377e4b8e54835bcb130907b068fa7a3e4c7f..249e3f15c70c9791198a20faf3cfb857899eff5c 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.h
@@ -6,6 +6,7 @@
#define NGBlockLayoutAlgorithm_h
#include "core/CoreExport.h"
+#include "core/layout/ng/ng_block_break_token.h"
#include "core/layout/ng/ng_block_node.h"
#include "core/layout/ng/ng_break_token.h"
#include "core/layout/ng/ng_fragment_builder.h"
@@ -33,7 +34,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
// @param break_token The break token from which the layout should start.
NGBlockLayoutAlgorithm(NGBlockNode* node,
NGConstraintSpace* space,
- NGBlockBreakToken* break_token = nullptr);
+ RefPtr<NGBlockBreakToken> break_token = nullptr);
Optional<MinAndMaxContentSizes> ComputeMinAndMaxContentSizes() const override;
RefPtr<NGLayoutResult> Layout() override;
@@ -88,7 +89,7 @@ class CORE_EXPORT NGBlockLayoutAlgorithm : public NGLayoutAlgorithm {
Persistent<NGConstraintSpace> constraint_space_;
// The break token from which we are currently resuming layout.
- Persistent<NGBlockBreakToken> break_token_;
+ RefPtr<NGBlockBreakToken> break_token_;
ikilpatrick 2017/02/28 17:13:13 I could also make this a raw ptr? (and other alg.
std::unique_ptr<NGFragmentBuilder> builder_;
Persistent<NGConstraintSpaceBuilder> space_builder_;

Powered by Google App Engine
This is Rietveld 408576698