| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2014 Apple Inc. All rights reserved. | 3 * Copyright (C) 2014 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 static PassRefPtrWillBeRawPtr<ShareableElementData> createWithAttributes(con
st Vector<Attribute>&); | 129 static PassRefPtrWillBeRawPtr<ShareableElementData> createWithAttributes(con
st Vector<Attribute>&); |
| 130 | 130 |
| 131 explicit ShareableElementData(const Vector<Attribute>&); | 131 explicit ShareableElementData(const Vector<Attribute>&); |
| 132 explicit ShareableElementData(const UniqueElementData&); | 132 explicit ShareableElementData(const UniqueElementData&); |
| 133 ~ShareableElementData(); | 133 ~ShareableElementData(); |
| 134 | 134 |
| 135 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { ElementData::traceAfterDispatch(visit
or); } | 135 DEFINE_INLINE_TRACE_AFTER_DISPATCH() { ElementData::traceAfterDispatch(visit
or); } |
| 136 | 136 |
| 137 // Add support for placement new as ShareableElementData is not allocated | 137 // Add support for placement new as ShareableElementData is not allocated |
| 138 // with a fixed size. Instead the allocated memory size is computed based on | 138 // with a fixed size. Instead the allocated memory size is computed based on |
| 139 // the number of attributes. This requires us to use Heap::allocate directly | 139 // the number of attributes. This requires us to use ThreadHeap::allocate di
rectly |
| 140 // with the computed size and subsequently call placement new with the | 140 // with the computed size and subsequently call placement new with the |
| 141 // allocated memory address. | 141 // allocated memory address. |
| 142 void* operator new(std::size_t, void* location) | 142 void* operator new(std::size_t, void* location) |
| 143 { | 143 { |
| 144 return location; | 144 return location; |
| 145 } | 145 } |
| 146 | 146 |
| 147 AttributeCollection attributes() const; | 147 AttributeCollection attributes() const; |
| 148 | 148 |
| 149 Attribute m_attributeArray[0]; | 149 Attribute m_attributeArray[0]; |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 | 220 |
| 221 inline MutableAttributeCollection UniqueElementData::attributes() | 221 inline MutableAttributeCollection UniqueElementData::attributes() |
| 222 { | 222 { |
| 223 return MutableAttributeCollection(m_attributeVector); | 223 return MutableAttributeCollection(m_attributeVector); |
| 224 } | 224 } |
| 225 | 225 |
| 226 } // namespace blink | 226 } // namespace blink |
| 227 | 227 |
| 228 #endif // ElementData_h | 228 #endif // ElementData_h |
| OLD | NEW |