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_fragment_builder.cc

Issue 2752123002: [LayoutNG] Move NGFloatingObject off Oilpan (Closed)
Patch Set: Created 3 years, 9 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 cabf376d5f97b497efb1cfb7f51d2f62a435872e..7b6ee16e7fcdec0a99de0e7a1d760899327313b5 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
@@ -91,7 +91,7 @@ NGFragmentBuilder& NGFragmentBuilder::AddChild(
}
NGFragmentBuilder& NGFragmentBuilder::AddFloatingObject(
- NGFloatingObject* floating_object,
+ RefPtr<NGFloatingObject> floating_object,
const NGLogicalOffset& floating_object_offset) {
positioned_floats_.push_back(floating_object);
floating_object_offsets_.push_back(floating_object_offset);
@@ -173,7 +173,7 @@ RefPtr<NGLayoutResult> NGFragmentBuilder::ToBoxFragment() {
writing_mode_, direction_, physical_size, child->Size()));
}
- Vector<Persistent<NGFloatingObject>> positioned_floats;
+ Vector<RefPtr<NGFloatingObject>> positioned_floats;
ikilpatrick 2017/03/15 22:45:40 not sure why this exists? :)
Gleb Lanbin 2017/03/15 23:24:25 Done.
positioned_floats.reserveCapacity(positioned_floats_.size());
RefPtr<NGBreakToken> break_token;
@@ -185,7 +185,7 @@ RefPtr<NGLayoutResult> NGFragmentBuilder::ToBoxFragment() {
}
for (size_t i = 0; i < positioned_floats_.size(); ++i) {
- Persistent<NGFloatingObject>& floating_object = positioned_floats_[i];
+ RefPtr<NGFloatingObject>& floating_object = positioned_floats_[i];
NGPhysicalFragment* floating_fragment = floating_object->fragment.get();
floating_fragment->SetOffset(floating_object_offsets_[i].ConvertToPhysical(
writing_mode_, direction_, physical_size, floating_fragment->Size()));
@@ -210,9 +210,6 @@ RefPtr<NGPhysicalTextFragment> NGFragmentBuilder::ToTextFragment(
DCHECK(children_.isEmpty());
DCHECK(offsets_.isEmpty());
- Vector<Persistent<NGFloatingObject>> empty_unpositioned_floats;
- Vector<Persistent<NGFloatingObject>> empty_positioned_floats;
-
return adoptRef(new NGPhysicalTextFragment(
node_->GetLayoutObject(), toNGInlineNode(node_), index, start_offset,
end_offset, size_.ConvertToPhysical(writing_mode_),

Powered by Google App Engine
This is Rietveld 408576698