Rename AtomicString to AtomString
[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
21 #pragma once
22
23 #include <wtf/NeverDestroyed.h>
24 #include <wtf/text/AtomString.h>
25
26 #if ENABLE(APPLICATION_MANIFEST)
27 #define CSS_MEDIAQUERY_DISPLAY_MODE(macro) macro(displayMode, "display-mode")
28 #else
29 #define CSS_MEDIAQUERY_DISPLAY_MODE(macro)
30 #endif
31
32 #if ENABLE(DARK_MODE_CSS)
33 #define CSS_MEDIAQUERY_PREFERS_COLOR_SCHEME(macro) macro(prefersColorScheme, "prefers-color-scheme")
34 #else
35 #define CSS_MEDIAQUERY_PREFERS_COLOR_SCHEME(macro)
36 #endif
37
38 #define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \
39     macro(animation, "-webkit-animation") \
40     macro(anyHover, "any-hover") \
41     macro(anyPointer, "any-pointer") \
42     macro(aspectRatio, "aspect-ratio") \
43     macro(color, "color") \
44     macro(colorGamut, "color-gamut") \
45     macro(colorIndex, "color-index") \
46     macro(deviceAspectRatio, "device-aspect-ratio") \
47     macro(deviceHeight, "device-height") \
48     macro(devicePixelRatio, "-webkit-device-pixel-ratio") \
49     macro(deviceWidth, "device-width") \
50     macro(grid, "grid") \
51     macro(height, "height") \
52     macro(hover, "hover") \
53     macro(invertedColors, "inverted-colors") \
54     macro(maxAspectRatio, "max-aspect-ratio") \
55     macro(maxColor, "max-color") \
56     macro(maxColorIndex, "max-color-index") \
57     macro(maxDeviceAspectRatio, "max-device-aspect-ratio") \
58     macro(maxDeviceHeight, "max-device-height") \
59     macro(maxDevicePixelRatio, "-webkit-max-device-pixel-ratio") \
60     macro(maxDeviceWidth, "max-device-width") \
61     macro(maxHeight, "max-height") \
62     macro(maxMonochrome, "max-monochrome") \
63     macro(maxResolution, "max-resolution") \
64     macro(maxWidth, "max-width") \
65     macro(minAspectRatio, "min-aspect-ratio") \
66     macro(minColor, "min-color") \
67     macro(minColorIndex, "min-color-index") \
68     macro(minDeviceAspectRatio, "min-device-aspect-ratio") \
69     macro(minDeviceHeight, "min-device-height") \
70     macro(minDevicePixelRatio, "-webkit-min-device-pixel-ratio") \
71     macro(minDeviceWidth, "min-device-width") \
72     macro(minHeight, "min-height") \
73     macro(minMonochrome, "min-monochrome") \
74     macro(minResolution, "min-resolution") \
75     macro(minWidth, "min-width") \
76     macro(monochrome, "monochrome") \
77     macro(orientation, "orientation") \
78     macro(pointer, "pointer") \
79     macro(prefersDarkInterface, "prefers-dark-interface") \
80     macro(prefersReducedMotion, "prefers-reduced-motion") \
81     macro(resolution, "resolution") \
82     macro(transform2d, "-webkit-transform-2d") \
83     macro(transform3d, "-webkit-transform-3d") \
84     macro(transition, "-webkit-transition") \
85     macro(videoPlayableInline, "-webkit-video-playable-inline") \
86     macro(width, "width") \
87     CSS_MEDIAQUERY_DISPLAY_MODE(macro) \
88     CSS_MEDIAQUERY_PREFERS_COLOR_SCHEME(macro) \
89
90 // end of macro
91
92 namespace WebCore {
93 namespace MediaFeatureNames {
94
95 #define CSS_MEDIAQUERY_NAMES_DECLARE(name, string) extern LazyNeverDestroyed<const AtomString> name;
96     CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(CSS_MEDIAQUERY_NAMES_DECLARE)
97 #undef CSS_MEDIAQUERY_NAMES_DECLARE
98
99     void init();
100
101 } // namespace MediaFeatureNames
102 } // namespace WebCore