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

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

Issue 21006006: Add forEach() to CSSVariablesMap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and review changes Created 7 years, 2 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
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/CSSVariablesIterator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@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 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,
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 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 */ 19 */
20 20
21 #ifndef CSSStyleDeclaration_h 21 #ifndef CSSStyleDeclaration_h
22 #define CSSStyleDeclaration_h 22 #define CSSStyleDeclaration_h
23 23
24 #include "CSSPropertyNames.h" 24 #include "CSSPropertyNames.h"
25 #include "bindings/v8/ScriptWrappable.h" 25 #include "bindings/v8/ScriptWrappable.h"
26 #include "core/css/CSSVariablesIterator.h"
26 #include "core/css/CSSVariablesMap.h" 27 #include "core/css/CSSVariablesMap.h"
27 #include "wtf/Forward.h" 28 #include "wtf/Forward.h"
28 #include "wtf/Noncopyable.h" 29 #include "wtf/Noncopyable.h"
29 30
30 namespace WebCore { 31 namespace WebCore {
31 32
32 class CSSProperty; 33 class CSSProperty;
33 class CSSRule; 34 class CSSRule;
34 class CSSStyleSheet; 35 class CSSStyleSheet;
35 class CSSValue; 36 class CSSValue;
(...skipping 18 matching lines...) Expand all
54 virtual String getPropertyValue(const String& propertyName) = 0; 55 virtual String getPropertyValue(const String& propertyName) = 0;
55 virtual String getPropertyPriority(const String& propertyName) = 0; 56 virtual String getPropertyPriority(const String& propertyName) = 0;
56 virtual String getPropertyShorthand(const String& propertyName) = 0; 57 virtual String getPropertyShorthand(const String& propertyName) = 0;
57 virtual bool isPropertyImplicit(const String& propertyName) = 0; 58 virtual bool isPropertyImplicit(const String& propertyName) = 0;
58 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) = 0; 59 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) = 0;
59 virtual String removeProperty(const String& propertyName, ExceptionState&) = 0; 60 virtual String removeProperty(const String& propertyName, ExceptionState&) = 0;
60 61
61 PassRefPtr<CSSVariablesMap> var(); 62 PassRefPtr<CSSVariablesMap> var();
62 virtual unsigned variableCount() const = 0; 63 virtual unsigned variableCount() const = 0;
63 virtual String variableValue(const AtomicString& name) const = 0; 64 virtual String variableValue(const AtomicString& name) const = 0;
64 virtual void setVariableValue(const AtomicString& name, const String& value, ExceptionState&) = 0; 65 virtual bool setVariableValue(const AtomicString& name, const String& value, ExceptionState&) = 0; // Return value indicates whether variable was added.
65 virtual bool removeVariable(const AtomicString& name) = 0; 66 virtual bool removeVariable(const AtomicString& name) = 0;
66 virtual void clearVariables(ExceptionState&) = 0; 67 virtual bool clearVariables(ExceptionState&) = 0;
68 virtual PassRefPtr<CSSVariablesIterator> variablesIterator() const = 0;
67 69
68 // CSSPropertyID versions of the CSSOM functions to support bindings and edi ting. 70 // CSSPropertyID versions of the CSSOM functions to support bindings and edi ting.
69 // Use the non-virtual methods in the concrete subclasses when possible. 71 // Use the non-virtual methods in the concrete subclasses when possible.
70 // The CSSValue returned by this function should not be exposed to the web a s it may be used by multiple documents at the same time. 72 // The CSSValue returned by this function should not be exposed to the web a s it may be used by multiple documents at the same time.
71 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) = 0; 73 virtual PassRefPtr<CSSValue> getPropertyCSSValueInternal(CSSPropertyID) = 0;
72 virtual String getPropertyValueInternal(CSSPropertyID) = 0; 74 virtual String getPropertyValueInternal(CSSPropertyID) = 0;
73 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) = 0; 75 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) = 0;
74 76
75 virtual PassRefPtr<MutableStylePropertySet> copyProperties() const = 0; 77 virtual PassRefPtr<MutableStylePropertySet> copyProperties() const = 0;
76 78
77 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const = 0; 79 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const = 0;
78 virtual CSSStyleSheet* parentStyleSheet() const { return 0; } 80 virtual CSSStyleSheet* parentStyleSheet() const { return 0; }
79 81
80 protected: 82 protected:
81 CSSStyleDeclaration() 83 CSSStyleDeclaration()
82 { 84 {
83 ScriptWrappable::init(this); 85 ScriptWrappable::init(this);
84 } 86 }
85 RefPtr<CSSVariablesMap> m_variablesMap; 87 RefPtr<CSSVariablesMap> m_variablesMap;
86 }; 88 };
87 89
88 } // namespace WebCore 90 } // namespace WebCore
89 91
90 #endif // CSSStyleDeclaration_h 92 #endif // CSSStyleDeclaration_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/CSSVariablesIterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698