mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Move -x-lang outside of mako
This commit is contained in:
parent
3864f320e8
commit
d671859426
5 changed files with 38 additions and 35 deletions
|
@ -4,7 +4,6 @@
|
|||
|
||||
//! Specified values for font properties
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
use Atom;
|
||||
use app_units::Au;
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
|
@ -1821,6 +1820,34 @@ impl ToCss for XTextZoom {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
|
||||
/// Internal property that reflects the lang attribute
|
||||
pub struct XLang(pub Atom);
|
||||
|
||||
impl XLang {
|
||||
#[inline]
|
||||
/// Get default value for `-x-lang`
|
||||
pub fn get_initial_value() -> XLang {
|
||||
XLang(atom!(""))
|
||||
}
|
||||
}
|
||||
|
||||
impl Parse for XLang {
|
||||
fn parse<'i, 't>(
|
||||
_: &ParserContext,
|
||||
input: &mut Parser<'i, 't>
|
||||
) -> Result<XLang, ParseError<'i>> {
|
||||
debug_assert!(false, "Should be set directly by presentation attributes only.");
|
||||
Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
|
||||
}
|
||||
}
|
||||
|
||||
impl ToCss for XLang {
|
||||
fn to_css<W>(&self, _: &mut W) -> fmt::Result where W: fmt::Write {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
|
||||
#[derive(Clone, Debug, PartialEq, ToCss)]
|
||||
/// Specifies the minimum font size allowed due to changes in scriptlevel.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue