Bug 1300731 - stylo: Implement mask-image; r?heycam

This commit is contained in:
Manish Goregaokar 2016-09-06 18:20:30 +08:00
parent 075a430b99
commit 7138ad7d7e
6 changed files with 283 additions and 144 deletions

View file

@ -537,6 +537,18 @@ impl fmt::Debug for Image {
}
}
impl ::cssparser::ToCss for Image {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
use values::LocalToCss;
match *self {
Image::Url(ref url, _) => {
url.to_css(dest)
}
Image::LinearGradient(ref gradient) => gradient.to_css(dest)
}
}
}
/// Computed values for a CSS linear gradient.
#[derive(Clone, PartialEq)]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]