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

Unified Diff: third_party/WebKit/Source/core/css/CSSPropertyIDTemplates.h

Issue 2007073003: Move CSSPropertyID templates instantiations to a separate file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove more includes from CSSPropertyNames.h Created 4 years, 7 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/CSSPropertyIDTemplates.h
diff --git a/third_party/WebKit/Source/core/css/CSSPropertyIDTemplates.h b/third_party/WebKit/Source/core/css/CSSPropertyIDTemplates.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d984e1d016c4553af8784c57e4d3a6639c69f2f
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/CSSPropertyIDTemplates.h
@@ -0,0 +1,23 @@
+// 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.
+
+#ifndef CSSPropertyIDTemplates_h
+#define CSSPropertyIDTemplates_h
+
+#include "core/CSSPropertyNames.h"
+#include "wtf/HashFunctions.h"
+#include "wtf/HashTraits.h"
+
+namespace WTF {
+template<> struct DefaultHash<blink::CSSPropertyID> {
+ typedef IntHash<unsigned> Hash;
+};
+template<> struct HashTraits<blink::CSSPropertyID> : GenericHashTraits<blink::CSSPropertyID> {
+ static const bool emptyValueIsZero = true;
+ static void constructDeletedValue(blink::CSSPropertyID& slot, bool) { slot = static_cast<blink::CSSPropertyID>(blink::lastUnresolvedCSSProperty + 1); }
+ static bool isDeletedValue(blink::CSSPropertyID value) { return value == (blink::lastUnresolvedCSSProperty + 1); }
+};
+} // namespace WTF
+
+#endif // CSSPropertyIDTemplates_h

Powered by Google App Engine
This is Rietveld 408576698