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

Unified Diff: third_party/WebKit/Source/core/css/PropertyRegistry.cpp

Issue 2310823002: Skeleton implementation of CSS Properties and Values API (Closed)
Patch Set: fix stylevardata copy ctor Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/PropertyRegistry.cpp
diff --git a/third_party/WebKit/Source/core/css/PropertyRegistry.cpp b/third_party/WebKit/Source/core/css/PropertyRegistry.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a06c989520cc36573d4179800724041a869be9a8
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/PropertyRegistry.cpp
@@ -0,0 +1,28 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/css/PropertyRegistry.h"
+
+namespace blink {
+
+void PropertyRegistry::registerProperty(const AtomicString& name, const CSSSyntaxDescriptor& syntax, bool inherits, const CSSValue* initial)
+{
+ DCHECK(!registration(name));
+ // TODO(timloh): We only support inherited properties for now.
+ inherits = true;
+ m_registrations.set(name, new Registration(syntax, inherits, initial));
+}
+
+void PropertyRegistry::unregisterProperty(const AtomicString& name)
+{
+ DCHECK(registration(name));
+ m_registrations.remove(name);
+}
+
+const PropertyRegistry::Registration* PropertyRegistry::registration(const AtomicString& name) const
+{
+ return m_registrations.get(name);
+}
+
+} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/PropertyRegistry.h ('k') | third_party/WebKit/Source/core/css/parser/CSSVariableParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698