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