mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Introduce #[css(skip)]
This commit is contained in:
parent
7931df716d
commit
ca45695db1
8 changed files with 31 additions and 96 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue