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

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

Issue 2106073005: Add fast-path for propagated variable changes (WIP) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@+pointer_events_fastpath_5
Patch Set: Rebase Created 4 years, 1 month 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698