Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.h

Issue 18311002: Partial implementation of CSSVariablesMap for CSS Variables CSSOM (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor optimisation to clearVariables Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details. 13 * Lesser General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Lesser General Public 15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software 16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301 USA 18 * 02110-1301 USA
19 */ 19 */
20 20
21 #ifndef CSSComputedStyleDeclaration_h 21 #ifndef CSSComputedStyleDeclaration_h
22 #define CSSComputedStyleDeclaration_h 22 #define CSSComputedStyleDeclaration_h
23 23
24 #include "core/css/CSSStyleDeclaration.h" 24 #include "core/css/CSSStyleDeclaration.h"
25 #include "core/css/CSSVariablesMap.h"
25 #include "core/rendering/style/RenderStyleConstants.h" 26 #include "core/rendering/style/RenderStyleConstants.h"
26 #include <wtf/RefPtr.h> 27 #include "wtf/HashMap.h"
27 #include <wtf/text/WTFString.h> 28 #include "wtf/RefPtr.h"
29 #include "wtf/text/AtomicString.h"
30 #include "wtf/text/AtomicStringHash.h"
31 #include "wtf/text/WTFString.h"
28 32
29 namespace WebCore { 33 namespace WebCore {
30 34
31 class CSSPrimitiveValue; 35 class CSSPrimitiveValue;
32 class CSSValueList; 36 class CSSValueList;
33 class Color; 37 class Color;
34 class MutableStylePropertySet; 38 class MutableStylePropertySet;
35 class Node; 39 class Node;
36 class RenderObject; 40 class RenderObject;
37 class RenderStyle; 41 class RenderStyle;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 virtual String getPropertyShorthand(const String& propertyName); 96 virtual String getPropertyShorthand(const String& propertyName);
93 virtual bool isPropertyImplicit(const String& propertyName); 97 virtual bool isPropertyImplicit(const String& propertyName);
94 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionCode&); 98 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionCode&);
95 virtual String removeProperty(const String& propertyName, ExceptionCode&); 99 virtual String removeProperty(const String& propertyName, ExceptionCode&);
96 virtual String cssText() const; 100 virtual String cssText() const;
97 virtual void setCssText(const String&, ExceptionCode&); 101 virtual void setCssText(const String&, ExceptionCode&);
98 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID); 102 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID);
99 virtual String getPropertyValueInternal(CSSPropertyID); 103 virtual String getPropertyValueInternal(CSSPropertyID);
100 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionCode&); 104 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionCode&);
101 105
106 virtual PassRefPtr<CSSVariablesMap> var() OVERRIDE { return CSSVariablesMap: :create(this); }
esprehn 2013/07/10 02:42:11 This isn't correct, you need to keep it in a membe
alancutter (OOO until 2018) 2013/07/10 11:18:13 CSSStyleDeclaration now has a RefPtr to CSSVariabl
107 const HashMap<AtomicString, String>* variableMap() const;
108 virtual unsigned variableCount() const OVERRIDE;
109 virtual String variableValue(const AtomicString& name) const OVERRIDE;
110 virtual void setVariableValue(const AtomicString& name, const String& value, ExceptionCode&) OVERRIDE;
111 virtual bool removeVariable(const AtomicString& name) OVERRIDE;
112 virtual void clearVariables(ExceptionCode&) OVERRIDE;
113
102 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI DE; 114 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const OVERRI DE;
103 115
104 PassRefPtr<CSSValue> valueForShadow(const ShadowData*, CSSPropertyID, const RenderStyle*) const; 116 PassRefPtr<CSSValue> valueForShadow(const ShadowData*, CSSPropertyID, const RenderStyle*) const;
105 PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle*, const C olor&) const; 117 PassRefPtr<CSSPrimitiveValue> currentColorOrValidColor(RenderStyle*, const C olor&) const;
106 PassRefPtr<SVGPaint> adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint>, Ren derStyle*) const; 118 PassRefPtr<SVGPaint> adjustSVGPaintForCurrentColor(PassRefPtr<SVGPaint>, Ren derStyle*) const;
107 119
108 PassRefPtr<CSSValue> valueForFilter(const RenderObject*, const RenderStyle*) const; 120 PassRefPtr<CSSValue> valueForFilter(const RenderObject*, const RenderStyle*) const;
109 121
110 PassRefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const St ylePropertyShorthand&) const; 122 PassRefPtr<CSSValueList> getCSSPropertyValuesForShorthandProperties(const St ylePropertyShorthand&) const;
111 PassRefPtr<CSSValueList> getCSSPropertyValuesForSidesShorthand(const StylePr opertyShorthand&) const; 123 PassRefPtr<CSSValueList> getCSSPropertyValuesForSidesShorthand(const StylePr opertyShorthand&) const;
112 PassRefPtr<CSSValueList> getBackgroundShorthandValue() const; 124 PassRefPtr<CSSValueList> getBackgroundShorthandValue() const;
113 PassRefPtr<CSSValueList> getCSSPropertyValuesForGridShorthand(const StylePro pertyShorthand&) const; 125 PassRefPtr<CSSValueList> getCSSPropertyValuesForGridShorthand(const StylePro pertyShorthand&) const;
114 126
115 RefPtr<Node> m_node; 127 RefPtr<Node> m_node;
116 PseudoId m_pseudoElementSpecifier; 128 PseudoId m_pseudoElementSpecifier;
117 bool m_allowVisitedStyle; 129 bool m_allowVisitedStyle;
118 unsigned m_refCount; 130 unsigned m_refCount;
119 }; 131 };
120 132
121 } // namespace WebCore 133 } // namespace WebCore
122 134
123 #endif // CSSComputedStyleDeclaration_h 135 #endif // CSSComputedStyleDeclaration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698