mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Define types for pseudo-class string argument storage.
This commit is contained in:
parent
094052c544
commit
e299905606
2 changed files with 8 additions and 2 deletions
|
@ -24,6 +24,9 @@ bitflags! {
|
|||
}
|
||||
}
|
||||
|
||||
/// The type used for storing pseudo-class string arguments.
|
||||
pub type PseudoClassStringArg = Box<[u16]>;
|
||||
|
||||
macro_rules! pseudo_class_name {
|
||||
(bare: [$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*],
|
||||
string: [$(($s_css:expr, $s_name:ident, $s_gecko_type:tt, $s_state:tt, $s_flags:tt),)*],
|
||||
|
@ -37,7 +40,7 @@ macro_rules! pseudo_class_name {
|
|||
)*
|
||||
$(
|
||||
#[doc = $s_css]
|
||||
$s_name(Box<[u16]>),
|
||||
$s_name(PseudoClassStringArg),
|
||||
)*
|
||||
$(
|
||||
#[doc = $k_css]
|
||||
|
|
|
@ -160,6 +160,9 @@ impl PseudoElement {
|
|||
}
|
||||
}
|
||||
|
||||
/// The type used for storing pseudo-class string arguments.
|
||||
pub type PseudoClassStringArg = Box<str>;
|
||||
|
||||
/// A non tree-structural pseudo-class.
|
||||
/// See https://drafts.csswg.org/selectors-4/#structural-pseudos
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
|
@ -175,7 +178,7 @@ pub enum NonTSPseudoClass {
|
|||
Fullscreen,
|
||||
Hover,
|
||||
Indeterminate,
|
||||
Lang(Box<str>),
|
||||
Lang(PseudoClassStringArg),
|
||||
Link,
|
||||
PlaceholderShown,
|
||||
ReadWrite,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue