mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Stylo: Implement {specified|computed}::LayerImage.
This commit is contained in:
parent
1b9e1cc1f2
commit
3c3e7f63ee
9 changed files with 96 additions and 263 deletions
|
@ -677,3 +677,17 @@ impl AngleOrCorner {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Computed values for none | <image> | <mask-source>.
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub struct LayerImage(pub Option<Image>);
|
||||
|
||||
impl ToCss for LayerImage {
|
||||
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
match self.0 {
|
||||
None => dest.write_str("none"),
|
||||
Some(ref image) => image.to_css(dest),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue