mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
Utilize match_ignore_ascii_case! in more places.
This commit is contained in:
parent
6238035612
commit
befe538472
5 changed files with 39 additions and 46 deletions
|
@ -1586,10 +1586,10 @@ where Impl: SelectorImpl, F: FnOnce(i32, i32) -> Component<Impl> {
|
|||
/// double-colon syntax, which can be used for all pseudo-elements).
|
||||
pub fn is_css2_pseudo_element<'i>(name: &CowRcStr<'i>) -> bool {
|
||||
// ** Do not add to this list! **
|
||||
return name.eq_ignore_ascii_case("before") ||
|
||||
name.eq_ignore_ascii_case("after") ||
|
||||
name.eq_ignore_ascii_case("first-line") ||
|
||||
name.eq_ignore_ascii_case("first-letter");
|
||||
match_ignore_ascii_case! { name,
|
||||
"before" | "after" | "first-line" | "first-letter" => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Parse a simple selector other than a type selector.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue