| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 * | 19 * |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #ifndef SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_ | 22 #ifndef SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_ |
| 23 #define SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_ | 23 #define SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_ |
| 24 | 24 |
| 25 #include "sky/engine/core/animation/ActiveAnimations.h" | 25 #include "sky/engine/core/css/PropertySetCSSStyleDeclaration.h" |
| 26 #include "sky/engine/core/dom/DOMTokenList.h" | 26 #include "sky/engine/core/dom/DOMTokenList.h" |
| 27 #include "sky/engine/core/dom/NodeRareData.h" | 27 #include "sky/engine/core/dom/NodeRareData.h" |
| 28 #include "sky/engine/core/dom/shadow/ElementShadow.h" | 28 #include "sky/engine/core/dom/shadow/ElementShadow.h" |
| 29 #include "sky/engine/core/rendering/style/StyleInheritedData.h" | 29 #include "sky/engine/core/rendering/style/StyleInheritedData.h" |
| 30 #include "sky/engine/wtf/OwnPtr.h" | 30 #include "sky/engine/wtf/OwnPtr.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class HTMLElement; | 34 class HTMLElement; |
| 35 | 35 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 return *m_shadow; | 68 return *m_shadow; |
| 69 } | 69 } |
| 70 | 70 |
| 71 RenderStyle* computedStyle() const { return m_computedStyle.get(); } | 71 RenderStyle* computedStyle() const { return m_computedStyle.get(); } |
| 72 void setComputedStyle(PassRefPtr<RenderStyle> computedStyle) { m_computedSty
le = computedStyle; } | 72 void setComputedStyle(PassRefPtr<RenderStyle> computedStyle) { m_computedSty
le = computedStyle; } |
| 73 void clearComputedStyle() { m_computedStyle = nullptr; } | 73 void clearComputedStyle() { m_computedStyle = nullptr; } |
| 74 | 74 |
| 75 DOMTokenList* classList() const { return m_classList.get(); } | 75 DOMTokenList* classList() const { return m_classList.get(); } |
| 76 void setClassList(PassOwnPtr<DOMTokenList> classList) { m_classList = classL
ist; } | 76 void setClassList(PassOwnPtr<DOMTokenList> classList) { m_classList = classL
ist; } |
| 77 | 77 |
| 78 ActiveAnimations* activeAnimations() { return m_activeAnimations.get(); } | |
| 79 void setActiveAnimations(PassOwnPtr<ActiveAnimations> activeAnimations) | |
| 80 { | |
| 81 m_activeAnimations = activeAnimations; | |
| 82 } | |
| 83 | |
| 84 private: | 78 private: |
| 85 unsigned m_tabindex : 16; | 79 unsigned m_tabindex : 16; |
| 86 unsigned m_hasTabIndex : 1; | 80 unsigned m_hasTabIndex : 1; |
| 87 | 81 |
| 88 OwnPtr<DOMTokenList> m_classList; | 82 OwnPtr<DOMTokenList> m_classList; |
| 89 OwnPtr<ElementShadow> m_shadow; | 83 OwnPtr<ElementShadow> m_shadow; |
| 90 OwnPtr<ActiveAnimations> m_activeAnimations; | |
| 91 OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper; | 84 OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper; |
| 92 | 85 |
| 93 RefPtr<RenderStyle> m_computedStyle; | 86 RefPtr<RenderStyle> m_computedStyle; |
| 94 | 87 |
| 95 explicit ElementRareData(RenderObject*); | 88 explicit ElementRareData(RenderObject*); |
| 96 }; | 89 }; |
| 97 | 90 |
| 98 inline ElementRareData::ElementRareData(RenderObject* renderer) | 91 inline ElementRareData::ElementRareData(RenderObject* renderer) |
| 99 : NodeRareData(renderer) | 92 : NodeRareData(renderer) |
| 100 , m_tabindex(0) | 93 , m_tabindex(0) |
| 101 , m_hasTabIndex(false) | 94 , m_hasTabIndex(false) |
| 102 { | 95 { |
| 103 m_isElementRareData = true; | 96 m_isElementRareData = true; |
| 104 } | 97 } |
| 105 | 98 |
| 106 inline ElementRareData::~ElementRareData() | 99 inline ElementRareData::~ElementRareData() |
| 107 { | 100 { |
| 108 #if !ENABLE(OILPAN) | 101 #if !ENABLE(OILPAN) |
| 109 ASSERT(!m_shadow); | 102 ASSERT(!m_shadow); |
| 110 #endif | 103 #endif |
| 111 } | 104 } |
| 112 | 105 |
| 113 } // namespace | 106 } // namespace |
| 114 | 107 |
| 115 #endif // SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_ | 108 #endif // SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_ |
| OLD | NEW |