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

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

Issue 1850183003: Round out WillBe type removal. (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) 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 if (other.m_inlineStyle) { 156 if (other.m_inlineStyle) {
157 m_inlineStyle = other.m_inlineStyle->immutableCopyIfNeeded(); 157 m_inlineStyle = other.m_inlineStyle->immutableCopyIfNeeded();
158 } 158 }
159 159
160 for (unsigned i = 0; i < m_arraySize; ++i) 160 for (unsigned i = 0; i < m_arraySize; ++i)
161 new (&m_attributeArray[i]) Attribute(other.m_attributeVector.at(i)); 161 new (&m_attributeArray[i]) Attribute(other.m_attributeVector.at(i));
162 } 162 }
163 163
164 RawPtr<ShareableElementData> ShareableElementData::createWithAttributes(const Ve ctor<Attribute>& attributes) 164 RawPtr<ShareableElementData> ShareableElementData::createWithAttributes(const Ve ctor<Attribute>& attributes)
165 { 165 {
166 #if ENABLE(OILPAN)
167 void* slot = Heap::allocate<ElementData>(sizeForShareableElementDataWithAttr ibuteCount(attributes.size())); 166 void* slot = Heap::allocate<ElementData>(sizeForShareableElementDataWithAttr ibuteCount(attributes.size()));
168 #else 167 return new (slot) ShareableElementData(attributes);
169 void* slot = WTF::Partitions::fastMalloc(sizeForShareableElementDataWithAttr ibuteCount(attributes.size()), WTF_HEAP_PROFILER_TYPE_NAME(ShareableElementData) );
170 #endif
171 return adoptRefWillBeNoop(new (slot) ShareableElementData(attributes));
172 } 168 }
173 169
174 UniqueElementData::UniqueElementData() 170 UniqueElementData::UniqueElementData()
175 { 171 {
176 } 172 }
177 173
178 UniqueElementData::UniqueElementData(const UniqueElementData& other) 174 UniqueElementData::UniqueElementData(const UniqueElementData& other)
179 : ElementData(other, true) 175 : ElementData(other, true)
180 , m_presentationAttributeStyle(other.m_presentationAttributeStyle) 176 , m_presentationAttributeStyle(other.m_presentationAttributeStyle)
181 , m_attributeVector(other.m_attributeVector) 177 , m_attributeVector(other.m_attributeVector)
(...skipping 14 matching lines...) Expand all
196 m_attributeVector.uncheckedAppend(other.m_attributeArray[i]); 192 m_attributeVector.uncheckedAppend(other.m_attributeArray[i]);
197 } 193 }
198 194
199 RawPtr<UniqueElementData> UniqueElementData::create() 195 RawPtr<UniqueElementData> UniqueElementData::create()
200 { 196 {
201 return new UniqueElementData; 197 return new UniqueElementData;
202 } 198 }
203 199
204 RawPtr<ShareableElementData> UniqueElementData::makeShareableCopy() const 200 RawPtr<ShareableElementData> UniqueElementData::makeShareableCopy() const
205 { 201 {
206 #if ENABLE(OILPAN)
207 void* slot = Heap::allocate<ElementData>(sizeForShareableElementDataWithAttr ibuteCount(m_attributeVector.size())); 202 void* slot = Heap::allocate<ElementData>(sizeForShareableElementDataWithAttr ibuteCount(m_attributeVector.size()));
208 #else 203 return new (slot) ShareableElementData(*this);
209 void* slot = WTF::Partitions::fastMalloc(sizeForShareableElementDataWithAttr ibuteCount(m_attributeVector.size()), WTF_HEAP_PROFILER_TYPE_NAME(ShareableEleme ntData));
210 #endif
211 return adoptRefWillBeNoop(new (slot) ShareableElementData(*this));
212 } 204 }
213 205
214 DEFINE_TRACE_AFTER_DISPATCH(UniqueElementData) 206 DEFINE_TRACE_AFTER_DISPATCH(UniqueElementData)
215 { 207 {
216 visitor->trace(m_presentationAttributeStyle); 208 visitor->trace(m_presentationAttributeStyle);
217 ElementData::traceAfterDispatch(visitor); 209 ElementData::traceAfterDispatch(visitor);
218 } 210 }
219 211
220 } // namespace blink 212 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/StylePropertySet.cpp ('k') | third_party/WebKit/Source/core/layout/HitTestResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698