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

Side by Side Diff: Source/core/dom/MutationRecord.cpp

Issue 947393002: InlinedVisitor: Migrate dom to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 public: 46 public:
47 ChildListRecord(PassRefPtrWillBeRawPtr<Node> target, PassRefPtrWillBeRawPtr< StaticNodeList> added, PassRefPtrWillBeRawPtr<StaticNodeList> removed, PassRefPt rWillBeRawPtr<Node> previousSibling, PassRefPtrWillBeRawPtr<Node> nextSibling) 47 ChildListRecord(PassRefPtrWillBeRawPtr<Node> target, PassRefPtrWillBeRawPtr< StaticNodeList> added, PassRefPtrWillBeRawPtr<StaticNodeList> removed, PassRefPt rWillBeRawPtr<Node> previousSibling, PassRefPtrWillBeRawPtr<Node> nextSibling)
48 : m_target(target) 48 : m_target(target)
49 , m_addedNodes(added) 49 , m_addedNodes(added)
50 , m_removedNodes(removed) 50 , m_removedNodes(removed)
51 , m_previousSibling(previousSibling) 51 , m_previousSibling(previousSibling)
52 , m_nextSibling(nextSibling) 52 , m_nextSibling(nextSibling)
53 { 53 {
54 } 54 }
55 55
56 virtual void trace(Visitor* visitor) override 56 DEFINE_INLINE_VIRTUAL_TRACE()
57 { 57 {
58 visitor->trace(m_target); 58 visitor->trace(m_target);
59 visitor->trace(m_addedNodes); 59 visitor->trace(m_addedNodes);
60 visitor->trace(m_removedNodes); 60 visitor->trace(m_removedNodes);
61 visitor->trace(m_previousSibling); 61 visitor->trace(m_previousSibling);
62 visitor->trace(m_nextSibling); 62 visitor->trace(m_nextSibling);
63 MutationRecord::trace(visitor); 63 MutationRecord::trace(visitor);
64 } 64 }
65 65
66 private: 66 private:
(...skipping 12 matching lines...) Expand all
79 }; 79 };
80 80
81 class RecordWithEmptyNodeLists : public MutationRecord { 81 class RecordWithEmptyNodeLists : public MutationRecord {
82 public: 82 public:
83 RecordWithEmptyNodeLists(PassRefPtrWillBeRawPtr<Node> target, const String& oldValue) 83 RecordWithEmptyNodeLists(PassRefPtrWillBeRawPtr<Node> target, const String& oldValue)
84 : m_target(target) 84 : m_target(target)
85 , m_oldValue(oldValue) 85 , m_oldValue(oldValue)
86 { 86 {
87 } 87 }
88 88
89 virtual void trace(Visitor* visitor) override 89 DEFINE_INLINE_VIRTUAL_TRACE()
90 { 90 {
91 visitor->trace(m_target); 91 visitor->trace(m_target);
92 visitor->trace(m_addedNodes); 92 visitor->trace(m_addedNodes);
93 visitor->trace(m_removedNodes); 93 visitor->trace(m_removedNodes);
94 MutationRecord::trace(visitor); 94 MutationRecord::trace(visitor);
95 } 95 }
96 96
97 private: 97 private:
98 virtual Node* target() override { return m_target.get(); } 98 virtual Node* target() override { return m_target.get(); }
99 virtual String oldValue() override { return m_oldValue; } 99 virtual String oldValue() override { return m_oldValue; }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 virtual const AtomicString& type() override; 142 virtual const AtomicString& type() override;
143 }; 143 };
144 144
145 class MutationRecordWithNullOldValue : public MutationRecord { 145 class MutationRecordWithNullOldValue : public MutationRecord {
146 public: 146 public:
147 MutationRecordWithNullOldValue(PassRefPtrWillBeRawPtr<MutationRecord> record ) 147 MutationRecordWithNullOldValue(PassRefPtrWillBeRawPtr<MutationRecord> record )
148 : m_record(record) 148 : m_record(record)
149 { 149 {
150 } 150 }
151 151
152 virtual void trace(Visitor* visitor) override 152 DEFINE_INLINE_VIRTUAL_TRACE()
153 { 153 {
154 visitor->trace(m_record); 154 visitor->trace(m_record);
155 MutationRecord::trace(visitor); 155 MutationRecord::trace(visitor);
156 } 156 }
157 157
158 private: 158 private:
159 virtual const AtomicString& type() override { return m_record->type(); } 159 virtual const AtomicString& type() override { return m_record->type(); }
160 virtual Node* target() override { return m_record->target(); } 160 virtual Node* target() override { return m_record->target(); }
161 virtual StaticNodeList* addedNodes() override { return m_record->addedNodes( ); } 161 virtual StaticNodeList* addedNodes() override { return m_record->addedNodes( ); }
162 virtual StaticNodeList* removedNodes() override { return m_record->removedNo des(); } 162 virtual StaticNodeList* removedNodes() override { return m_record->removedNo des(); }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createWithNullOldValue(Pa ssRefPtrWillBeRawPtr<MutationRecord> record) 208 PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createWithNullOldValue(Pa ssRefPtrWillBeRawPtr<MutationRecord> record)
209 { 209 {
210 return adoptRefWillBeNoop(new MutationRecordWithNullOldValue(record)); 210 return adoptRefWillBeNoop(new MutationRecordWithNullOldValue(record));
211 } 211 }
212 212
213 MutationRecord::~MutationRecord() 213 MutationRecord::~MutationRecord()
214 { 214 {
215 } 215 }
216 216
217 } // namespace blink 217 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698