Add color-gamut media query support
[WebKit-https.git] / Source / WebCore / css / MediaFeatureNames.h
1 /*
2  * Copyright (C) 2005, 2013 Apple Inc. All rights reserved.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB.  If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  *
19  */
20 #ifndef MediaFeatureNames_h
21 #define MediaFeatureNames_h
22
23 #include <wtf/text/AtomicString.h>
24
25 namespace WebCore {
26     namespace MediaFeatureNames {
27
28 #if ENABLE(VIEW_MODE_CSS_MEDIA)
29 #define CSS_MEDIAQUERY_VIEW_MODE(macro) macro(view_mode, "-webkit-view-mode")
30 #else
31 #define CSS_MEDIAQUERY_VIEW_MODE(macro)
32 #endif
33
34 #define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \
35     macro(any_hover, "any-hover") \
36     macro(any_pointer, "any-pointer") \
37     macro(color, "color") \
38     macro(color_index, "color-index") \
39     macro(color_gamut, "color-gamut") \
40     macro(grid, "grid") \
41     macro(monochrome, "monochrome") \
42     macro(height, "height") \
43     macro(hover, "hover") \
44     macro(width, "width") \
45     macro(orientation, "orientation") \
46     macro(aspect_ratio, "aspect-ratio") \
47     macro(device_aspect_ratio, "device-aspect-ratio") \
48     macro(device_pixel_ratio, "-webkit-device-pixel-ratio") \
49     macro(device_height, "device-height") \
50     macro(device_width, "device-width") \
51     macro(inverted_colors, "inverted-colors") \
52     macro(max_color, "max-color") \
53     macro(max_color_index, "max-color-index") \
54     macro(max_aspect_ratio, "max-aspect-ratio") \
55     macro(max_device_aspect_ratio, "max-device-aspect-ratio") \
56     macro(max_device_pixel_ratio, "-webkit-max-device-pixel-ratio") \
57     macro(max_device_height, "max-device-height") \
58     macro(max_device_width, "max-device-width") \
59     macro(max_height, "max-height") \
60     macro(max_monochrome, "max-monochrome") \
61     macro(max_width, "max-width") \
62     macro(max_resolution, "max-resolution") \
63     macro(min_color, "min-color") \
64     macro(min_color_index, "min-color-index") \
65     macro(min_aspect_ratio, "min-aspect-ratio") \
66     macro(min_device_aspect_ratio, "min-device-aspect-ratio") \
67     macro(min_device_pixel_ratio, "-webkit-min-device-pixel-ratio") \
68     macro(min_device_height, "min-device-height") \
69     macro(min_device_width, "min-device-width") \
70     macro(min_height, "min-height") \
71     macro(min_monochrome, "min-monochrome") \
72     macro(min_width, "min-width") \
73     macro(min_resolution, "min-resolution") \
74     macro(pointer, "pointer") \
75     macro(resolution, "resolution") \
76     macro(transform_2d, "-webkit-transform-2d") \
77     macro(transform_3d, "-webkit-transform-3d") \
78     macro(transition, "-webkit-transition") \
79     macro(animation, "-webkit-animation") \
80     macro(video_playable_inline, "-webkit-video-playable-inline") \
81     CSS_MEDIAQUERY_VIEW_MODE(macro)
82
83 // end of macro
84
85 #ifndef CSS_MEDIAQUERY_NAMES_HIDE_GLOBALS
86     #define CSS_MEDIAQUERY_NAMES_DECLARE(name, str) extern const AtomicString name##MediaFeature;
87     CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(CSS_MEDIAQUERY_NAMES_DECLARE)
88     #undef CSS_MEDIAQUERY_NAMES_DECLARE
89 #endif
90
91         void init();
92
93     } // namespace MediaFeatureNames
94 } // namespace WebCore
95
96 #endif // MediaFeatureNames_h