style: Support the all shorthand.
draft
--- a/servo/components/style/properties/properties.mako.rs
+++ b/servo/components/style/properties/properties.mako.rs
@@ -160,16 +160,36 @@ pub mod shorthands {
<%include file="/shorthand/list.mako.rs" />
<%include file="/shorthand/margin.mako.rs" />
<%include file="/shorthand/mask.mako.rs" />
<%include file="/shorthand/outline.mako.rs" />
<%include file="/shorthand/padding.mako.rs" />
<%include file="/shorthand/position.mako.rs" />
<%include file="/shorthand/inherited_svg.mako.rs" />
<%include file="/shorthand/text.mako.rs" />
+
+ <% components_of_all_shorthand = [p.name for p in data.longhands if p.name not in ['direction', 'unicode-bidi']] %>
+ <%helpers:shorthand name="all"
+ sub_properties="${' '.join(components_of_all_shorthand)}"
+ spec="https://drafts.csswg.org/css-cascade-3/#all-shorthand">
+
+ pub fn parse_value(_context: &ParserContext, _input: &mut Parser) -> Result<Longhands, ()> {
+ // cascade_property handles parsing the CSS-wide keywords, so we
+ // don't need to handle any other values here.
+ Err(())
+ }
+
+ impl<'a> ToCss for LonghandsToSerialize<'a> {
+ fn to_css<W>(&self, _dest: &mut W) -> fmt::Result where W: fmt::Write {
+ // get_shorthand_appendable_value handles this for us.
+ debug_assert!(false, "we shouldn't need to be called");
+ Ok(())
+ }
+ }
+ </%helpers:shorthand>
}
/// A module with all the code related to animated properties.
///
/// This needs to be "included" by mako at least after all longhand modules,
/// given they populate the global data.
pub mod animated_properties {
<%include file="/helpers/animated_properties.mako.rs" />