mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Derive ToCss for font-face sources
This commit is contained in:
parent
3ee6598abb
commit
3217d1404e
3 changed files with 11 additions and 30 deletions
|
@ -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(")")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue