| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 void* pointers[2]; | 43 void* pointers[2]; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 static_assert(sizeof(ElementData) == sizeof(SameSizeAsElementData), "ElementData
should stay small"); | 46 static_assert(sizeof(ElementData) == sizeof(SameSizeAsElementData), "ElementData
should stay small"); |
| 47 | 47 |
| 48 static size_t sizeForShareableElementDataWithAttributeCount(unsigned count) | 48 static size_t sizeForShareableElementDataWithAttributeCount(unsigned count) |
| 49 { | 49 { |
| 50 return sizeof(ShareableElementData) + sizeof(Attribute) * count; | 50 return sizeof(ShareableElementData) + sizeof(Attribute) * count; |
| 51 } | 51 } |
| 52 | 52 |
| 53 const StylePropertySet* ElementData::inlineStyle() const | |
| 54 { | |
| 55 return m_inlineStyle.get(); | |
| 56 } | |
| 57 | |
| 58 const StylePropertySet* ElementData::presentationAttributeStyle() const | |
| 59 { | |
| 60 if (!m_isUnique) | |
| 61 return nullptr; | |
| 62 return toUniqueElementData(this)->m_presentationAttributeStyle.get(); | |
| 63 } | |
| 64 | |
| 65 ElementData::ElementData() | 53 ElementData::ElementData() |
| 66 : m_isUnique(true) | 54 : m_isUnique(true) |
| 67 , m_arraySize(0) | 55 , m_arraySize(0) |
| 68 , m_presentationAttributeStyleIsDirty(false) | 56 , m_presentationAttributeStyleIsDirty(false) |
| 69 , m_styleAttributeIsDirty(false) | 57 , m_styleAttributeIsDirty(false) |
| 70 , m_animatedSVGAttributesAreDirty(false) | 58 , m_animatedSVGAttributesAreDirty(false) |
| 71 { | 59 { |
| 72 } | 60 } |
| 73 | 61 |
| 74 ElementData::ElementData(unsigned arraySize) | 62 ElementData::ElementData(unsigned arraySize) |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 return adoptRefWillBeNoop(new (slot) ShareableElementData(*this)); | 212 return adoptRefWillBeNoop(new (slot) ShareableElementData(*this)); |
| 225 } | 213 } |
| 226 | 214 |
| 227 DEFINE_TRACE_AFTER_DISPATCH(UniqueElementData) | 215 DEFINE_TRACE_AFTER_DISPATCH(UniqueElementData) |
| 228 { | 216 { |
| 229 visitor->trace(m_presentationAttributeStyle); | 217 visitor->trace(m_presentationAttributeStyle); |
| 230 ElementData::traceAfterDispatch(visitor); | 218 ElementData::traceAfterDispatch(visitor); |
| 231 } | 219 } |
| 232 | 220 |
| 233 } // namespace blink | 221 } // namespace blink |
| OLD | NEW |