Derive ToCss for font-face sources

This commit is contained in:
Anthony Ramine 2017-06-17 02:59:46 +02:00
parent 3ee6598abb
commit 3217d1404e
3 changed files with 11 additions and 30 deletions

View file

@ -4,12 +4,11 @@
//! Common handling for the specified value CSS url() values.
use cssparser::CssStringWriter;
use gecko_bindings::structs::{ServoBundledURI, URLExtraData};
use gecko_bindings::structs::root::mozilla::css::ImageValue;
use gecko_bindings::sugar::refptr::RefPtr;
use parser::ParserContext;
use std::fmt::{self, Write};
use std::fmt;
use style_traits::{ToCss, ParseError};
use stylearc::Arc;
@ -100,8 +99,8 @@ impl SpecifiedUrl {
impl ToCss for SpecifiedUrl {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
try!(dest.write_str("url(\""));
try!(CssStringWriter::new(dest).write_str(&*self.serialization));
dest.write_str("\")")
dest.write_str("url(")?;
self.serialization.to_css(dest)?;
dest.write_str(")")
}
}