| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 Element* element() const { return m_elementContext.element(); } | 55 Element* element() const { return m_elementContext.element(); } |
| 56 const ContainerNode* parentNode() const { return m_elementContext.parentNode
(); } | 56 const ContainerNode* parentNode() const { return m_elementContext.parentNode
(); } |
| 57 const RenderStyle* rootElementStyle() const { return m_elementContext.rootEl
ementStyle(); } | 57 const RenderStyle* rootElementStyle() const { return m_elementContext.rootEl
ementStyle(); } |
| 58 EInsideLink elementLinkState() const { return m_elementContext.elementLinkSt
ate(); } | 58 EInsideLink elementLinkState() const { return m_elementContext.elementLinkSt
ate(); } |
| 59 bool distributedToInsertionPoint() const { return m_elementContext.distribut
edToInsertionPoint(); } | 59 bool distributedToInsertionPoint() const { return m_elementContext.distribut
edToInsertionPoint(); } |
| 60 | 60 |
| 61 const ElementResolveContext& elementContext() const { return m_elementContex
t; } | 61 const ElementResolveContext& elementContext() const { return m_elementContex
t; } |
| 62 | 62 |
| 63 void setStyle(PassRefPtr<RenderStyle> style) | 63 void setStyle(PassRefPtr<RenderStyle> style) |
| 64 { | 64 { |
| 65 // FIXME: Improve RAII of StyleResolverState to remove this function. |
| 65 m_style = style; | 66 m_style = style; |
| 66 m_cssToLengthConversionData.setStyle(m_style.get()); | 67 m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), r
ootElementStyle(), document().renderView(), m_style->effectiveZoom()); |
| 67 m_fontBuilder.setStyle(m_style.get()); | 68 m_fontBuilder.setStyle(m_style.get()); |
| 68 } | 69 } |
| 69 const RenderStyle* style() const { return m_style.get(); } | 70 const RenderStyle* style() const { return m_style.get(); } |
| 70 RenderStyle* style() { return m_style.get(); } | 71 RenderStyle* style() { return m_style.get(); } |
| 71 PassRefPtr<RenderStyle> takeStyle() { return m_style.release(); } | 72 PassRefPtr<RenderStyle> takeStyle() { return m_style.release(); } |
| 72 | 73 |
| 73 const CSSToLengthConversionData& cssToLengthConversionData() const { return
m_cssToLengthConversionData; } | 74 const CSSToLengthConversionData& cssToLengthConversionData() const { return
m_cssToLengthConversionData; } |
| 74 | 75 |
| 76 void setConversionFontSizes(const CSSToLengthConversionData::FontSizes& font
Sizes) { m_cssToLengthConversionData.setFontSizes(fontSizes); } |
| 77 void setConversionZoom(float zoom) { m_cssToLengthConversionData.setZoom(zoo
m); } |
| 78 |
| 75 void setAnimationUpdate(PassOwnPtrWillBeRawPtr<CSSAnimationUpdate>); | 79 void setAnimationUpdate(PassOwnPtrWillBeRawPtr<CSSAnimationUpdate>); |
| 76 const CSSAnimationUpdate* animationUpdate() { return m_animationUpdate.get()
; } | 80 const CSSAnimationUpdate* animationUpdate() { return m_animationUpdate.get()
; } |
| 77 PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> takeAnimationUpdate(); | 81 PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> takeAnimationUpdate(); |
| 78 | 82 |
| 79 void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = p
arentStyle; } | 83 void setParentStyle(PassRefPtr<RenderStyle> parentStyle) { m_parentStyle = p
arentStyle; } |
| 80 const RenderStyle* parentStyle() const { return m_parentStyle.get(); } | 84 const RenderStyle* parentStyle() const { return m_parentStyle.get(); } |
| 81 RenderStyle* parentStyle() { return m_parentStyle.get(); } | 85 RenderStyle* parentStyle() { return m_parentStyle.get(); } |
| 82 | 86 |
| 83 // FIXME: These are effectively side-channel "out parameters" for the variou
s | 87 // FIXME: These are effectively side-channel "out parameters" for the variou
s |
| 84 // map functions. When we map from CSS to style objects we use this state ob
ject | 88 // map functions. When we map from CSS to style objects we use this state ob
ject |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 ElementStyleResources m_elementStyleResources; | 161 ElementStyleResources m_elementStyleResources; |
| 158 // CSSToStyleMap is a pure-logic class and only contains | 162 // CSSToStyleMap is a pure-logic class and only contains |
| 159 // a back-pointer to this object. | 163 // a back-pointer to this object. |
| 160 CSSToStyleMap m_styleMap; | 164 CSSToStyleMap m_styleMap; |
| 161 Vector<AtomicString> m_contentAttrValues; | 165 Vector<AtomicString> m_contentAttrValues; |
| 162 }; | 166 }; |
| 163 | 167 |
| 164 } // namespace blink | 168 } // namespace blink |
| 165 | 169 |
| 166 #endif // StyleResolverState_h | 170 #endif // StyleResolverState_h |
| OLD | NEW |