mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Derive ToCss for Symbol
This commit is contained in:
parent
ad7adee882
commit
83a2312867
1 changed files with 1 additions and 13 deletions
|
@ -391,7 +391,7 @@ impl ToCss for System {
|
|||
|
||||
/// <https://drafts.csswg.org/css-counter-styles/#typedef-symbol>
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq, ToComputedValue, ToCss)]
|
||||
pub enum Symbol {
|
||||
/// <string>
|
||||
String(String),
|
||||
|
@ -417,18 +417,6 @@ impl Parse for Symbol {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToCss for Symbol {
|
||||
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result
|
||||
where
|
||||
W: Write,
|
||||
{
|
||||
match *self {
|
||||
Symbol::String(ref s) => s.to_css(dest),
|
||||
Symbol::Ident(ref s) => s.to_css(dest),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Symbol {
|
||||
/// Returns whether this symbol is allowed in symbols() function.
|
||||
pub fn is_allowed_in_symbols(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue