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 { |
| 96 void clearComputedStyle() { m_computedStyle = nullptr; } | 96 DCHECK(!(layoutObject() && m_computedStyle)); |
| 97 if (layoutObject()) | |
| 98 return layoutObject()->mutableStyle(); | |
| 99 return m_computedStyle.get(); | |
| 100 } | |
| 101 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) | |
| 102 { | |
| 103 if (layoutObject()) | |
| 104 layoutObject()->setStyleInternal(computedStyle); | |
|
esprehn
2016/09/24 02:10:52
This case isn't reachable (outside your test which
| |
| 105 else | |
| 106 m_computedStyle = computedStyle; | |
| 107 } | |
| 108 void clearComputedStyleIfNoLayoutObject() | |
| 109 { | |
| 110 DCHECK(!(layoutObject() && m_computedStyle)); | |
|
esprehn
2016/09/24 02:10:52
Plz run demorgans :D running it in my head is hard
| |
| 111 m_computedStyle = nullptr; | |
| 112 } | |
| 97 | 113 |
| 98 ClassList* classList() const { return m_classList.get(); } | 114 ClassList* classList() const { return m_classList.get(); } |
| 99 void setClassList(ClassList* classList) { m_classList = classList; } | 115 void setClassList(ClassList* classList) { m_classList = classList; } |
| 100 void clearClassListValueForQuirksMode() | 116 void clearClassListValueForQuirksMode() |
| 101 { | 117 { |
| 102 if (!m_classList) | 118 if (!m_classList) |
| 103 return; | 119 return; |
| 104 m_classList->clearValueForQuirksMode(); | 120 m_classList->clearValueForQuirksMode(); |
| 105 } | 121 } |
| 106 | 122 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet() | 263 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro pertySet() |
| 248 { | 264 { |
| 249 if (!m_proxiedProperties) | 265 if (!m_proxiedProperties) |
| 250 m_proxiedProperties = CompositorProxiedPropertySet::create(); | 266 m_proxiedProperties = CompositorProxiedPropertySet::create(); |
| 251 return *m_proxiedProperties; | 267 return *m_proxiedProperties; |
| 252 } | 268 } |
| 253 | 269 |
| 254 } // namespace blink | 270 } // namespace blink |
| 255 | 271 |
| 256 #endif // ElementRareData_h | 272 #endif // ElementRareData_h |
| OLD | NEW |