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