| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 ComputedStyle* computedStyle() const | 94 ComputedStyle* computedStyle() const |
| 95 { | 95 { |
| 96 DCHECK(!(layoutObject() && m_computedStyle)); | 96 DCHECK(!(layoutObject() && m_computedStyle)); |
| 97 if (layoutObject()) | 97 if (layoutObject()) |
| 98 return layoutObject()->mutableStyle(); | 98 return layoutObject()->mutableStyle(); |
| 99 return m_computedStyle.get(); | 99 return m_computedStyle.get(); |
| 100 } | 100 } |
| 101 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) | 101 void setComputedStyle(PassRefPtr<ComputedStyle> computedStyle) |
| 102 { | 102 { |
| 103 if (layoutObject()) | 103 if (layoutObject()) { |
| 104 layoutObject()->setStyleInternal(computedStyle); | 104 layoutObject()->setStyleFromNodeOrElement(computedStyle); |
| 105 else | 105 } else { |
| 106 m_computedStyle = computedStyle; | 106 m_computedStyle = computedStyle; |
| 107 } |
| 107 } | 108 } |
| 108 void clearComputedStyleIfNoLayoutObject() | 109 void clearComputedStyleIfNoLayoutObject() |
| 109 { | 110 { |
| 110 DCHECK(!(layoutObject() && m_computedStyle)); | 111 DCHECK(!(layoutObject() && m_computedStyle)); |
| 111 m_computedStyle = nullptr; | 112 m_computedStyle = nullptr; |
| 112 } | 113 } |
| 113 | 114 |
| 114 ClassList* classList() const { return m_classList.get(); } | 115 ClassList* classList() const { return m_classList.get(); } |
| 115 void setClassList(ClassList* classList) { m_classList = classList; } | 116 void setClassList(ClassList* classList) { m_classList = classList; } |
| 116 void clearClassListValueForQuirksMode() | 117 void clearClassListValueForQuirksMode() |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro
pertySet() | 264 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro
pertySet() |
| 264 { | 265 { |
| 265 if (!m_proxiedProperties) | 266 if (!m_proxiedProperties) |
| 266 m_proxiedProperties = CompositorProxiedPropertySet::create(); | 267 m_proxiedProperties = CompositorProxiedPropertySet::create(); |
| 267 return *m_proxiedProperties; | 268 return *m_proxiedProperties; |
| 268 } | 269 } |
| 269 | 270 |
| 270 } // namespace blink | 271 } // namespace blink |
| 271 | 272 |
| 272 #endif // ElementRareData_h | 273 #endif // ElementRareData_h |
| OLD | NEW |