Introduce #[css(skip)]

This commit is contained in:
Anthony Ramine 2018-03-05 15:37:36 +01:00
parent 7931df716d
commit ca45695db1
8 changed files with 31 additions and 96 deletions

View file

@ -40,13 +40,14 @@ pub use values::specified::font::{XTextZoom, XLang, MozScriptSizeMultiplier, Fon
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
pub struct FontWeight(pub u16);
#[derive(Animate, ComputeSquaredDistance, MallocSizeOf, ToAnimatedZero)]
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf)]
#[derive(PartialEq, ToAnimatedZero, ToCss)]
/// The computed value of font-size
pub struct FontSize {
/// The size.
pub size: NonNegativeLength,
/// If derived from a keyword, the keyword and additional transformations applied to it
#[css(skip)]
pub keyword_info: Option<KeywordInfo>,
}
@ -159,12 +160,6 @@ impl FontSize {
}
}
impl ToCss for FontSize {
fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
self.size.to_css(dest)
}
}
/// XXXManishearth it might be better to
/// animate this as computed, however this complicates
/// clamping and might not be the right thing to do.