mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #19030 - CYBAI:move-properties-out-of-mako, r=emilio
style: Move -x-text-zoom outside of mako Sub-PR for #19015 r? emilio --- - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #19020 . <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19030) <!-- Reviewable:end -->
This commit is contained in:
commit
dff1d99307
5 changed files with 30 additions and 31 deletions
|
@ -2239,36 +2239,13 @@ ${helpers.single_keyword("-moz-math-variant",
|
||||||
}
|
}
|
||||||
</%helpers:longhand>
|
</%helpers:longhand>
|
||||||
|
|
||||||
<%helpers:longhand name="-x-text-zoom" products="gecko" animation_value_type="none" internal="True"
|
${helpers.predefined_type("-x-text-zoom",
|
||||||
spec="Internal (not web-exposed)">
|
"XTextZoom",
|
||||||
pub use self::computed_value::T as SpecifiedValue;
|
"computed::XTextZoom(true)",
|
||||||
|
animation_value_type="none",
|
||||||
pub mod computed_value {
|
products="gecko",
|
||||||
use std::fmt;
|
internal=True,
|
||||||
use style_traits::ToCss;
|
spec="Internal (not web-exposed)")}
|
||||||
|
|
||||||
impl ToCss for T {
|
|
||||||
fn to_css<W>(&self, _: &mut W) -> fmt::Result where W: fmt::Write {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue)]
|
|
||||||
/// text-zoom. Enable if true, disable if false
|
|
||||||
pub struct T(pub bool);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline]
|
|
||||||
pub fn get_initial_value() -> computed_value::T {
|
|
||||||
computed_value::T(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
|
|
||||||
-> Result<SpecifiedValue, ParseError<'i>> {
|
|
||||||
debug_assert!(false, "Should be set directly by presentation attributes only.");
|
|
||||||
Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError))
|
|
||||||
}
|
|
||||||
</%helpers:longhand>
|
|
||||||
|
|
||||||
% if product == "gecko":
|
% if product == "gecko":
|
||||||
pub mod system_font {
|
pub mod system_font {
|
||||||
|
|
|
@ -11,6 +11,8 @@ use values::animated::ToAnimatedValue;
|
||||||
use values::computed::NonNegativeLength;
|
use values::computed::NonNegativeLength;
|
||||||
use values::specified::font as specified;
|
use values::specified::font as specified;
|
||||||
|
|
||||||
|
pub use values::specified::font::XTextZoom;
|
||||||
|
|
||||||
#[derive(Animate, ComputeSquaredDistance, MallocSizeOf, ToAnimatedZero)]
|
#[derive(Animate, ComputeSquaredDistance, MallocSizeOf, ToAnimatedZero)]
|
||||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||||
/// The computed value of font-size
|
/// The computed value of font-size
|
||||||
|
|
|
@ -36,6 +36,7 @@ pub use self::angle::Angle;
|
||||||
pub use self::background::{BackgroundSize, BackgroundRepeat};
|
pub use self::background::{BackgroundSize, BackgroundRepeat};
|
||||||
pub use self::border::{BorderImageSlice, BorderImageWidth, BorderImageSideWidth};
|
pub use self::border::{BorderImageSlice, BorderImageWidth, BorderImageSideWidth};
|
||||||
pub use self::border::{BorderRadius, BorderCornerRadius, BorderSpacing};
|
pub use self::border::{BorderRadius, BorderCornerRadius, BorderSpacing};
|
||||||
|
pub use self::font::XTextZoom;
|
||||||
pub use self::box_::{AnimationIterationCount, AnimationName, ScrollSnapType, VerticalAlign};
|
pub use self::box_::{AnimationIterationCount, AnimationName, ScrollSnapType, VerticalAlign};
|
||||||
pub use self::color::{Color, ColorPropertyValue, RGBAColor};
|
pub use self::color::{Color, ColorPropertyValue, RGBAColor};
|
||||||
pub use self::effects::{BoxShadow, Filter, SimpleShadow};
|
pub use self::effects::{BoxShadow, Filter, SimpleShadow};
|
||||||
|
|
|
@ -8,9 +8,10 @@
|
||||||
use Atom;
|
use Atom;
|
||||||
use app_units::Au;
|
use app_units::Au;
|
||||||
use cssparser::Parser;
|
use cssparser::Parser;
|
||||||
|
use parser::{Parse, ParserContext};
|
||||||
use properties::longhands::system_font::SystemFont;
|
use properties::longhands::system_font::SystemFont;
|
||||||
use std::fmt;
|
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::computed::{font as computed, Context, NonNegativeLength, ToComputedValue};
|
||||||
use values::specified::{LengthOrPercentage, NoCalcLength};
|
use values::specified::{LengthOrPercentage, NoCalcLength};
|
||||||
use values::specified::length::FontBaseSize;
|
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(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ pub use self::align::{AlignItems, AlignJustifyContent, AlignJustifySelf, Justify
|
||||||
pub use self::background::{BackgroundRepeat, BackgroundSize};
|
pub use self::background::{BackgroundRepeat, BackgroundSize};
|
||||||
pub use self::border::{BorderCornerRadius, BorderImageSlice, BorderImageWidth};
|
pub use self::border::{BorderCornerRadius, BorderImageSlice, BorderImageWidth};
|
||||||
pub use self::border::{BorderImageSideWidth, BorderRadius, BorderSideWidth, BorderSpacing};
|
pub use self::border::{BorderImageSideWidth, BorderRadius, BorderSideWidth, BorderSpacing};
|
||||||
|
pub use self::font::XTextZoom;
|
||||||
pub use self::box_::{AnimationIterationCount, AnimationName, ScrollSnapType, VerticalAlign};
|
pub use self::box_::{AnimationIterationCount, AnimationName, ScrollSnapType, VerticalAlign};
|
||||||
pub use self::color::{Color, ColorPropertyValue, RGBAColor};
|
pub use self::color::{Color, ColorPropertyValue, RGBAColor};
|
||||||
pub use self::effects::{BoxShadow, Filter, SimpleShadow};
|
pub use self::effects::{BoxShadow, Filter, SimpleShadow};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue