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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // Though all CSS values that can be applied to outermost <svg> elements (wi
dth/height/border/padding...) | 125 // Though all CSS values that can be applied to outermost <svg> elements (wi
dth/height/border/padding...) |
126 // need to respect the scaling. RenderBox (the parent class of RenderSVGRoot
) grabs values like | 126 // need to respect the scaling. RenderBox (the parent class of RenderSVGRoot
) grabs values like |
127 // width/height/border/padding/... from the RenderStyle -> for SVG these val
ues would never scale, | 127 // width/height/border/padding/... from the RenderStyle -> for SVG these val
ues would never scale, |
128 // if we'd pass a 1.0 zoom factor everyhwere. So we only pass a zoom factor
of 1.0 for specific | 128 // if we'd pass a 1.0 zoom factor everyhwere. So we only pass a zoom factor
of 1.0 for specific |
129 // properties that are NOT allowed to scale within a zoomed SVG document (le
tter/word-spacing/font-size). | 129 // properties that are NOT allowed to scale within a zoomed SVG document (le
tter/word-spacing/font-size). |
130 bool useSVGZoomRules() const { return element() && element()->isSVGElement()
; } | 130 bool useSVGZoomRules() const { return element() && element()->isSVGElement()
; } |
131 | 131 |
132 private: | 132 private: |
133 friend class StyleResolveScope; | 133 friend class StyleResolveScope; |
134 | 134 |
135 void initElement(Element*); | |
136 | |
137 ElementResolveContext m_elementContext; | 135 ElementResolveContext m_elementContext; |
138 Document& m_document; | 136 Document& m_document; |
139 | 137 |
140 // m_style is the primary output for each element's style resolve. | 138 // m_style is the primary output for each element's style resolve. |
141 RefPtr<RenderStyle> m_style; | 139 RefPtr<RenderStyle> m_style; |
142 | 140 |
143 // m_parentStyle is not always just element->parentNode()->style() | 141 // m_parentStyle is not always just element->parentNode()->style() |
144 // so we keep it separate from m_elementContext. | 142 // so we keep it separate from m_elementContext. |
145 RefPtr<RenderStyle> m_parentStyle; | 143 RefPtr<RenderStyle> m_parentStyle; |
146 | 144 |
(...skipping 18 matching lines...) Expand all Loading... |
165 // a back-pointer to this object. | 163 // a back-pointer to this object. |
166 CSSToStyleMap m_styleMap; | 164 CSSToStyleMap m_styleMap; |
167 Vector<AtomicString> m_contentAttrValues; | 165 Vector<AtomicString> m_contentAttrValues; |
168 | 166 |
169 StyleRule* m_currentRule; | 167 StyleRule* m_currentRule; |
170 }; | 168 }; |
171 | 169 |
172 } // namespace WebCore | 170 } // namespace WebCore |
173 | 171 |
174 #endif // StyleResolverState_h | 172 #endif // StyleResolverState_h |
OLD | NEW |