| 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 ContainerNode* m_parentNode; | 69 ContainerNode* m_parentNode; |
| 70 RenderStyle* m_rootElementStyle; | 70 RenderStyle* m_rootElementStyle; |
| 71 EInsideLink m_elementLinkState; | 71 EInsideLink m_elementLinkState; |
| 72 bool m_distributedToInsertionPoint; | 72 bool m_distributedToInsertionPoint; |
| 73 bool m_resetStyleInheritance; | 73 bool m_resetStyleInheritance; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 // Initializes a StyleResolverState within a scope. | 76 // Initializes a StyleResolverState within a scope. |
| 77 class StyleResolveScope { | 77 class StyleResolveScope { |
| 78 public: | 78 public: |
| 79 StyleResolveScope(StyleResolverState*, Document*, Element*, RenderStyle* par
entStyle = 0, RenderRegion* regionForStyling = 0); | 79 StyleResolveScope(StyleResolverState*, const Document*, Element*, RenderStyl
e* parentStyle = 0, RenderRegion* regionForStyling = 0); |
| 80 ~StyleResolveScope(); | 80 ~StyleResolveScope(); |
| 81 private: | 81 private: |
| 82 StyleResolverState* m_state; | 82 StyleResolverState* m_state; |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 class StyleResolverState { | 85 class StyleResolverState { |
| 86 WTF_MAKE_NONCOPYABLE(StyleResolverState); | 86 WTF_MAKE_NONCOPYABLE(StyleResolverState); |
| 87 public: | 87 public: |
| 88 StyleResolverState() | 88 StyleResolverState() |
| 89 : m_regionForStyling(0) | 89 : m_regionForStyling(0) |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // Though all CSS values that can be applied to outermost <svg> elements (wi
dth/height/border/padding...) | 168 // Though all CSS values that can be applied to outermost <svg> elements (wi
dth/height/border/padding...) |
| 169 // need to respect the scaling. RenderBox (the parent class of RenderSVGRoot
) grabs values like | 169 // need to respect the scaling. RenderBox (the parent class of RenderSVGRoot
) grabs values like |
| 170 // width/height/border/padding/... from the RenderStyle -> for SVG these val
ues would never scale, | 170 // width/height/border/padding/... from the RenderStyle -> for SVG these val
ues would never scale, |
| 171 // if we'd pass a 1.0 zoom factor everyhwere. So we only pass a zoom factor
of 1.0 for specific | 171 // if we'd pass a 1.0 zoom factor everyhwere. So we only pass a zoom factor
of 1.0 for specific |
| 172 // properties that are NOT allowed to scale within a zoomed SVG document (le
tter/word-spacing/font-size). | 172 // properties that are NOT allowed to scale within a zoomed SVG document (le
tter/word-spacing/font-size). |
| 173 bool useSVGZoomRules() const { return element() && element()->isSVGElement()
; } | 173 bool useSVGZoomRules() const { return element() && element()->isSVGElement()
; } |
| 174 | 174 |
| 175 private: | 175 private: |
| 176 friend class StyleResolveScope; | 176 friend class StyleResolveScope; |
| 177 | 177 |
| 178 void initForStyleResolve(Document*, Element*, RenderStyle* parentStyle = 0,
RenderRegion* regionForStyling = 0); | 178 void initForStyleResolve(const Document*, Element*, RenderStyle* parentStyle
= 0, RenderRegion* regionForStyling = 0); |
| 179 void clear(); | 179 void clear(); |
| 180 | 180 |
| 181 void initElement(Element*); | 181 void initElement(Element*); |
| 182 | 182 |
| 183 ElementResolveContext m_elementContext; | 183 ElementResolveContext m_elementContext; |
| 184 | 184 |
| 185 // m_style is the primary output for each element's style resolve. | 185 // m_style is the primary output for each element's style resolve. |
| 186 RefPtr<RenderStyle> m_style; | 186 RefPtr<RenderStyle> m_style; |
| 187 | 187 |
| 188 // m_parentStyle is not always just element->parentNode()->style() | 188 // m_parentStyle is not always just element->parentNode()->style() |
| (...skipping 21 matching lines...) Expand all Loading... |
| 210 | 210 |
| 211 ElementStyleResources m_elementStyleResources; | 211 ElementStyleResources m_elementStyleResources; |
| 212 // CSSToStyleMap is a pure-logic class and only contains | 212 // CSSToStyleMap is a pure-logic class and only contains |
| 213 // a back-pointer to this object. | 213 // a back-pointer to this object. |
| 214 CSSToStyleMap m_styleMap; | 214 CSSToStyleMap m_styleMap; |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 } // namespace WebCore | 217 } // namespace WebCore |
| 218 | 218 |
| 219 #endif // StyleResolverState_h | 219 #endif // StyleResolverState_h |
| OLD | NEW |