OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 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 Lesser General Public | 6 * modify it under the terms of the GNU Lesser 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 class ShadowData; | 43 class ShadowData; |
44 class StylePropertySet; | 44 class StylePropertySet; |
45 class StylePropertyShorthand; | 45 class StylePropertyShorthand; |
46 | 46 |
47 class CustomFilterNumberParameter; | 47 class CustomFilterNumberParameter; |
48 class CustomFilterParameter; | 48 class CustomFilterParameter; |
49 | 49 |
50 enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; | 50 enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; |
51 | 51 |
52 class CSSComputedStyleDeclaration : public CSSStyleDeclaration { | 52 class CSSComputedStyleDeclaration : public CSSStyleDeclaration { |
| 53 private: |
| 54 class ComputedCSSVariablesIterator : public CSSVariablesIterator { |
| 55 public: |
| 56 virtual ~ComputedCSSVariablesIterator() { } |
| 57 static PassRefPtr<ComputedCSSVariablesIterator> create(const HashMap<Ato
micString, String>* variableMap) { return adoptRef(new ComputedCSSVariablesItera
tor(variableMap)); } |
| 58 private: |
| 59 explicit ComputedCSSVariablesIterator(const HashMap<AtomicString, String
>* variableMap); |
| 60 virtual void advance() OVERRIDE; |
| 61 virtual bool atEnd() const OVERRIDE { return m_it == m_end; } |
| 62 virtual AtomicString name() const OVERRIDE; |
| 63 virtual String value() const OVERRIDE; |
| 64 bool m_active; |
| 65 HashMap<AtomicString, String>::const_iterator m_it; |
| 66 HashMap<AtomicString, String>::const_iterator m_end; |
| 67 }; |
| 68 |
53 public: | 69 public: |
54 static PassRefPtr<CSSComputedStyleDeclaration> create(PassRefPtr<Node> node,
bool allowVisitedStyle = false, const String& pseudoElementName = String()) | 70 static PassRefPtr<CSSComputedStyleDeclaration> create(PassRefPtr<Node> node,
bool allowVisitedStyle = false, const String& pseudoElementName = String()) |
55 { | 71 { |
56 return adoptRef(new CSSComputedStyleDeclaration(node, allowVisitedStyle,
pseudoElementName)); | 72 return adoptRef(new CSSComputedStyleDeclaration(node, allowVisitedStyle,
pseudoElementName)); |
57 } | 73 } |
58 virtual ~CSSComputedStyleDeclaration(); | 74 virtual ~CSSComputedStyleDeclaration(); |
59 | 75 |
60 virtual void ref() OVERRIDE; | 76 virtual void ref() OVERRIDE; |
61 virtual void deref() OVERRIDE; | 77 virtual void deref() OVERRIDE; |
62 | 78 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID); | 116 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID); |
101 virtual String getPropertyValueInternal(CSSPropertyID); | 117 virtual String getPropertyValueInternal(CSSPropertyID); |
102 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im
portant, ExceptionCode&); | 118 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im
portant, ExceptionCode&); |
103 | 119 |
104 const HashMap<AtomicString, String>* variableMap() const; | 120 const HashMap<AtomicString, String>* variableMap() const; |
105 virtual unsigned variableCount() const OVERRIDE; | 121 virtual unsigned variableCount() const OVERRIDE; |
106 virtual String variableValue(const AtomicString& name) const OVERRIDE; | 122 virtual String variableValue(const AtomicString& name) const OVERRIDE; |
107 virtual void setVariableValue(const AtomicString& name, const String& value,
ExceptionCode&) OVERRIDE; | 123 virtual void setVariableValue(const AtomicString& name, const String& value,
ExceptionCode&) OVERRIDE; |
108 virtual bool removeVariable(const AtomicString& name) OVERRIDE; | 124 virtual bool removeVariable(const AtomicString& name) OVERRIDE; |
109 virtual void clearVariables(ExceptionCode&) OVERRIDE; | 125 virtual void clearVariables(ExceptionCode&) OVERRIDE; |
| 126 virtual PassRefPtr<CSSVariablesIterator> variablesIterator() const OVERRIDE
{ return ComputedCSSVariablesIterator::create(variableMap()); } |
110 | 127 |
111 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI
DE; | 128 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI
DE; |
112 | 129 |
113 PassRefPtr<CSSValue> valueForShadow(const RenderObject*, const ShadowData*,
CSSPropertyID, const RenderStyle*) const; | 130 PassRefPtr<CSSValue> valueForShadow(const RenderObject*, const ShadowData*,
CSSPropertyID, const RenderStyle*) const; |
114 PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle*, const S
tyleColor&) const; | 131 PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle*, const S
tyleColor&) const; |
115 PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(const RenderObject*,
const RenderStyle*, int colorProperty) const; | 132 PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(const RenderObject*,
const RenderStyle*, int colorProperty) const; |
116 PassRefPtr<SVGPaint> adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint>, Ren
derStyle*) const; | 133 PassRefPtr<SVGPaint> adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint>, Ren
derStyle*) const; |
117 | 134 |
118 PassRefPtr<CSSValue> valueForFilter(const RenderObject*, const RenderStyle*)
const; | 135 PassRefPtr<CSSValue> valueForFilter(const RenderObject*, const RenderStyle*)
const; |
119 | 136 |
120 PassRefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const St
ylePropertyShorthand&) const; | 137 PassRefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const St
ylePropertyShorthand&) const; |
121 PassRefPtr<CSSValueList> getCSSPropertyValuesForSidesShorthand(const StylePr
opertyShorthand&) const; | 138 PassRefPtr<CSSValueList> getCSSPropertyValuesForSidesShorthand(const StylePr
opertyShorthand&) const; |
122 PassRefPtr<CSSValueList> getBackgroundShorthandValue() const; | 139 PassRefPtr<CSSValueList> getBackgroundShorthandValue() const; |
123 PassRefPtr<CSSValueList> getCSSPropertyValuesForGridShorthand(const StylePro
pertyShorthand&) const; | 140 PassRefPtr<CSSValueList> getCSSPropertyValuesForGridShorthand(const StylePro
pertyShorthand&) const; |
124 | 141 |
125 RefPtr<Node> m_node; | 142 RefPtr<Node> m_node; |
126 PseudoId m_pseudoElementSpecifier; | 143 PseudoId m_pseudoElementSpecifier; |
127 bool m_allowVisitedStyle; | 144 bool m_allowVisitedStyle; |
128 unsigned m_refCount; | 145 unsigned m_refCount; |
129 }; | 146 }; |
130 | 147 |
131 } // namespace WebCore | 148 } // namespace WebCore |
132 | 149 |
133 #endif // CSSComputedStyleDeclaration_h | 150 #endif // CSSComputedStyleDeclaration_h |
OLD | NEW |