Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions style/servo/selector_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub enum PseudoElement {
// Private, Servo-specific implemented pseudos. Only matchable in UA sheet.
ServoTextControlInnerContainer,
ServoTextControlInnerEditor,
ServoCheckmark,

// Other Servo-specific pseudos.
ServoAnonymousBox,
Expand Down Expand Up @@ -98,6 +99,7 @@ impl ToCss for PseudoElement {
Marker => "::marker",
ColorSwatch => "::color-swatch",
Placeholder => "::placeholder",
ServoCheckmark => "::-servo-checkmark",
ServoTextControlInnerContainer => "::-servo-text-control-inner-container",
ServoTextControlInnerEditor => "::-servo-text-control-inner-editor",
ServoAnonymousBox => "::-servo-anonymous-box",
Expand Down Expand Up @@ -248,6 +250,7 @@ impl PseudoElement {
| PseudoElement::DetailsSummary
| PseudoElement::Marker
| PseudoElement::Placeholder
| PseudoElement::ServoCheckmark
| PseudoElement::ServoTextControlInnerContainer
| PseudoElement::ServoTextControlInnerEditor => PseudoElementCascadeType::Lazy,
PseudoElement::DetailsContent
Expand Down Expand Up @@ -632,6 +635,12 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
"backdrop" => Backdrop,
"selection" => Selection,
"marker" => Marker,
"-servo-checkmark" => {
if !self.in_user_agent_stylesheet() {
return Err(location.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
}
ServoCheckmark
},
"-servo-details-summary" => {
if !self.in_user_agent_stylesheet() {
return Err(location.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
Expand Down