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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 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
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/ElementDataCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 UniqueElementData::UniqueElementData() 180 UniqueElementData::UniqueElementData()
181 { 181 {
182 } 182 }
183 183
184 UniqueElementData::UniqueElementData(const UniqueElementData& other) 184 UniqueElementData::UniqueElementData(const UniqueElementData& other)
185 : ElementData(other, true) 185 : ElementData(other, true)
186 , m_presentationAttributeStyle(other.m_presentationAttributeStyle) 186 , m_presentationAttributeStyle(other.m_presentationAttributeStyle)
187 , m_attributeVector(other.m_attributeVector) 187 , m_attributeVector(other.m_attributeVector)
188 { 188 {
189 m_inlineStyle = other.m_inlineStyle ? other.m_inlineStyle->mutableCopy() : 0 ; 189 m_inlineStyle = other.m_inlineStyle ? other.m_inlineStyle->mutableCopy() : n ullptr;
190 } 190 }
191 191
192 UniqueElementData::UniqueElementData(const ShareableElementData& other) 192 UniqueElementData::UniqueElementData(const ShareableElementData& other)
193 : ElementData(other, true) 193 : ElementData(other, true)
194 { 194 {
195 // An ShareableElementData should never have a mutable inline StylePropertyS et attached. 195 // An ShareableElementData should never have a mutable inline StylePropertyS et attached.
196 ASSERT(!other.m_inlineStyle || !other.m_inlineStyle->isMutable()); 196 ASSERT(!other.m_inlineStyle || !other.m_inlineStyle->isMutable());
197 m_inlineStyle = other.m_inlineStyle; 197 m_inlineStyle = other.m_inlineStyle;
198 198
199 m_attributeVector.reserveCapacity(other.length()); 199 m_attributeVector.reserveCapacity(other.length());
(...skipping 15 matching lines...) Expand all
215 Attribute* UniqueElementData::getAttributeItem(const QualifiedName& name) 215 Attribute* UniqueElementData::getAttributeItem(const QualifiedName& name)
216 { 216 {
217 for (unsigned i = 0; i < length(); ++i) { 217 for (unsigned i = 0; i < length(); ++i) {
218 if (m_attributeVector.at(i).name().matches(name)) 218 if (m_attributeVector.at(i).name().matches(name))
219 return &m_attributeVector.at(i); 219 return &m_attributeVector.at(i);
220 } 220 }
221 return 0; 221 return 0;
222 } 222 }
223 223
224 } // namespace WebCore 224 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Element.cpp ('k') | Source/core/dom/ElementDataCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698