| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 const CachedUAStyle* cachedUAStyle() const | 108 const CachedUAStyle* cachedUAStyle() const |
| 109 { | 109 { |
| 110 return m_cachedUAStyle.get(); | 110 return m_cachedUAStyle.get(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 ElementStyleResources& elementStyleResources() { return m_elementStyleResour
ces; } | 113 ElementStyleResources& elementStyleResources() { return m_elementStyleResour
ces; } |
| 114 | 114 |
| 115 // FIXME: Once styleImage can be made to not take a StyleResolverState | 115 // FIXME: Once styleImage can be made to not take a StyleResolverState |
| 116 // this convenience function should be removed. As-is, without this, call | 116 // this convenience function should be removed. As-is, without this, call |
| 117 // sites are extremely verbose. | 117 // sites are extremely verbose. |
| 118 PassRefPtrWillBeRawPtr<StyleImage> styleImage(CSSPropertyID propertyId, cons
t CSSValue& value) | 118 RawPtr<StyleImage> styleImage(CSSPropertyID propertyId, const CSSValue& valu
e) |
| 119 { | 119 { |
| 120 return m_elementStyleResources.styleImage(propertyId, value); | 120 return m_elementStyleResources.styleImage(propertyId, value); |
| 121 } | 121 } |
| 122 | 122 |
| 123 FontBuilder& fontBuilder() { return m_fontBuilder; } | 123 FontBuilder& fontBuilder() { return m_fontBuilder; } |
| 124 // FIXME: These exist as a primitive way to track mutations to font-related
properties | 124 // FIXME: These exist as a primitive way to track mutations to font-related
properties |
| 125 // on a ComputedStyle. As designed, these are very error-prone, as some call
ers | 125 // on a ComputedStyle. As designed, these are very error-prone, as some call
ers |
| 126 // set these directly on the ComputedStyle w/o telling us. Presumably we'll | 126 // set these directly on the ComputedStyle w/o telling us. Presumably we'll |
| 127 // want to design a better wrapper around ComputedStyle for tracking these m
utations | 127 // want to design a better wrapper around ComputedStyle for tracking these m
utations |
| 128 // and separate it from StyleResolverState. | 128 // and separate it from StyleResolverState. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 147 { | 147 { |
| 148 if (m_style->setTextOrientation(textOrientation)) | 148 if (m_style->setTextOrientation(textOrientation)) |
| 149 m_fontBuilder.didChangeTextOrientation(); | 149 m_fontBuilder.didChangeTextOrientation(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void setHasDirAutoAttribute(bool value) { m_hasDirAutoAttribute = value; } | 152 void setHasDirAutoAttribute(bool value) { m_hasDirAutoAttribute = value; } |
| 153 bool hasDirAutoAttribute() const { return m_hasDirAutoAttribute; } | 153 bool hasDirAutoAttribute() const { return m_hasDirAutoAttribute; } |
| 154 | 154 |
| 155 private: | 155 private: |
| 156 ElementResolveContext m_elementContext; | 156 ElementResolveContext m_elementContext; |
| 157 RawPtrWillBeMember<Document> m_document; | 157 Member<Document> m_document; |
| 158 | 158 |
| 159 // m_style is the primary output for each element's style resolve. | 159 // m_style is the primary output for each element's style resolve. |
| 160 RefPtr<ComputedStyle> m_style; | 160 RefPtr<ComputedStyle> m_style; |
| 161 | 161 |
| 162 CSSToLengthConversionData m_cssToLengthConversionData; | 162 CSSToLengthConversionData m_cssToLengthConversionData; |
| 163 | 163 |
| 164 // m_parentStyle is not always just ElementResolveContext::parentStyle, | 164 // m_parentStyle is not always just ElementResolveContext::parentStyle, |
| 165 // so we keep it separate. | 165 // so we keep it separate. |
| 166 RefPtr<ComputedStyle> m_parentStyle; | 166 RefPtr<ComputedStyle> m_parentStyle; |
| 167 | 167 |
| 168 CSSAnimationUpdate m_animationUpdate; | 168 CSSAnimationUpdate m_animationUpdate; |
| 169 | 169 |
| 170 bool m_applyPropertyToRegularStyle; | 170 bool m_applyPropertyToRegularStyle; |
| 171 bool m_applyPropertyToVisitedLinkStyle; | 171 bool m_applyPropertyToVisitedLinkStyle; |
| 172 bool m_hasDirAutoAttribute; | 172 bool m_hasDirAutoAttribute; |
| 173 | 173 |
| 174 FontBuilder m_fontBuilder; | 174 FontBuilder m_fontBuilder; |
| 175 | 175 |
| 176 OwnPtr<CachedUAStyle> m_cachedUAStyle; | 176 OwnPtr<CachedUAStyle> m_cachedUAStyle; |
| 177 | 177 |
| 178 ElementStyleResources m_elementStyleResources; | 178 ElementStyleResources m_elementStyleResources; |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace blink | 181 } // namespace blink |
| 182 | 182 |
| 183 #endif // StyleResolverState_h | 183 #endif // StyleResolverState_h |
| OLD | NEW |