1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 /* list of CSS pseudo-elements */
10 * This file contains the list of support CSS pseudo-elements and some flags.
11 * It is designed to be used as inline input to nsCSSPseudoElements.cpp *only*
12 * through the magic of C preprocessing. All entries must be enclosed either
13 * in the macro CSS_PSEUDO_ELEMENT; these macros will have cruel and unusual
14 * things done to them. The entries should be kept in some sort of logical
17 * Code including this file MUST define CSS_PSEUDO_ELEMENT, which takes
19 * name_ : The C++ identifier used for the atom (which will be a member
20 * of nsCSSPseudoElements)
21 * value_ : The pseudo-element as a string, with single-colon syntax,
22 * used as the string value of the atom.
23 * flags_ : A bitfield containing flags defined in nsCSSPseudoElements.h
25 * A corresponding atom must also be defined in StaticAtoms.py with a name of
26 * "PseudoElement_<name_>" and whose value matches the definition in this file.
29 // OUTPUT_CLASS=nsCSSPseudoElements
30 // MACRO_NAME=CSS_PSEUDO_ELEMENT
32 CSS_PSEUDO_ELEMENT(after
, ":after", CSS_PSEUDO_ELEMENT_IS_CSS2
|
33 CSS_PSEUDO_ELEMENT_IS_FLEX_OR_GRID_ITEM
)
34 CSS_PSEUDO_ELEMENT(before
, ":before", CSS_PSEUDO_ELEMENT_IS_CSS2
|
35 CSS_PSEUDO_ELEMENT_IS_FLEX_OR_GRID_ITEM
)
36 CSS_PSEUDO_ELEMENT(marker
, ":marker", 0)
38 CSS_PSEUDO_ELEMENT(backdrop
, ":backdrop", 0)
40 CSS_PSEUDO_ELEMENT(cue
, ":cue", CSS_PSEUDO_ELEMENT_IS_JS_CREATED_NAC
|
41 CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE
)
43 CSS_PSEUDO_ELEMENT(firstLetter
, ":first-letter",
44 CSS_PSEUDO_ELEMENT_IS_CSS2
|
45 CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS
)
46 CSS_PSEUDO_ELEMENT(firstLine
, ":first-line",
47 CSS_PSEUDO_ELEMENT_IS_CSS2
|
48 CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS
)
49 CSS_PSEUDO_ELEMENT(highlight
, ":highlight", 0)
51 CSS_PSEUDO_ELEMENT(selection
, ":selection",
52 CSS_PSEUDO_ELEMENT_CONTAINS_ELEMENTS
)
54 CSS_PSEUDO_ELEMENT(targetText
, ":target-text", 0)
55 // XXXbz should we really allow random content to style these? Maybe
56 // use our flags to prevent that?
57 CSS_PSEUDO_ELEMENT(mozFocusInner
, ":-moz-focus-inner", 0)
59 // HTML5 Forms pseudo elements
60 CSS_PSEUDO_ELEMENT(mozNumberSpinBox
, ":-moz-number-spin-box",
61 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
|
62 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME
)
63 CSS_PSEUDO_ELEMENT(mozNumberSpinUp
, ":-moz-number-spin-up",
64 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
|
65 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME
)
66 CSS_PSEUDO_ELEMENT(mozNumberSpinDown
, ":-moz-number-spin-down",
67 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
|
68 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME
)
69 CSS_PSEUDO_ELEMENT(mozSearchClearButton
, ":-moz-search-clear-button",
70 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
|
71 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME
)
72 CSS_PSEUDO_ELEMENT(mozProgressBar
, ":-moz-progress-bar",
73 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
)
74 CSS_PSEUDO_ELEMENT(mozRangeTrack
, ":-moz-range-track",
75 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
)
76 CSS_PSEUDO_ELEMENT(mozRangeProgress
, ":-moz-range-progress",
77 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
)
78 CSS_PSEUDO_ELEMENT(mozRangeThumb
, ":-moz-range-thumb",
79 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
)
80 CSS_PSEUDO_ELEMENT(mozMeterBar
, ":-moz-meter-bar",
81 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
)
82 CSS_PSEUDO_ELEMENT(placeholder
, ":placeholder",
83 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
)
84 CSS_PSEUDO_ELEMENT(mozColorSwatch
, ":-moz-color-swatch",
85 CSS_PSEUDO_ELEMENT_SUPPORTS_STYLE_ATTRIBUTE
|
86 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
)
87 // The root of the text value anonymous content inside an <input> or <textarea>.
88 CSS_PSEUDO_ELEMENT(mozTextControlEditingRoot
, ":-moz-text-control-editing-root",
89 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS
)
90 // The element that shows the autofill value.
91 CSS_PSEUDO_ELEMENT(mozTextControlPreview
, ":-moz-text-control-preview",
92 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS
)
93 // The Reveal Password button for <input type=password>.
94 CSS_PSEUDO_ELEMENT(mozReveal
, ":-moz-reveal",
95 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS
)
97 // The button in an <input type=file>
98 CSS_PSEUDO_ELEMENT(fileSelectorButton
, ":file-selector-button",
99 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
)
101 // Standard progress/meter/range pseudo-elements.
102 CSS_PSEUDO_ELEMENT(sliderTrack
, ":slider-track",
103 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
|
104 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME
)
105 CSS_PSEUDO_ELEMENT(sliderThumb
, ":slider-thumb",
106 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
|
107 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME
)
108 CSS_PSEUDO_ELEMENT(sliderFill
, ":slider-fill",
109 CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE
|
110 CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME
)