MediaFeatureNames.h [plain text]
#pragma once
#include <wtf/NeverDestroyed.h>
#include <wtf/text/AtomString.h>
#if ENABLE(APPLICATION_MANIFEST)
#define CSS_MEDIAQUERY_DISPLAY_MODE(macro) macro(displayMode, "display-mode")
#else
#define CSS_MEDIAQUERY_DISPLAY_MODE(macro)
#endif
#if ENABLE(DARK_MODE_CSS)
#define CSS_MEDIAQUERY_PREFERS_COLOR_SCHEME(macro) macro(prefersColorScheme, "prefers-color-scheme")
#else
#define CSS_MEDIAQUERY_PREFERS_COLOR_SCHEME(macro)
#endif
#define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \
macro(animation, "-webkit-animation") \
macro(anyHover, "any-hover") \
macro(anyPointer, "any-pointer") \
macro(aspectRatio, "aspect-ratio") \
macro(color, "color") \
macro(colorGamut, "color-gamut") \
macro(colorIndex, "color-index") \
macro(deviceAspectRatio, "device-aspect-ratio") \
macro(deviceHeight, "device-height") \
macro(devicePixelRatio, "-webkit-device-pixel-ratio") \
macro(deviceWidth, "device-width") \
macro(grid, "grid") \
macro(height, "height") \
macro(hover, "hover") \
macro(invertedColors, "inverted-colors") \
macro(maxAspectRatio, "max-aspect-ratio") \
macro(maxColor, "max-color") \
macro(maxColorIndex, "max-color-index") \
macro(maxDeviceAspectRatio, "max-device-aspect-ratio") \
macro(maxDeviceHeight, "max-device-height") \
macro(maxDevicePixelRatio, "-webkit-max-device-pixel-ratio") \
macro(maxDeviceWidth, "max-device-width") \
macro(maxHeight, "max-height") \
macro(maxMonochrome, "max-monochrome") \
macro(maxResolution, "max-resolution") \
macro(maxWidth, "max-width") \
macro(minAspectRatio, "min-aspect-ratio") \
macro(minColor, "min-color") \
macro(minColorIndex, "min-color-index") \
macro(minDeviceAspectRatio, "min-device-aspect-ratio") \
macro(minDeviceHeight, "min-device-height") \
macro(minDevicePixelRatio, "-webkit-min-device-pixel-ratio") \
macro(minDeviceWidth, "min-device-width") \
macro(minHeight, "min-height") \
macro(minMonochrome, "min-monochrome") \
macro(minResolution, "min-resolution") \
macro(minWidth, "min-width") \
macro(monochrome, "monochrome") \
macro(orientation, "orientation") \
macro(pointer, "pointer") \
macro(prefersDarkInterface, "prefers-dark-interface") \
macro(prefersReducedMotion, "prefers-reduced-motion") \
macro(resolution, "resolution") \
macro(transform2d, "-webkit-transform-2d") \
macro(transform3d, "-webkit-transform-3d") \
macro(transition, "-webkit-transition") \
macro(videoPlayableInline, "-webkit-video-playable-inline") \
macro(width, "width") \
CSS_MEDIAQUERY_DISPLAY_MODE(macro) \
CSS_MEDIAQUERY_PREFERS_COLOR_SCHEME(macro) \
namespace WebCore {
namespace MediaFeatureNames {
#define CSS_MEDIAQUERY_NAMES_DECLARE(name, string) extern LazyNeverDestroyed<const AtomString> name;
CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(CSS_MEDIAQUERY_NAMES_DECLARE)
#undef CSS_MEDIAQUERY_NAMES_DECLARE
void init();
} }