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

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

Issue 354363002: Move attributes-related API from UniqueElementData to AttributeCollection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 4 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/ElementData.h ('k') | Source/core/html/HTMLSelectElement.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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 PassRefPtrWillBeRawPtr<ShareableElementData> UniqueElementData::makeShareableCop y() const 205 PassRefPtrWillBeRawPtr<ShareableElementData> UniqueElementData::makeShareableCop y() const
206 { 206 {
207 #if ENABLE(OILPAN) 207 #if ENABLE(OILPAN)
208 void* slot = Heap::allocate<ElementData>(sizeForShareableElementDataWithAttr ibuteCount(m_attributeVector.size())); 208 void* slot = Heap::allocate<ElementData>(sizeForShareableElementDataWithAttr ibuteCount(m_attributeVector.size()));
209 #else 209 #else
210 void* slot = WTF::fastMalloc(sizeForShareableElementDataWithAttributeCount(m _attributeVector.size())); 210 void* slot = WTF::fastMalloc(sizeForShareableElementDataWithAttributeCount(m _attributeVector.size()));
211 #endif 211 #endif
212 return adoptRefWillBeNoop(new (slot) ShareableElementData(*this)); 212 return adoptRefWillBeNoop(new (slot) ShareableElementData(*this));
213 } 213 }
214 214
215 Attribute* UniqueElementData::findAttributeByName(const QualifiedName& name)
216 {
217 unsigned length = m_attributeVector.size();
218 for (unsigned i = 0; i < length; ++i) {
219 if (m_attributeVector.at(i).name().matches(name))
220 return &m_attributeVector.at(i);
221 }
222 return 0;
223 }
224
225 void UniqueElementData::traceAfterDispatch(Visitor* visitor) 215 void UniqueElementData::traceAfterDispatch(Visitor* visitor)
226 { 216 {
227 visitor->trace(m_presentationAttributeStyle); 217 visitor->trace(m_presentationAttributeStyle);
228 ElementData::traceAfterDispatch(visitor); 218 ElementData::traceAfterDispatch(visitor);
229 } 219 }
230 220
231 } // namespace blink 221 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/dom/ElementData.h ('k') | Source/core/html/HTMLSelectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698