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

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

Issue 1844223002: Literal AtomicString construction can rely on strlen optimization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 const AtomicString& attributeName() override { return m_record->attributeNam e(); } 163 const AtomicString& attributeName() override { return m_record->attributeNam e(); }
164 const AtomicString& attributeNamespace() override { return m_record->attribu teNamespace(); } 164 const AtomicString& attributeNamespace() override { return m_record->attribu teNamespace(); }
165 165
166 String oldValue() override { return String(); } 166 String oldValue() override { return String(); }
167 167
168 RefPtrWillBeMember<MutationRecord> m_record; 168 RefPtrWillBeMember<MutationRecord> m_record;
169 }; 169 };
170 170
171 const AtomicString& ChildListRecord::type() 171 const AtomicString& ChildListRecord::type()
172 { 172 {
173 DEFINE_STATIC_LOCAL(AtomicString, childList, ("childList", AtomicString::Con structFromLiteral)); 173 DEFINE_STATIC_LOCAL(AtomicString, childList, ("childList"));
174 return childList; 174 return childList;
175 } 175 }
176 176
177 const AtomicString& AttributesRecord::type() 177 const AtomicString& AttributesRecord::type()
178 { 178 {
179 DEFINE_STATIC_LOCAL(AtomicString, attributes, ("attributes", AtomicString::C onstructFromLiteral)); 179 DEFINE_STATIC_LOCAL(AtomicString, attributes, ("attributes"));
180 return attributes; 180 return attributes;
181 } 181 }
182 182
183 const AtomicString& CharacterDataRecord::type() 183 const AtomicString& CharacterDataRecord::type()
184 { 184 {
185 DEFINE_STATIC_LOCAL(AtomicString, characterData, ("characterData", AtomicStr ing::ConstructFromLiteral)); 185 DEFINE_STATIC_LOCAL(AtomicString, characterData, ("characterData"));
186 return characterData; 186 return characterData;
187 } 187 }
188 188
189 } // namespace 189 } // namespace
190 190
191 PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createChildList(PassRefPt rWillBeRawPtr<Node> target, PassRefPtrWillBeRawPtr<StaticNodeList> added, PassRe fPtrWillBeRawPtr<StaticNodeList> removed, PassRefPtrWillBeRawPtr<Node> previousS ibling, PassRefPtrWillBeRawPtr<Node> nextSibling) 191 PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createChildList(PassRefPt rWillBeRawPtr<Node> target, PassRefPtrWillBeRawPtr<StaticNodeList> added, PassRe fPtrWillBeRawPtr<StaticNodeList> removed, PassRefPtrWillBeRawPtr<Node> previousS ibling, PassRefPtrWillBeRawPtr<Node> nextSibling)
192 { 192 {
193 return adoptRefWillBeNoop(new ChildListRecord(target, added, removed, previo usSibling, nextSibling)); 193 return adoptRefWillBeNoop(new ChildListRecord(target, added, removed, previo usSibling, nextSibling));
194 } 194 }
195 195
(...skipping 10 matching lines...) Expand all
206 PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createWithNullOldValue(Pa ssRefPtrWillBeRawPtr<MutationRecord> record) 206 PassRefPtrWillBeRawPtr<MutationRecord> MutationRecord::createWithNullOldValue(Pa ssRefPtrWillBeRawPtr<MutationRecord> record)
207 { 207 {
208 return adoptRefWillBeNoop(new MutationRecordWithNullOldValue(record)); 208 return adoptRefWillBeNoop(new MutationRecordWithNullOldValue(record));
209 } 209 }
210 210
211 MutationRecord::~MutationRecord() 211 MutationRecord::~MutationRecord()
212 { 212 {
213 } 213 }
214 214
215 } // namespace blink 215 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698