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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class RenderObject; | 42 class RenderObject; |
43 class RenderStyle; | 43 class RenderStyle; |
44 class SVGPaint; | 44 class SVGPaint; |
45 class ShadowData; | 45 class ShadowData; |
46 class ShadowList; | 46 class ShadowList; |
47 class StylePropertySet; | 47 class StylePropertySet; |
48 class StylePropertyShorthand; | 48 class StylePropertyShorthand; |
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 FINAL : public CSSStyleDeclaration { |
53 private: | 53 private: |
54 class ComputedCSSVariablesIterator : public CSSVariablesIterator { | 54 class ComputedCSSVariablesIterator FINAL : public CSSVariablesIterator { |
55 public: | 55 public: |
56 virtual ~ComputedCSSVariablesIterator() { } | 56 virtual ~ComputedCSSVariablesIterator() { } |
57 static PassRefPtr<ComputedCSSVariablesIterator> create(const HashMap<Ato
micString, String>* variableMap) { return adoptRef(new ComputedCSSVariablesItera
tor(variableMap)); } | 57 static PassRefPtr<ComputedCSSVariablesIterator> create(const HashMap<Ato
micString, String>* variableMap) { return adoptRef(new ComputedCSSVariablesItera
tor(variableMap)); } |
58 private: | 58 private: |
59 explicit ComputedCSSVariablesIterator(const HashMap<AtomicString, String
>* variableMap); | 59 explicit ComputedCSSVariablesIterator(const HashMap<AtomicString, String
>* variableMap); |
60 virtual void advance() OVERRIDE; | 60 virtual void advance() OVERRIDE; |
61 virtual bool atEnd() const OVERRIDE { return m_it == m_end; } | 61 virtual bool atEnd() const OVERRIDE { return m_it == m_end; } |
62 virtual AtomicString name() const OVERRIDE; | 62 virtual AtomicString name() const OVERRIDE; |
63 virtual String value() const OVERRIDE; | 63 virtual String value() const OVERRIDE; |
64 bool m_active; | 64 bool m_active; |
(...skipping 29 matching lines...) Expand all Loading... |
94 CSSComputedStyleDeclaration(PassRefPtr<Node>, bool allowVisitedStyle, const
String&); | 94 CSSComputedStyleDeclaration(PassRefPtr<Node>, bool allowVisitedStyle, const
String&); |
95 | 95 |
96 // The styled node is either the node passed into getComputedStyle, or the | 96 // The styled node is either the node passed into getComputedStyle, or the |
97 // PseudoElement for :before and :after if they exist. | 97 // PseudoElement for :before and :after if they exist. |
98 // FIXME: This should be styledElement since in JS getComputedStyle only wor
ks | 98 // FIXME: This should be styledElement since in JS getComputedStyle only wor
ks |
99 // on Elements, but right now editing creates these for text nodes. We shoul
d fix | 99 // on Elements, but right now editing creates these for text nodes. We shoul
d fix |
100 // that. | 100 // that. |
101 Node* styledNode() const; | 101 Node* styledNode() const; |
102 | 102 |
103 // CSSOM functions. Don't make these public. | 103 // CSSOM functions. Don't make these public. |
104 virtual CSSRule* parentRule() const; | 104 virtual CSSRule* parentRule() const OVERRIDE; |
105 virtual unsigned length() const; | 105 virtual unsigned length() const OVERRIDE; |
106 virtual String item(unsigned index) const; | 106 virtual String item(unsigned index) const OVERRIDE; |
107 PassRefPtr<RenderStyle> computeRenderStyle(CSSPropertyID) const; | 107 PassRefPtr<RenderStyle> computeRenderStyle(CSSPropertyID) const; |
108 virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName)
; | 108 virtual PassRefPtr<CSSValue> getPropertyCSSValue(const String& propertyName)
OVERRIDE; |
109 virtual String getPropertyValue(const String& propertyName); | 109 virtual String getPropertyValue(const String& propertyName) OVERRIDE; |
110 virtual String getPropertyPriority(const String& propertyName); | 110 virtual String getPropertyPriority(const String& propertyName) OVERRIDE; |
111 virtual String getPropertyShorthand(const String& propertyName); | 111 virtual String getPropertyShorthand(const String& propertyName) OVERRIDE; |
112 virtual bool isPropertyImplicit(const String& propertyName); | 112 virtual bool isPropertyImplicit(const String& propertyName) OVERRIDE; |
113 virtual void setProperty(const String& propertyName, const String& value, co
nst String& priority, ExceptionState&); | 113 virtual void setProperty(const String& propertyName, const String& value, co
nst String& priority, ExceptionState&) OVERRIDE; |
114 virtual String removeProperty(const String& propertyName, ExceptionState&); | 114 virtual String removeProperty(const String& propertyName, ExceptionState&) O
VERRIDE; |
115 virtual String cssText() const; | 115 virtual String cssText() const OVERRIDE; |
116 virtual void setCSSText(const String&, ExceptionState&); | 116 virtual void setCSSText(const String&, ExceptionState&) OVERRIDE; |
117 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID); | 117 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) OVER
RIDE; |
118 virtual String getPropertyValueInternal(CSSPropertyID); | 118 virtual String getPropertyValueInternal(CSSPropertyID) OVERRIDE; |
119 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im
portant, ExceptionState&); | 119 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im
portant, ExceptionState&) OVERRIDE; |
120 | 120 |
121 const HashMap<AtomicString, String>* variableMap() const; | 121 const HashMap<AtomicString, String>* variableMap() const; |
122 virtual unsigned variableCount() const OVERRIDE; | 122 virtual unsigned variableCount() const OVERRIDE; |
123 virtual String variableValue(const AtomicString& name) const OVERRIDE; | 123 virtual String variableValue(const AtomicString& name) const OVERRIDE; |
124 virtual bool setVariableValue(const AtomicString& name, const String& value,
ExceptionState&) OVERRIDE; | 124 virtual bool setVariableValue(const AtomicString& name, const String& value,
ExceptionState&) OVERRIDE; |
125 virtual bool removeVariable(const AtomicString& name) OVERRIDE; | 125 virtual bool removeVariable(const AtomicString& name) OVERRIDE; |
126 virtual bool clearVariables(ExceptionState&) OVERRIDE; | 126 virtual bool clearVariables(ExceptionState&) OVERRIDE; |
127 virtual PassRefPtr<CSSVariablesIterator> variablesIterator() const OVERRIDE
{ return ComputedCSSVariablesIterator::create(variableMap()); } | 127 virtual PassRefPtr<CSSVariablesIterator> variablesIterator() const OVERRIDE
{ return ComputedCSSVariablesIterator::create(variableMap()); } |
128 | 128 |
129 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI
DE; | 129 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI
DE; |
(...skipping 12 matching lines...) Expand all Loading... |
142 | 142 |
143 RefPtr<Node> m_node; | 143 RefPtr<Node> m_node; |
144 PseudoId m_pseudoElementSpecifier; | 144 PseudoId m_pseudoElementSpecifier; |
145 bool m_allowVisitedStyle; | 145 bool m_allowVisitedStyle; |
146 unsigned m_refCount; | 146 unsigned m_refCount; |
147 }; | 147 }; |
148 | 148 |
149 } // namespace WebCore | 149 } // namespace WebCore |
150 | 150 |
151 #endif // CSSComputedStyleDeclaration_h | 151 #endif // CSSComputedStyleDeclaration_h |
OLD | NEW |