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

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

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_inline_layout_algorithm.cc
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
index e308c50c47badf1c7b760b207758e4ce61c39be2..48368d759c63512f4efc2a5540284525e641706e 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_inline_layout_algorithm.cc
@@ -32,7 +32,7 @@ NGInlineLayoutAlgorithm::NGInlineLayoutAlgorithm(
DCHECK(style_);
}
-NGPhysicalFragment* NGInlineLayoutAlgorithm::Layout() {
+RefPtr<NGPhysicalFragment> NGInlineLayoutAlgorithm::Layout() {
// TODO(kojii): Implement sizing and child constraint spaces. Share common
// logic with NGBlockLayoutAlgorithm using composition.
builder_->SetWritingMode(constraint_space_->WritingMode());
@@ -48,8 +48,8 @@ NGPhysicalFragment* NGInlineLayoutAlgorithm::Layout() {
line_builder = new NGLineBuilder(current_child, space_for_current_child);
current_child->LayoutInline(space_for_current_child, line_builder);
}
- line_builder->CreateFragments(builder_);
- NGPhysicalFragment* fragment = builder_->ToBoxFragment();
+ line_builder->CreateFragments(builder_.get());
+ RefPtr<NGPhysicalFragment> fragment = builder_->ToBoxFragment();
line_builder->CopyFragmentDataToLayoutBlockFlow();
return fragment;
}

Powered by Google App Engine
This is Rietveld 408576698