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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 const CSSToLengthConversionData& cssToLengthConversionData() const { return
m_cssToLengthConversionData; } | 69 const CSSToLengthConversionData& cssToLengthConversionData() const { return
m_cssToLengthConversionData; } |
70 | 70 |
71 void setAnimationUpdate(PassOwnPtrWillBeRawPtr<CSSAnimationUpdate>); | 71 void setAnimationUpdate(PassOwnPtrWillBeRawPtr<CSSAnimationUpdate>); |
72 const CSSAnimationUpdate* animationUpdate() { return m_animationUpdate.get()
; } | 72 const CSSAnimationUpdate* animationUpdate() { return m_animationUpdate.get()
; } |
73 PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> takeAnimationUpdate(); | 73 PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> takeAnimationUpdate(); |
74 | 74 |
75 void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = p
arentStyle; } | 75 void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = p
arentStyle; } |
76 const RenderStyle* parentStyle() const { return m_parentStyle.get(); } | 76 const RenderStyle* parentStyle() const { return m_parentStyle.get(); } |
77 RenderStyle* parentStyle() { return m_parentStyle.get(); } | 77 RenderStyle* parentStyle() { return m_parentStyle.get(); } |
78 | 78 |
79 void setCurrentRule(StyleRule* currentRule) { m_currentRule = currentRule; } | |
80 const StyleRule* currentRule() const { return m_currentRule; } | |
81 | |
82 // FIXME: These are effectively side-channel "out parameters" for the variou
s | 79 // FIXME: These are effectively side-channel "out parameters" for the variou
s |
83 // map functions. When we map from CSS to style objects we use this state ob
ject | 80 // map functions. When we map from CSS to style objects we use this state ob
ject |
84 // to track various meta-data about that mapping (e.g. if it's cache-able). | 81 // to track various meta-data about that mapping (e.g. if it's cache-able). |
85 // We need to move this data off of StyleResolverState and closer to the | 82 // We need to move this data off of StyleResolverState and closer to the |
86 // objects it applies to. Possibly separating (immutable) inputs from (mutab
le) outputs. | 83 // objects it applies to. Possibly separating (immutable) inputs from (mutab
le) outputs. |
87 void setApplyPropertyToRegularStyle(bool isApply) { m_applyPropertyToRegular
Style = isApply; } | 84 void setApplyPropertyToRegularStyle(bool isApply) { m_applyPropertyToRegular
Style = isApply; } |
88 void setApplyPropertyToVisitedLinkStyle(bool isApply) { m_applyPropertyToVis
itedLinkStyle = isApply; } | 85 void setApplyPropertyToVisitedLinkStyle(bool isApply) { m_applyPropertyToVis
itedLinkStyle = isApply; } |
89 bool applyPropertyToRegularStyle() const { return m_applyPropertyToRegularSt
yle; } | 86 bool applyPropertyToRegularStyle() const { return m_applyPropertyToRegularSt
yle; } |
90 bool applyPropertyToVisitedLinkStyle() const { return m_applyPropertyToVisit
edLinkStyle; } | 87 bool applyPropertyToVisitedLinkStyle() const { return m_applyPropertyToVisit
edLinkStyle; } |
91 | 88 |
92 // Holds all attribute names found while applying "content" properties that
contain an "attr()" value. | 89 // Holds all attribute names found while applying "content" properties that
contain an "attr()" value. |
93 Vector<AtomicString>& contentAttrValues() { return m_contentAttrValues; } | 90 Vector<AtomicString>& contentAttrValues() { return m_contentAttrValues; } |
94 | 91 |
95 void setLineHeightValue(CSSValue* value) { m_lineHeightValue = value; } | |
96 CSSValue* lineHeightValue() { return m_lineHeightValue; } | |
97 | |
98 void cacheUserAgentBorderAndBackground() | 92 void cacheUserAgentBorderAndBackground() |
99 { | 93 { |
100 // RenderTheme only needs the cached style if it has an appearance, | 94 // RenderTheme only needs the cached style if it has an appearance, |
101 // and constructing it is expensive so we avoid it if possible. | 95 // and constructing it is expensive so we avoid it if possible. |
102 if (!style()->hasAppearance()) | 96 if (!style()->hasAppearance()) |
103 return; | 97 return; |
104 | 98 |
105 m_cachedUAStyle = CachedUAStyle::create(style()); | 99 m_cachedUAStyle = CachedUAStyle::create(style()); |
106 } | 100 } |
107 | 101 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 139 |
146 // m_parentStyle is not always just element->parentNode()->style() | 140 // m_parentStyle is not always just element->parentNode()->style() |
147 // so we keep it separate from m_elementContext. | 141 // so we keep it separate from m_elementContext. |
148 RefPtr<RenderStyle> m_parentStyle; | 142 RefPtr<RenderStyle> m_parentStyle; |
149 | 143 |
150 OwnPtrWillBeMember<CSSAnimationUpdate> m_animationUpdate; | 144 OwnPtrWillBeMember<CSSAnimationUpdate> m_animationUpdate; |
151 | 145 |
152 bool m_applyPropertyToRegularStyle; | 146 bool m_applyPropertyToRegularStyle; |
153 bool m_applyPropertyToVisitedLinkStyle; | 147 bool m_applyPropertyToVisitedLinkStyle; |
154 | 148 |
155 RawPtrWillBeMember<CSSValue> m_lineHeightValue; | |
156 | |
157 FontBuilder m_fontBuilder; | 149 FontBuilder m_fontBuilder; |
158 | 150 |
159 OwnPtr<CachedUAStyle> m_cachedUAStyle; | 151 OwnPtr<CachedUAStyle> m_cachedUAStyle; |
160 | 152 |
161 ElementStyleResources m_elementStyleResources; | 153 ElementStyleResources m_elementStyleResources; |
162 // CSSToStyleMap is a pure-logic class and only contains | 154 // CSSToStyleMap is a pure-logic class and only contains |
163 // a back-pointer to this object. | 155 // a back-pointer to this object. |
164 CSSToStyleMap m_styleMap; | 156 CSSToStyleMap m_styleMap; |
165 Vector<AtomicString> m_contentAttrValues; | 157 Vector<AtomicString> m_contentAttrValues; |
166 | |
167 RawPtrWillBeMember<StyleRule> m_currentRule; | |
168 }; | 158 }; |
169 | 159 |
170 } // namespace WebCore | 160 } // namespace WebCore |
171 | 161 |
172 #endif // StyleResolverState_h | 162 #endif // StyleResolverState_h |
OLD | NEW |