Skip to content

Commit

Permalink
Bug 1860666 - Use an ascii-case-insensitive PHF map for always-enable…
Browse files Browse the repository at this point in the history
…d pseudo-elements. r=boris

Depends on D192095

Differential Revision: https://phabricator.services.mozilla.com/D192096

UltraBlame original commit: 61e57e6ba3b7e09a71062e7cdc44f395af832716
  • Loading branch information
marco-c committed Oct 30, 2023
1 parent 2bbedf9 commit f0fd6fe
Showing 1 changed file with 38 additions and 33 deletions.
71 changes: 38 additions & 33 deletions servo/components/style/gecko/pseudo_element_definition.mako.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1055,10 +1055,15 @@ Option
Self
>
{
match_ignore_ascii_case
ascii_case_insensitive_phf_map
!
{
name
pseudo
-
>
PseudoElement
=
{
%
for
pseudo
Expand All @@ -1079,17 +1084,11 @@ value
=
>
{
return
Some
(
{
pseudo_element_variant
(
pseudo
)
}
)
}
%
endfor
/
Expand All @@ -1115,17 +1114,10 @@ selection
"
=
>
{
return
Some
(
PseudoElement
:
:
Selection
)
;
}
"
-
moz
Expand All @@ -1134,17 +1126,10 @@ placeholder
"
=
>
{
return
Some
(
PseudoElement
:
:
Placeholder
)
;
}
"
-
moz
Expand All @@ -1153,7 +1138,12 @@ list
-
bullet
"
|
=
>
PseudoElement
:
:
Marker
"
-
moz
Expand All @@ -1164,21 +1154,38 @@ number
"
=
>
{
return
Some
(
PseudoElement
:
:
Marker
)
;
}
_
}
if
let
Some
(
p
)
=
>
pseudo
:
:
get
(
name
)
{
return
Some
(
p
.
clone
(
)
)
;
}
if
starts_with_ignore_ascii_case
(
Expand Down Expand Up @@ -1264,8 +1271,6 @@ into
)
;
}
}
}
None
}
#
Expand Down

0 comments on commit f0fd6fe

Please sign in to comment.