mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +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.
|
||||
|
|
|
@ -2015,9 +2015,9 @@ impl Parse for VariationValue<Number> {
|
|||
}
|
||||
|
||||
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
/// text-zoom. Enable if true, disable if false
|
||||
pub struct XTextZoom(pub bool);
|
||||
pub struct XTextZoom(#[css(skip)] pub bool);
|
||||
|
||||
impl Parse for XTextZoom {
|
||||
fn parse<'i, 't>(_: &ParserContext, input: &mut Parser<'i, 't>) -> Result<XTextZoom, ParseError<'i>> {
|
||||
|
@ -2026,18 +2026,9 @@ impl Parse for XTextZoom {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToCss for XTextZoom {
|
||||
fn to_css<W>(&self, _: &mut CssWriter<W>) -> fmt::Result
|
||||
where
|
||||
W: Write,
|
||||
{
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
/// Internal property that reflects the lang attribute
|
||||
pub struct XLang(pub Atom);
|
||||
pub struct XLang(#[css(skip)] pub Atom);
|
||||
|
||||
impl XLang {
|
||||
#[inline]
|
||||
|
@ -2057,15 +2048,6 @@ impl Parse for XLang {
|
|||
}
|
||||
}
|
||||
|
||||
impl ToCss for XLang {
|
||||
fn to_css<W>(&self, _: &mut CssWriter<W>) -> fmt::Result
|
||||
where
|
||||
W: Write,
|
||||
{
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, ToCss)]
|
||||
/// Specifies the minimum font size allowed due to changes in scriptlevel.
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
|
||||
use cssparser::Parser;
|
||||
use parser::{Parse, ParserContext};
|
||||
use std::fmt;
|
||||
use style_traits::{CssWriter, ToCss, StyleParseErrorKind, ParseError};
|
||||
use style_traits::{StyleParseErrorKind, ParseError};
|
||||
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
|
||||
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
|
||||
/// span. for `<col span>` pres attr
|
||||
pub struct XSpan(pub i32);
|
||||
pub struct XSpan(#[css(skip)] pub i32);
|
||||
|
||||
impl Parse for XSpan {
|
||||
// never parse it, only set via presentation attribute
|
||||
|
@ -19,9 +18,3 @@ impl Parse for XSpan {
|
|||
Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for XSpan {
|
||||
fn to_css<W>(&self, _: &mut CssWriter<W>) -> fmt::Result where W: fmt::Write {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue