Skip to content

Commit

Permalink
Add servo-anonymous-table (#16)
Browse files Browse the repository at this point in the history
This goes along with the existing `servo-anonymous-table-cell` and
`servo-anonymous-table-row`.
  • Loading branch information
mrobinson authored Mar 8, 2024
1 parent 3f129fb commit ca5648c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions style/servo/selector_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ pub enum PseudoElement {
DetailsSummary,
DetailsContent,
ServoAnonymousBox,
ServoAnonymousTable,
ServoAnonymousTableCell,
ServoAnonymousTableRow,
ServoLegacyText,
Expand Down Expand Up @@ -82,6 +83,7 @@ impl ToCss for PseudoElement {
DetailsSummary => "::-servo-details-summary",
DetailsContent => "::-servo-details-content",
ServoAnonymousBox => "::-servo-anonymous-box",
ServoAnonymousTable => "::-servo-anonymous-table",
ServoAnonymousTableCell => "::-servo-anonymous-table-cell",
ServoAnonymousTableRow => "::-servo-anonymous-table-row",
ServoLegacyText => "::-servo-legacy-text",
Expand Down Expand Up @@ -229,6 +231,7 @@ impl PseudoElement {
PseudoElement::DetailsSummary => PseudoElementCascadeType::Lazy,
PseudoElement::DetailsContent |
PseudoElement::ServoAnonymousBox |
PseudoElement::ServoAnonymousTable |
PseudoElement::ServoAnonymousTableCell |
PseudoElement::ServoAnonymousTableRow |
PseudoElement::ServoLegacyText |
Expand Down Expand Up @@ -554,6 +557,12 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
}
ServoLegacyAnonymousTable
},
"-servo-anonymous-table" => {
if !self.in_user_agent_stylesheet() {
return Err(location.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
}
ServoAnonymousTable
},
"-servo-anonymous-table-row" => {
if !self.in_user_agent_stylesheet() {
return Err(location.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
Expand Down

0 comments on commit ca5648c

Please sign in to comment.