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

Unified Diff: third_party/WebKit/Source/core/layout/ng/ng_physical_text_fragment.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_physical_text_fragment.h
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_text_fragment.h b/third_party/WebKit/Source/core/layout/ng/ng_physical_text_fragment.h
index 7bdfffb59817c7f4eedd71cef92e875c491eb640..c6b3bcebf1186b9ad2bf480a6b4f6458f50c3edb 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_physical_text_fragment.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_text_fragment.h
@@ -23,10 +23,11 @@ class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment {
unsigned end_index,
NGPhysicalSize size,
NGPhysicalSize overflow,
- HeapLinkedHashSet<WeakMember<NGBlockNode>>& out_of_flow_descendants,
+ PersistentHeapLinkedHashSet<WeakMember<NGBlockNode>>&
+ out_of_flow_descendants,
Vector<NGStaticPosition> out_of_flow_positions,
- HeapVector<Member<NGFloatingObject>>& unpositioned_floats,
- HeapVector<Member<NGFloatingObject>>& positioned_floats)
+ Vector<Persistent<NGFloatingObject>>& unpositioned_floats,
+ Vector<Persistent<NGFloatingObject>>& positioned_floats)
: NGPhysicalFragment(layout_object,
size,
overflow,
@@ -39,11 +40,6 @@ class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment {
start_index_(start_index),
end_index_(end_index) {}
- DEFINE_INLINE_TRACE_AFTER_DISPATCH() {
- visitor->trace(node_);
- NGPhysicalFragment::traceAfterDispatch(visitor);
- }
-
const NGInlineNode* Node() const { return node_; }
// The range of NGLayoutInlineItem.
@@ -55,7 +51,7 @@ class CORE_EXPORT NGPhysicalTextFragment final : public NGPhysicalFragment {
private:
// TODO(kojii): NGInlineNode is to access text content and NGLayoutInlineItem.
// Review if it's better to point them.
- Member<const NGInlineNode> node_;
+ Persistent<const NGInlineNode> node_;
unsigned start_index_;
unsigned end_index_;
};

Powered by Google App Engine
This is Rietveld 408576698