@@ -50,16 +50,15 @@ pub enum PseudoElement {
50
50
// them. Also, make sure the UA sheet has the !important rules some of the
51
51
// APPLIES_TO_PLACEHOLDER properties expect!
52
52
53
- Backdrop ,
54
-
55
53
// Non-eager pseudos.
54
+ Backdrop ,
56
55
DetailsSummary ,
57
56
DetailsContent ,
57
+ Marker ,
58
58
ServoAnonymousBox ,
59
59
ServoAnonymousTable ,
60
60
ServoAnonymousTableCell ,
61
61
ServoAnonymousTableRow ,
62
- ServoLegacyText ,
63
62
ServoLegacyInputText ,
64
63
ServoLegacyTableWrapper ,
65
64
ServoLegacyAnonymousTableWrapper ,
@@ -87,11 +86,11 @@ impl ToCss for PseudoElement {
87
86
Backdrop => "::backdrop" ,
88
87
DetailsSummary => "::-servo-details-summary" ,
89
88
DetailsContent => "::-servo-details-content" ,
89
+ Marker => "::marker" ,
90
90
ServoAnonymousBox => "::-servo-anonymous-box" ,
91
91
ServoAnonymousTable => "::-servo-anonymous-table" ,
92
92
ServoAnonymousTableCell => "::-servo-anonymous-table-cell" ,
93
93
ServoAnonymousTableRow => "::-servo-anonymous-table-row" ,
94
- ServoLegacyText => "::-servo-legacy-text" ,
95
94
ServoLegacyInputText => "::-servo-legacy-input-text" ,
96
95
ServoLegacyTableWrapper => "::-servo-legacy-table-wrapper" ,
97
96
ServoLegacyAnonymousTableWrapper => "::-servo-legacy-anonymous-table-wrapper" ,
@@ -155,7 +154,7 @@ impl PseudoElement {
155
154
/// Whether this pseudo-element is the ::marker pseudo.
156
155
#[ inline]
157
156
pub fn is_marker ( & self ) -> bool {
158
- false
157
+ * self == PseudoElement :: Marker
159
158
}
160
159
161
160
/// Whether this pseudo-element is the ::selection pseudo.
@@ -226,22 +225,25 @@ impl PseudoElement {
226
225
227
226
/// Returns which kind of cascade type has this pseudo.
228
227
///
229
- /// For more info on cascade types, see docs/components/style.md
228
+ /// See the documentation for `PseudoElementCascadeType` for how we choose
229
+ /// which cascade type to use.
230
230
///
231
- /// Note: Keep this in sync with EAGER_PSEUDO_COUNT.
231
+ /// Note: Keep eager pseudos in sync with `EAGER_PSEUDO_COUNT` and
232
+ /// `EMPTY_PSEUDO_ARRAY` in `style/data.rs`
232
233
#[ inline]
233
234
pub fn cascade_type ( & self ) -> PseudoElementCascadeType {
234
235
match * self {
235
236
PseudoElement :: After | PseudoElement :: Before | PseudoElement :: Selection => {
236
237
PseudoElementCascadeType :: Eager
237
238
} ,
238
- PseudoElement :: Backdrop | PseudoElement :: DetailsSummary => PseudoElementCascadeType :: Lazy ,
239
+ PseudoElement :: Backdrop |
240
+ PseudoElement :: DetailsSummary |
241
+ PseudoElement :: Marker => PseudoElementCascadeType :: Lazy ,
239
242
PseudoElement :: DetailsContent |
240
243
PseudoElement :: ServoAnonymousBox |
241
244
PseudoElement :: ServoAnonymousTable |
242
245
PseudoElement :: ServoAnonymousTableCell |
243
246
PseudoElement :: ServoAnonymousTableRow |
244
- PseudoElement :: ServoLegacyText |
245
247
PseudoElement :: ServoLegacyInputText |
246
248
PseudoElement :: ServoLegacyTableWrapper |
247
249
PseudoElement :: ServoLegacyAnonymousTableWrapper |
@@ -608,8 +610,9 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
608
610
let pseudo_element = match_ignore_ascii_case ! { & name,
609
611
"before" => Before ,
610
612
"after" => After ,
611
- "selection" => Selection ,
612
613
"backdrop" => Backdrop ,
614
+ "selection" => Selection ,
615
+ "marker" => Marker ,
613
616
"-servo-details-summary" => {
614
617
if !self . in_user_agent_stylesheet( ) {
615
618
return Err ( location. new_custom_error( SelectorParseErrorKind :: UnexpectedIdent ( name. clone( ) ) ) )
@@ -628,12 +631,6 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
628
631
}
629
632
ServoAnonymousBox
630
633
} ,
631
- "-servo-legacy-text" => {
632
- if !self . in_user_agent_stylesheet( ) {
633
- return Err ( location. new_custom_error( SelectorParseErrorKind :: UnexpectedIdent ( name. clone( ) ) ) )
634
- }
635
- ServoLegacyText
636
- } ,
637
634
"-servo-legacy-input-text" => {
638
635
if !self . in_user_agent_stylesheet( ) {
639
636
return Err ( location. new_custom_error( SelectorParseErrorKind :: UnexpectedIdent ( name. clone( ) ) ) )
0 commit comments