Auto merge of #19253 - CYBAI:font-variant-ligatures-out-of-mako, r=emilio

style: Move font-variant-ligatures outside of mako

This is a sub-PR of #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 #19246
- [x] These changes do not require tests

<!-- 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/19253)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-11-17 15:03:14 -06:00 committed by GitHub
commit b4c274d190
7 changed files with 273 additions and 165 deletions

View file

@ -258,6 +258,8 @@
% for prop in sub_properties:
use properties::longhands::font_variant_${prop};
% endfor
#[allow(unused_imports)]
use values::specified::FontVariantLigatures;
pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<Longhands, ParseError<'i>> {
@ -271,7 +273,7 @@
// The 'none' value sets 'font-variant-ligatures' to 'none' and resets all other sub properties
// to their initial value.
% if product == "gecko":
ligatures = Some(font_variant_ligatures::get_none_specified_value());
ligatures = Some(FontVariantLigatures::none());
% endif
} else {
let mut has_custom_value: bool = false;
@ -311,7 +313,7 @@
let has_none_ligatures =
% if product == "gecko":
self.font_variant_ligatures == &font_variant_ligatures::get_none_specified_value();
self.font_variant_ligatures == &FontVariantLigatures::none();
% else:
false;
% endif