mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Implement ToCss for str and String
This commit is contained in:
parent
12dca42dd7
commit
c8c6f3482f
12 changed files with 40 additions and 75 deletions
|
@ -7,8 +7,8 @@
|
|||
//! [counter-style]: https://drafts.csswg.org/css-counter-styles/
|
||||
|
||||
use Atom;
|
||||
use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser, Token};
|
||||
use cssparser::{serialize_string, serialize_identifier};
|
||||
use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser};
|
||||
use cssparser::{Parser, Token, serialize_identifier};
|
||||
#[cfg(feature = "gecko")] use gecko::rules::CounterStyleDescriptors;
|
||||
#[cfg(feature = "gecko")] use gecko_bindings::structs::nsCSSCounterDesc;
|
||||
use parser::{ParserContext, log_css_error, Parse};
|
||||
|
@ -361,7 +361,7 @@ impl Parse for Symbol {
|
|||
impl ToCss for Symbol {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
match *self {
|
||||
Symbol::String(ref s) => serialize_string(s, dest),
|
||||
Symbol::String(ref s) => s.to_css(dest),
|
||||
Symbol::Ident(ref s) => serialize_identifier(s, dest),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue