Chromium Code Reviews| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 ElementShadow& ensureShadow() | 84 ElementShadow& ensureShadow() |
| 85 { | 85 { |
| 86 if (!m_shadow) | 86 if (!m_shadow) |
| 87 m_shadow = ElementShadow::create(); | 87 m_shadow = ElementShadow::create(); |
| 88 return *m_shadow; | 88 return *m_shadow; |
| 89 } | 89 } |
| 90 | 90 |
| 91 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } | 91 NamedNodeMap* attributeMap() const { return m_attributeMap.get(); } |
| 92 void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attribut eMap; } | 92 void setAttributeMap(NamedNodeMap* attributeMap) { m_attributeMap = attribut eMap; } |
| 93 | 93 |
| 94 ComputedStyle* computedStyle() const { return m_computedStyle.get(); } | 94 ComputedStyle* computedStyle() const |
| 95 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) { m_computedS tyle = computedStyle; } | 95 { |
|
Timothy Loh
2016/09/07 04:56:07
Maybe DCHECK(!(layoutObject() && m_computedStyle))
Bugs Nash
2016/09/13 21:46:55
Done.
| |
| 96 if (layoutObject()) | |
| 97 return layoutObject()->mutableStyle(); | |
| 98 return m_computedStyle.get(); | |
| 99 } | |
| 100 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) | |
| 101 { | |
| 102 if (layoutObject()) | |
| 103 layoutObject()->setStyleInternal(computedStyle); | |
| 104 else | |
| 105 m_computedStyle = computedStyle; | |
| 106 } | |
| 96 void clearComputedStyle() { m_computedStyle = nullptr; } | 107 void clearComputedStyle() { m_computedStyle = nullptr; } |
|
Timothy Loh
2016/09/07 04:56:07
OK for now but at some point we should work out if
Bugs Nash
2016/09/13 21:46:55
As per offline conversation the usage of this meth
| |
| 97 | 108 |
| 98 ClassList* classList() const { return m_classList.get(); } | 109 ClassList* classList() const { return m_classList.get(); } |
| 99 void setClassList(ClassList* classList) { m_classList = classList; } | 110 void setClassList(ClassList* classList) { m_classList = classList; } |
| 100 void clearClassListValueForQuirksMode() | 111 void clearClassListValueForQuirksMode() |
| 101 { | 112 { |
| 102 if (!m_classList) | 113 if (!m_classList) |
| 103 return; | 114 return; |
| 104 m_classList->clearValueForQuirksMode(); | 115 m_classList->clearValueForQuirksMode(); |
| 105 } | 116 } |
| 106 | 117 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet() | 258 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet() |
| 248 { | 259 { |
| 249 if (!m_proxiedProperties) | 260 if (!m_proxiedProperties) |
| 250 m_proxiedProperties = CompositorProxiedPropertySet::create(); | 261 m_proxiedProperties = CompositorProxiedPropertySet::create(); |
| 251 return *m_proxiedProperties; | 262 return *m_proxiedProperties; |
| 252 } | 263 } |
| 253 | 264 |
| 254 } // namespace blink | 265 } // namespace blink |
| 255 | 266 |
| 256 #endif // ElementRareData_h | 267 #endif // ElementRareData_h |
| OLD | NEW |