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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleNonInheritedVariables.h

Issue 2630683002: Move custom property isInheritedProperty storage logic into ComputedStyle (Closed)
Patch Set: Undo cscssvm change Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef StyleNonInheritedVariables_h 5 #ifndef StyleNonInheritedVariables_h
6 #define StyleNonInheritedVariables_h 6 #define StyleNonInheritedVariables_h
7 7
8 #include "core/css/CSSValue.h" 8 #include "core/css/CSSValue.h"
9 #include "core/css/CSSVariableData.h" 9 #include "core/css/CSSVariableData.h"
10 #include "wtf/Forward.h" 10 #include "wtf/Forward.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 void setVariable(const AtomicString& name, 31 void setVariable(const AtomicString& name,
32 PassRefPtr<CSSVariableData> value) { 32 PassRefPtr<CSSVariableData> value) {
33 m_data.set(name, std::move(value)); 33 m_data.set(name, std::move(value));
34 } 34 }
35 CSSVariableData* getVariable(const AtomicString& name) const; 35 CSSVariableData* getVariable(const AtomicString& name) const;
36 void removeVariable(const AtomicString&); 36 void removeVariable(const AtomicString&);
37 37
38 void setRegisteredVariable(const AtomicString&, const CSSValue*); 38 void setRegisteredVariable(const AtomicString&, const CSSValue*);
39 CSSValue* registeredVariable(const AtomicString& name) const { 39 const CSSValue* registeredVariable(const AtomicString& name) const {
40 return m_registeredData.get(name); 40 return m_registeredData.get(name);
41 } 41 }
42 42
43 private: 43 private:
44 StyleNonInheritedVariables() = default; 44 StyleNonInheritedVariables() = default;
45 StyleNonInheritedVariables(StyleNonInheritedVariables&); 45 StyleNonInheritedVariables(StyleNonInheritedVariables&);
46 46
47 friend class CSSVariableResolver; 47 friend class CSSVariableResolver;
48 48
49 HashMap<AtomicString, RefPtr<CSSVariableData>> m_data; 49 HashMap<AtomicString, RefPtr<CSSVariableData>> m_data;
50 HashMap<AtomicString, Persistent<CSSValue>> m_registeredData; 50 HashMap<AtomicString, Persistent<CSSValue>> m_registeredData;
51 }; 51 };
52 52
53 } // namespace blink 53 } // namespace blink
54 54
55 #endif // StyleNonInheritedVariables_h 55 #endif // StyleNonInheritedVariables_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698