From 7a65a472a2af7fb6a7bbfe930aed1269de07faed Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Mon, 30 Jan 2017 17:17:59 -0800 Subject: [PATCH] Make additional properties be reset by the 'font' shorthand. A number of properties are supposed to be reset to initial values by the 'font' shorthand. This does so for all such properties that Servo currently supports (conditional on when they're supported). Fixes #15033. --- .../style/properties/shorthand/font.mako.rs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/components/style/properties/shorthand/font.mako.rs b/components/style/properties/shorthand/font.mako.rs index f058c56a777..545f8d9352d 100644 --- a/components/style/properties/shorthand/font.mako.rs +++ b/components/style/properties/shorthand/font.mako.rs @@ -5,7 +5,12 @@ <%namespace name="helpers" file="/helpers.mako.rs" /> <%helpers:shorthand name="font" sub_properties="font-style font-variant font-weight font-stretch - font-size line-height font-family" + font-size line-height font-family + ${'font-size-adjust' if product == 'gecko' else ''} + ${'font-kerning' if product == 'gecko' else ''} + ${'font-variant-caps' if product == 'gecko' else ''} + ${'font-variant-position' if product == 'gecko' else ''} + ${'font-language-override' if product == 'none' else ''}" spec="https://drafts.csswg.org/css-fonts-3/#propdef-font"> use properties::longhands::{font_style, font_variant, font_weight, font_stretch}; use properties::longhands::{font_size, line_height, font_family}; @@ -72,7 +77,16 @@ font_stretch: stretch, font_size: size, line_height: line_height, - font_family: Some(font_family::SpecifiedValue(family)) + font_family: Some(font_family::SpecifiedValue(family)), + % if product == "gecko": + font_size_adjust: None, + font_kerning: None, + font_variant_caps: None, + font_variant_position: None, + % endif + % if product == "none": + font_language_override: None, + % endif }) }