diff --git a/components/style/properties/longhand/inherited_svg.mako.rs b/components/style/properties/longhand/inherited_svg.mako.rs index 11e39bd0917..de29017f13d 100644 --- a/components/style/properties/longhand/inherited_svg.mako.rs +++ b/components/style/properties/longhand/inherited_svg.mako.rs @@ -136,24 +136,11 @@ ${helpers.predefined_type("paint-order", "SVGPaintOrder", "computed::SVGPaintOrd gecko_pref="svg.paint-order.enabled", spec="https://www.w3.org/TR/SVG2/painting.html#PaintOrder")} -<%helpers:vector_longhand name="-moz-context-properties" - animation_value_type="none" - products="gecko" - spec="Nonstandard (Internal-only)" - allow_empty="True"> - use values::CustomIdent; - - pub type SpecifiedValue = CustomIdent; - - pub mod computed_value { - pub type T = super::SpecifiedValue; - } - - - pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) - -> Result> { - let location = input.current_source_location(); - let i = input.expect_ident()?; - CustomIdent::from_ident(location, i, &["all", "none", "auto"]) - } - +${helpers.predefined_type("-moz-context-properties", + "MozContextProperties", + initial_value=None, + vector=True, + animation_value_type="none", + products="gecko", + spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-context-properties)", + allow_empty=True)} diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index a127b8e58b0..d938a171d02 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -62,6 +62,7 @@ pub use self::percentage::Percentage; pub use self::position::{Position, GridAutoFlow, GridTemplateAreas}; pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind}; pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth}; +pub use self::svg::MozContextProperties; pub use self::table::XSpan; pub use self::text::{InitialLetter, LetterSpacing, LineHeight, TextAlign, TextOverflow, WordSpacing}; pub use self::time::Time; diff --git a/components/style/values/computed/svg.rs b/components/style/values/computed/svg.rs index 56f47f098bc..b43312ec67c 100644 --- a/components/style/values/computed/svg.rs +++ b/components/style/values/computed/svg.rs @@ -13,6 +13,8 @@ use values::generics::svg as generic; pub use values::specified::SVGPaintOrder; +pub use values::specified::MozContextProperties; + /// Computed SVG Paint value pub type SVGPaint = generic::SVGPaint; /// Computed SVG Paint Kind value diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs index e2b16607957..77306410203 100644 --- a/components/style/values/specified/mod.rs +++ b/components/style/values/specified/mod.rs @@ -58,6 +58,7 @@ pub use self::percentage::Percentage; pub use self::position::{Position, PositionComponent, GridAutoFlow, GridTemplateAreas}; pub use self::svg::{SVGLength, SVGOpacity, SVGPaint, SVGPaintKind}; pub use self::svg::{SVGPaintOrder, SVGStrokeDashArray, SVGWidth}; +pub use self::svg::MozContextProperties; pub use self::table::XSpan; pub use self::text::{InitialLetter, LetterSpacing, LineHeight, TextDecorationLine}; pub use self::text::{TextAlign, TextAlignKeyword, TextOverflow, WordSpacing}; diff --git a/components/style/values/specified/svg.rs b/components/style/values/specified/svg.rs index 63f14b741e0..c7a2cac27c9 100644 --- a/components/style/values/specified/svg.rs +++ b/components/style/values/specified/svg.rs @@ -8,6 +8,7 @@ use cssparser::Parser; use parser::{Parse, ParserContext}; use std::fmt; use style_traits::{CommaWithSpace, ParseError, Separator, StyleParseErrorKind, ToCss}; +use values::CustomIdent; use values::generics::svg as generic; use values::specified::{LengthOrPercentage, NonNegativeLengthOrPercentage, NonNegativeNumber}; use values::specified::{Number, Opacity, SpecifiedUrl}; @@ -260,3 +261,18 @@ impl ToCss for SVGPaintOrder { Ok(()) } } + +/// Specified MozContextProperties value. +/// Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-context-properties) +pub type MozContextProperties = CustomIdent; + +impl Parse for MozContextProperties { + fn parse<'i, 't>( + _context: &ParserContext, + input: &mut Parser<'i, 't> + ) -> Result> { + let location = input.current_source_location(); + let i = input.expect_ident()?; + CustomIdent::from_ident(location, i, &["all", "none", "auto"]) + } +}