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

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

Issue 2676533003: [LayoutNG] Convert physical fragments to being RefCounted. (Closed)
Patch Set: address 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_node.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_node.h b/third_party/WebKit/Source/core/layout/ng/ng_block_node.h
index ce674072cb0d116f9b0482ec85a861867eb4ce18..ba92a43821a2e4958cd9c31eee3bfce6ec9055c2 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_node.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_node.h
@@ -33,7 +33,8 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
~NGBlockNode() override;
- NGPhysicalFragment* Layout(NGConstraintSpace* constraint_space) override;
+ RefPtr<NGPhysicalFragment> Layout(
+ NGConstraintSpace* constraint_space) override;
NGBlockNode* NextSibling() override;
LayoutObject* GetLayoutObject() override;
@@ -60,7 +61,7 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
// Runs layout on layout_box_ and creates a fragment for the resulting
// geometry.
- NGPhysicalBoxFragment* RunOldLayout(const NGConstraintSpace&);
+ RefPtr<NGPhysicalBoxFragment> RunOldLayout(const NGConstraintSpace&);
// Called if this is an out-of-flow block which needs to be
// positioned with legacy layout.
@@ -86,7 +87,7 @@ class CORE_EXPORT NGBlockNode final : public NGLayoutInputNode {
// TODO(mstensho): An input node may produce multiple fragments, so this
// should probably be renamed to last_fragment_ or something like that, since
// the last fragment is all we care about when resuming layout.
- Member<NGPhysicalBoxFragment> fragment_;
+ RefPtr<NGPhysicalBoxFragment> fragment_;
};
DEFINE_TYPE_CASTS(NGBlockNode,

Powered by Google App Engine
This is Rietveld 408576698