Auto merge of #17215 - servo:derive-all-the-things, r=emilio

Derive more ToCss impls

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17215)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-06-09 05:00:45 -07:00 committed by GitHub
commit 1555f0fc41
15 changed files with 54 additions and 96 deletions

View file

@ -6,7 +6,7 @@
//! initially in CSS Conditional Rules Module Level 3, @document has been postponed to the level 4.
//! We implement the prefixed `@-moz-document`.
use cssparser::{Parser, Token, SourceLocation, serialize_string};
use cssparser::{Parser, Token, SourceLocation};
use media_queries::Device;
use parser::{Parse, ParserContext};
use shared_lock::{DeepCloneWithLock, Locked, SharedRwLock, SharedRwLockReadGuard, ToCssWithGuard};
@ -160,17 +160,17 @@ impl ToCss for UrlMatchingFunction {
},
UrlMatchingFunction::UrlPrefix(ref url_prefix) => {
dest.write_str("url-prefix(")?;
serialize_string(url_prefix, dest)?;
url_prefix.to_css(dest)?;
dest.write_str(")")
},
UrlMatchingFunction::Domain(ref domain) => {
dest.write_str("domain(")?;
serialize_string(domain, dest)?;
domain.to_css(dest)?;
dest.write_str(")")
},
UrlMatchingFunction::RegExp(ref regex) => {
dest.write_str("regexp(")?;
serialize_string(regex, dest)?;
regex.to_css(dest)?;
dest.write_str(")")
},
}