| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> | 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 ElementShadow& ensureShadow() | 85 ElementShadow& ensureShadow() |
| 86 { | 86 { |
| 87 if (!m_shadow) | 87 if (!m_shadow) |
| 88 m_shadow = ElementShadow::create(); | 88 m_shadow = ElementShadow::create(); |
| 89 return *m_shadow; | 89 return *m_shadow; |
| 90 } | 90 } |
| 91 | 91 |
| 92 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } | 92 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } |
| 93 void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attribut
eMap; } | 93 void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attribut
eMap; } |
| 94 | 94 |
| 95 ComputedStyle* computedStyle() const | 95 ComputedStyle* computedStyle() const { return m_computedStyle.get(); } |
| 96 { | 96 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) { m_computedS
tyle = computedStyle; } |
| 97 DCHECK(!(layoutObject() && m_computedStyle)); | |
| 98 if (layoutObject()) | |
| 99 return layoutObject()->mutableStyle(); | |
| 100 return m_computedStyle.get(); | |
| 101 } | |
| 102 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) | |
| 103 { | |
| 104 if (layoutObject()) | |
| 105 layoutObject()->setStyleInternal(std::move(computedStyle)); | |
| 106 else | |
| 107 m_computedStyle = computedStyle; | |
| 108 } | |
| 109 void clearComputedStyleIfNoLayoutObject() | 97 void clearComputedStyleIfNoLayoutObject() |
| 110 { | 98 { |
| 111 DCHECK(!(layoutObject() && m_computedStyle)); | 99 DCHECK(!(layoutObject() && m_computedStyle)); |
| 112 m_computedStyle = nullptr; | 100 m_computedStyle = nullptr; |
| 113 } | 101 } |
| 114 | 102 |
| 115 ClassList* classList() const { return m_classList.get(); } | 103 ClassList* classList() const { return m_classList.get(); } |
| 116 void setClassList(ClassList* classList) { m_classList = classList; } | 104 void setClassList(ClassList* classList) { m_classList = classList; } |
| 117 void clearClassListValueForQuirksMode() | 105 void clearClassListValueForQuirksMode() |
| 118 { | 106 { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro
pertySet() | 252 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro
pertySet() |
| 265 { | 253 { |
| 266 if (!m_proxiedProperties) | 254 if (!m_proxiedProperties) |
| 267 m_proxiedProperties = CompositorProxiedPropertySet::create(); | 255 m_proxiedProperties = CompositorProxiedPropertySet::create(); |
| 268 return *m_proxiedProperties; | 256 return *m_proxiedProperties; |
| 269 } | 257 } |
| 270 | 258 |
| 271 } // namespace blink | 259 } // namespace blink |
| 272 | 260 |
| 273 #endif // ElementRareData_h | 261 #endif // ElementRareData_h |
| OLD | NEW |