| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 StyleInheritedVariables_h | 5 #ifndef StyleInheritedVariables_h |
| 6 #define StyleInheritedVariables_h | 6 #define StyleInheritedVariables_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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Note that this method is slow as a new map is constructed. | 44 // Note that this method is slow as a new map is constructed. |
| 45 std::unique_ptr<HashMap<AtomicString, RefPtr<CSSVariableData>>> getVariables() | 45 std::unique_ptr<HashMap<AtomicString, RefPtr<CSSVariableData>>> getVariables() |
| 46 const; | 46 const; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 StyleInheritedVariables() : m_root(nullptr) {} | 49 StyleInheritedVariables() : m_root(nullptr) {} |
| 50 StyleInheritedVariables(StyleInheritedVariables& other); | 50 StyleInheritedVariables(StyleInheritedVariables& other); |
| 51 | 51 |
| 52 friend class CSSVariableResolver; | 52 friend class CSSVariableResolver; |
| 53 | 53 |
| 54 // Variables registered in this node. |
| 54 HashMap<AtomicString, RefPtr<CSSVariableData>> m_data; | 55 HashMap<AtomicString, RefPtr<CSSVariableData>> m_data; |
| 56 |
| 57 // Custom property values, registered with registerProperty(). |
| 55 HashMap<AtomicString, Persistent<CSSValue>> m_registeredData; | 58 HashMap<AtomicString, Persistent<CSSValue>> m_registeredData; |
| 59 |
| 60 // Parent variable values to inherit from. |
| 56 RefPtr<StyleInheritedVariables> m_root; | 61 RefPtr<StyleInheritedVariables> m_root; |
| 57 }; | 62 }; |
| 58 | 63 |
| 59 } // namespace blink | 64 } // namespace blink |
| 60 | 65 |
| 61 #endif // StyleInheritedVariables_h | 66 #endif // StyleInheritedVariables_h |
| OLD | NEW |