| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |