| 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 15 matching lines...) Expand all Loading... |
| 26 #include "core/CoreExport.h" | 26 #include "core/CoreExport.h" |
| 27 #include "core/animation/css/CSSAnimationUpdate.h" | 27 #include "core/animation/css/CSSAnimationUpdate.h" |
| 28 #include "core/css/CSSSVGDocumentValue.h" | 28 #include "core/css/CSSSVGDocumentValue.h" |
| 29 #include "core/css/CSSToLengthConversionData.h" | 29 #include "core/css/CSSToLengthConversionData.h" |
| 30 #include "core/css/resolver/CSSToStyleMap.h" | 30 #include "core/css/resolver/CSSToStyleMap.h" |
| 31 #include "core/css/resolver/ElementResolveContext.h" | 31 #include "core/css/resolver/ElementResolveContext.h" |
| 32 #include "core/css/resolver/ElementStyleResources.h" | 32 #include "core/css/resolver/ElementStyleResources.h" |
| 33 #include "core/css/resolver/FontBuilder.h" | 33 #include "core/css/resolver/FontBuilder.h" |
| 34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
| 35 #include "core/dom/Element.h" | 35 #include "core/dom/Element.h" |
| 36 #include "core/layout/api/LayoutViewItem.h" |
| 36 #include "core/style/CachedUAStyle.h" | 37 #include "core/style/CachedUAStyle.h" |
| 37 #include "core/style/ComputedStyle.h" | 38 #include "core/style/ComputedStyle.h" |
| 38 #include "core/style/StyleInheritedData.h" | 39 #include "core/style/StyleInheritedData.h" |
| 39 | 40 |
| 40 namespace blink { | 41 namespace blink { |
| 41 | 42 |
| 42 class FontDescription; | 43 class FontDescription; |
| 43 | 44 |
| 44 class CORE_EXPORT StyleResolverState { | 45 class CORE_EXPORT StyleResolverState { |
| 45 STACK_ALLOCATED(); | 46 STACK_ALLOCATED(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 58 const ComputedStyle* rootElementStyle() const { return m_elementContext.root
ElementStyle(); } | 59 const ComputedStyle* rootElementStyle() const { return m_elementContext.root
ElementStyle(); } |
| 59 EInsideLink elementLinkState() const { return m_elementContext.elementLinkSt
ate(); } | 60 EInsideLink elementLinkState() const { return m_elementContext.elementLinkSt
ate(); } |
| 60 bool distributedToInsertionPoint() const { return m_elementContext.distribut
edToInsertionPoint(); } | 61 bool distributedToInsertionPoint() const { return m_elementContext.distribut
edToInsertionPoint(); } |
| 61 | 62 |
| 62 const ElementResolveContext& elementContext() const { return m_elementContex
t; } | 63 const ElementResolveContext& elementContext() const { return m_elementContex
t; } |
| 63 | 64 |
| 64 void setStyle(PassRefPtr<ComputedStyle> style) | 65 void setStyle(PassRefPtr<ComputedStyle> style) |
| 65 { | 66 { |
| 66 // FIXME: Improve RAII of StyleResolverState to remove this function. | 67 // FIXME: Improve RAII of StyleResolverState to remove this function. |
| 67 m_style = style; | 68 m_style = style; |
| 68 m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), r
ootElementStyle(), document().layoutView(), m_style->effectiveZoom()); | 69 m_cssToLengthConversionData = CSSToLengthConversionData(m_style.get(), r
ootElementStyle(), document().layoutViewItem(), m_style->effectiveZoom()); |
| 69 } | 70 } |
| 70 const ComputedStyle* style() const { return m_style.get(); } | 71 const ComputedStyle* style() const { return m_style.get(); } |
| 71 ComputedStyle* style() { return m_style.get(); } | 72 ComputedStyle* style() { return m_style.get(); } |
| 72 PassRefPtr<ComputedStyle> takeStyle() { return m_style.release(); } | 73 PassRefPtr<ComputedStyle> takeStyle() { return m_style.release(); } |
| 73 | 74 |
| 74 ComputedStyle& mutableStyleRef() const { return *m_style; } | 75 ComputedStyle& mutableStyleRef() const { return *m_style; } |
| 75 const ComputedStyle& styleRef() const { return mutableStyleRef(); } | 76 const ComputedStyle& styleRef() const { return mutableStyleRef(); } |
| 76 | 77 |
| 77 const CSSToLengthConversionData& cssToLengthConversionData() const { return
m_cssToLengthConversionData; } | 78 const CSSToLengthConversionData& cssToLengthConversionData() const { return
m_cssToLengthConversionData; } |
| 78 CSSToLengthConversionData fontSizeConversionData() const; | 79 CSSToLengthConversionData fontSizeConversionData() const; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 OwnPtr<CachedUAStyle> m_cachedUAStyle; | 184 OwnPtr<CachedUAStyle> m_cachedUAStyle; |
| 184 | 185 |
| 185 ElementStyleResources m_elementStyleResources; | 186 ElementStyleResources m_elementStyleResources; |
| 186 | 187 |
| 187 HeapHashMap<String, Member<StylePropertySet>> m_customPropertySetsForApplyAt
Rule; | 188 HeapHashMap<String, Member<StylePropertySet>> m_customPropertySetsForApplyAt
Rule; |
| 188 }; | 189 }; |
| 189 | 190 |
| 190 } // namespace blink | 191 } // namespace blink |
| 191 | 192 |
| 192 #endif // StyleResolverState_h | 193 #endif // StyleResolverState_h |
| OLD | NEW |