Bug 867089 - Validate the playbackRate before using it. r=ehsan
[gecko.git] / layout / style / nsCSSKeywords.h
blob48d4567a9d2e4124a7da34392a3a1a5679fa1e3e
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /* keywords used within CSS property values */
8 #ifndef nsCSSKeywords_h___
9 #define nsCSSKeywords_h___
11 #include "nsStringFwd.h"
14 Declare the enum list using the magic of preprocessing
15 enum values are "eCSSKeyword_foo" (where foo is the keyword)
17 To change the list of keywords, see nsCSSKeywordList.h
20 #define CSS_KEY(_name,_id) eCSSKeyword_##_id,
21 enum nsCSSKeyword {
22 eCSSKeyword_UNKNOWN = -1,
23 #include "nsCSSKeywordList.h"
24 eCSSKeyword_COUNT
26 #undef CSS_KEY
29 class nsCSSKeywords {
30 public:
31 static void AddRefTable(void);
32 static void ReleaseTable(void);
34 // Given a keyword string, return the enum value
35 static nsCSSKeyword LookupKeyword(const nsACString& aKeyword);
36 static nsCSSKeyword LookupKeyword(const nsAString& aKeyword);
38 // Given a keyword enum, get the string value
39 static const nsAFlatCString& GetStringValue(nsCSSKeyword aKeyword);
42 #endif /* nsCSSKeywords_h___ */