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
25namespace 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(color, "color") \
36    macro(color_index, "color-index") \
37    macro(grid, "grid") \
38    macro(monochrome, "monochrome") \
39    macro(height, "height") \
40    macro(hover, "hover") \
41    macro(width, "width") \
42    macro(orientation, "orientation") \
43    macro(aspect_ratio, "aspect-ratio") \
44    macro(device_aspect_ratio, "device-aspect-ratio") \
45    macro(device_pixel_ratio, "-webkit-device-pixel-ratio") \
46    macro(device_height, "device-height") \
47    macro(device_width, "device-width") \
48    macro(max_color, "max-color") \
49    macro(max_color_index, "max-color-index") \
50    macro(max_aspect_ratio, "max-aspect-ratio") \
51    macro(max_device_aspect_ratio, "max-device-aspect-ratio") \
52    macro(max_device_pixel_ratio, "-webkit-max-device-pixel-ratio") \
53    macro(max_device_height, "max-device-height") \
54    macro(max_device_width, "max-device-width") \
55    macro(max_height, "max-height") \
56    macro(max_monochrome, "max-monochrome") \
57    macro(max_width, "max-width") \
58    macro(max_resolution, "max-resolution") \
59    macro(min_color, "min-color") \
60    macro(min_color_index, "min-color-index") \
61    macro(min_aspect_ratio, "min-aspect-ratio") \
62    macro(min_device_aspect_ratio, "min-device-aspect-ratio") \
63    macro(min_device_pixel_ratio, "-webkit-min-device-pixel-ratio") \
64    macro(min_device_height, "min-device-height") \
65    macro(min_device_width, "min-device-width") \
66    macro(min_height, "min-height") \
67    macro(min_monochrome, "min-monochrome") \
68    macro(min_width, "min-width") \
69    macro(min_resolution, "min-resolution") \
70    macro(pointer, "pointer") \
71    macro(resolution, "resolution") \
72    macro(transform_2d, "-webkit-transform-2d") \
73    macro(transform_3d, "-webkit-transform-3d") \
74    macro(transition, "-webkit-transition") \
75    macro(animation, "-webkit-animation") \
76    CSS_MEDIAQUERY_VIEW_MODE(macro)
77
78// end of macro
79
80#ifndef CSS_MEDIAQUERY_NAMES_HIDE_GLOBALS
81    #define CSS_MEDIAQUERY_NAMES_DECLARE(name, str) extern const AtomicString name##MediaFeature;
82    CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(CSS_MEDIAQUERY_NAMES_DECLARE)
83    #undef CSS_MEDIAQUERY_NAMES_DECLARE
84#endif
85
86        void init();
87
88    } // namespace MediaFeatureNames
89} // namespace WebCore
90
91#endif // MediaFeatureNames_h
92