OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CSSPropertyIDTemplates_h |
| 6 #define CSSPropertyIDTemplates_h |
| 7 |
| 8 #include "core/CSSPropertyNames.h" |
| 9 #include "wtf/HashFunctions.h" |
| 10 #include "wtf/HashTraits.h" |
| 11 |
| 12 namespace WTF { |
| 13 template<> struct DefaultHash<blink::CSSPropertyID> { |
| 14 typedef IntHash<unsigned> Hash; |
| 15 }; |
| 16 template<> struct HashTraits<blink::CSSPropertyID> : GenericHashTraits<blink::CS
SPropertyID> { |
| 17 static const bool emptyValueIsZero = true; |
| 18 static void constructDeletedValue(blink::CSSPropertyID& slot, bool) { slot =
static_cast<blink::CSSPropertyID>(blink::lastUnresolvedCSSProperty + 1); } |
| 19 static bool isDeletedValue(blink::CSSPropertyID value) { return value == (bl
ink::lastUnresolvedCSSProperty + 1); } |
| 20 }; |
| 21 } // namespace WTF |
| 22 |
| 23 #endif // CSSPropertyIDTemplates_h |
OLD | NEW |