Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: sky/engine/core/dom/ElementRareData.h

Issue 880593003: Move the CustomElementDefinition from ElementRareData to Element. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix compile assert Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/Element.cpp ('k') | sky/engine/core/dom/ElementRareData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/animation/ActiveAnimations.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/custom/CustomElementDefinition.h"
29 #include "sky/engine/core/dom/shadow/ElementShadow.h" 28 #include "sky/engine/core/dom/shadow/ElementShadow.h"
30 #include "sky/engine/core/rendering/style/StyleInheritedData.h" 29 #include "sky/engine/core/rendering/style/StyleInheritedData.h"
31 #include "sky/engine/wtf/OwnPtr.h" 30 #include "sky/engine/wtf/OwnPtr.h"
32 31
33 namespace blink { 32 namespace blink {
34 33
35 class HTMLElement; 34 class HTMLElement;
36 35
37 class ElementRareData : public NodeRareData { 36 class ElementRareData : public NodeRareData {
38 public: 37 public:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 76
78 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; } 77 IntSize savedLayerScrollOffset() const { return m_savedLayerScrollOffset; }
79 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si ze; } 78 void setSavedLayerScrollOffset(IntSize size) { m_savedLayerScrollOffset = si ze; }
80 79
81 ActiveAnimations* activeAnimations() { return m_activeAnimations.get(); } 80 ActiveAnimations* activeAnimations() { return m_activeAnimations.get(); }
82 void setActiveAnimations(PassOwnPtr<ActiveAnimations> activeAnimations) 81 void setActiveAnimations(PassOwnPtr<ActiveAnimations> activeAnimations)
83 { 82 {
84 m_activeAnimations = activeAnimations; 83 m_activeAnimations = activeAnimations;
85 } 84 }
86 85
87 void setCustomElementDefinition(PassRefPtr<CustomElementDefinition> definiti on) { m_customElementDefinition = definition; }
88 CustomElementDefinition* customElementDefinition() const { return m_customEl ementDefinition.get(); }
89
90 private: 86 private:
91 short m_tabindex; 87 short m_tabindex;
92 88
93 IntSize m_savedLayerScrollOffset; 89 IntSize m_savedLayerScrollOffset;
94 90
95 OwnPtr<DOMTokenList> m_classList; 91 OwnPtr<DOMTokenList> m_classList;
96 OwnPtr<ElementShadow> m_shadow; 92 OwnPtr<ElementShadow> m_shadow;
97 OwnPtr<ActiveAnimations> m_activeAnimations; 93 OwnPtr<ActiveAnimations> m_activeAnimations;
98 OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper; 94 OwnPtr<InlineCSSStyleDeclaration> m_cssomWrapper;
99 95
100 RefPtr<RenderStyle> m_computedStyle; 96 RefPtr<RenderStyle> m_computedStyle;
101 RefPtr<CustomElementDefinition> m_customElementDefinition;
102 97
103 explicit ElementRareData(RenderObject*); 98 explicit ElementRareData(RenderObject*);
104 }; 99 };
105 100
106 inline ElementRareData::ElementRareData(RenderObject* renderer) 101 inline ElementRareData::ElementRareData(RenderObject* renderer)
107 : NodeRareData(renderer) 102 : NodeRareData(renderer)
108 , m_tabindex(0) 103 , m_tabindex(0)
109 { 104 {
110 m_isElementRareData = true; 105 m_isElementRareData = true;
111 } 106 }
112 107
113 inline ElementRareData::~ElementRareData() 108 inline ElementRareData::~ElementRareData()
114 { 109 {
115 #if !ENABLE(OILPAN) 110 #if !ENABLE(OILPAN)
116 ASSERT(!m_shadow); 111 ASSERT(!m_shadow);
117 #endif 112 #endif
118 } 113 }
119 114
120 } // namespace 115 } // namespace
121 116
122 #endif // SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_ 117 #endif // SKY_ENGINE_CORE_DOM_ELEMENTRAREDATA_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Element.cpp ('k') | sky/engine/core/dom/ElementRareData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698