mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
style: Move -x-text-zoom outside of mako
This commit is contained in:
parent
d94cd4fa9b
commit
cefc622e9b
5 changed files with 30 additions and 31 deletions
|
@ -8,9 +8,10 @@
|
|||
use Atom;
|
||||
use app_units::Au;
|
||||
use cssparser::Parser;
|
||||
use parser::{Parse, ParserContext};
|
||||
use properties::longhands::system_font::SystemFont;
|
||||
use std::fmt;
|
||||
use style_traits::{ToCss, ParseError};
|
||||
use style_traits::{ToCss, StyleParseErrorKind, ParseError};
|
||||
use values::computed::{font as computed, Context, NonNegativeLength, ToComputedValue};
|
||||
use values::specified::{LengthOrPercentage, NoCalcLength};
|
||||
use values::specified::length::FontBaseSize;
|
||||
|
@ -373,3 +374,20 @@ impl FontSize {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
|
||||
/// text-zoom. Enable if true, disable if false
|
||||
pub struct XTextZoom(pub bool);
|
||||
|
||||
impl Parse for XTextZoom {
|
||||
fn parse<'i, 't>(_: &ParserContext, input: &mut Parser<'i, 't>) -> Result<XTextZoom, ParseError<'i>> {
|
||||
debug_assert!(false, "Should be set directly by presentation attributes only.");
|
||||
Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for XTextZoom {
|
||||
fn to_css<W>(&self, _: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue