OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
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 17 matching lines...) Expand all Loading... | |
28 #include "core/css/CSSToLengthConversionData.h" | 28 #include "core/css/CSSToLengthConversionData.h" |
29 #include "core/css/resolver/CSSToStyleMap.h" | 29 #include "core/css/resolver/CSSToStyleMap.h" |
30 #include "core/css/resolver/ElementResolveContext.h" | 30 #include "core/css/resolver/ElementResolveContext.h" |
31 #include "core/css/resolver/ElementStyleResources.h" | 31 #include "core/css/resolver/ElementStyleResources.h" |
32 #include "core/css/resolver/FontBuilder.h" | 32 #include "core/css/resolver/FontBuilder.h" |
33 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
34 #include "core/dom/Element.h" | 34 #include "core/dom/Element.h" |
35 #include "core/style/CachedUAStyle.h" | 35 #include "core/style/CachedUAStyle.h" |
36 #include "core/style/ComputedStyle.h" | 36 #include "core/style/ComputedStyle.h" |
37 #include "core/style/StyleInheritedData.h" | 37 #include "core/style/StyleInheritedData.h" |
38 #include "core/style/StyleVariableData.h" | |
Timothy Loh
2015/07/23 08:11:47
unused include
| |
38 | 39 |
39 namespace blink { | 40 namespace blink { |
40 | 41 |
41 class CSSAnimationUpdate; | 42 class CSSAnimationUpdate; |
43 class CSSCustomVariableValue; | |
Timothy Loh
2015/07/23 08:11:47
unused fwd decl?
| |
42 class FontDescription; | 44 class FontDescription; |
43 | 45 |
44 class CORE_EXPORT StyleResolverState { | 46 class CORE_EXPORT StyleResolverState { |
45 STACK_ALLOCATED(); | 47 STACK_ALLOCATED(); |
46 WTF_MAKE_NONCOPYABLE(StyleResolverState); | 48 WTF_MAKE_NONCOPYABLE(StyleResolverState); |
47 public: | 49 public: |
48 StyleResolverState(Document&, const ElementResolveContext&, const ComputedSt yle* parentStyle); | 50 StyleResolverState(Document&, const ElementResolveContext&, const ComputedSt yle* parentStyle); |
49 StyleResolverState(Document&, Element*, const ComputedStyle* parentStyle = 0 ); | 51 StyleResolverState(Document&, Element*, const ComputedStyle* parentStyle = 0 ); |
50 ~StyleResolverState(); | 52 ~StyleResolverState(); |
51 | 53 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 } | 149 } |
148 void setTextOrientation(TextOrientation textOrientation) | 150 void setTextOrientation(TextOrientation textOrientation) |
149 { | 151 { |
150 if (m_style->setTextOrientation(textOrientation)) | 152 if (m_style->setTextOrientation(textOrientation)) |
151 m_fontBuilder.didChangeTextOrientation(); | 153 m_fontBuilder.didChangeTextOrientation(); |
152 } | 154 } |
153 | 155 |
154 void setHasDirAutoAttribute(bool value) { m_hasDirAutoAttribute = value; } | 156 void setHasDirAutoAttribute(bool value) { m_hasDirAutoAttribute = value; } |
155 bool hasDirAutoAttribute() const { return m_hasDirAutoAttribute; } | 157 bool hasDirAutoAttribute() const { return m_hasDirAutoAttribute; } |
156 | 158 |
159 bool documentUsesCSSVariables() const; | |
160 | |
157 private: | 161 private: |
158 ElementResolveContext m_elementContext; | 162 ElementResolveContext m_elementContext; |
159 RawPtrWillBeMember<Document> m_document; | 163 RawPtrWillBeMember<Document> m_document; |
160 | 164 |
161 // m_style is the primary output for each element's style resolve. | 165 // m_style is the primary output for each element's style resolve. |
162 RefPtr<ComputedStyle> m_style; | 166 RefPtr<ComputedStyle> m_style; |
163 | 167 |
164 CSSToLengthConversionData m_cssToLengthConversionData; | 168 CSSToLengthConversionData m_cssToLengthConversionData; |
165 | 169 |
166 // m_parentStyle is not always just ElementResolveContext::parentStyle, | 170 // m_parentStyle is not always just ElementResolveContext::parentStyle, |
167 // so we keep it separate. | 171 // so we keep it separate. |
168 RefPtr<ComputedStyle> m_parentStyle; | 172 RefPtr<ComputedStyle> m_parentStyle; |
169 | 173 |
170 OwnPtrWillBeMember<CSSAnimationUpdate> m_animationUpdate; | 174 OwnPtrWillBeMember<CSSAnimationUpdate> m_animationUpdate; |
171 | 175 |
172 bool m_applyPropertyToRegularStyle; | 176 bool m_applyPropertyToRegularStyle; |
173 bool m_applyPropertyToVisitedLinkStyle; | 177 bool m_applyPropertyToVisitedLinkStyle; |
174 bool m_hasDirAutoAttribute; | 178 bool m_hasDirAutoAttribute; |
175 | 179 |
176 FontBuilder m_fontBuilder; | 180 FontBuilder m_fontBuilder; |
177 | 181 |
178 OwnPtr<CachedUAStyle> m_cachedUAStyle; | 182 OwnPtr<CachedUAStyle> m_cachedUAStyle; |
179 | 183 |
180 ElementStyleResources m_elementStyleResources; | 184 ElementStyleResources m_elementStyleResources; |
181 }; | 185 }; |
182 | 186 |
183 } // namespace blink | 187 } // namespace blink |
184 | 188 |
185 #endif // StyleResolverState_h | 189 #endif // StyleResolverState_h |
OLD | NEW |