Backed out changeset 01348a3860f7 for build bustage

CLOSED TREE

Backs out https://github.com/servo/servo/pull/18222
This commit is contained in:
Gecko Backout 2017-08-25 03:45:31 +00:00 committed by moz-servo-sync
parent d7f7d550ab
commit 12b02ce9d5
8 changed files with 718 additions and 1182 deletions

View file

@ -2513,12 +2513,8 @@ fn static_assert() {
<% impl_simple_type_with_conversion("font_language_override", "mFont.languageOverride") %>
pub fn set_font_variant_alternates(&mut self,
v: longhands::font_variant_alternates::computed_value::T,
device: &Device) {
pub fn set_font_variant_alternates(&mut self, v: longhands::font_variant_alternates::computed_value::T) {
use gecko_bindings::bindings::{Gecko_ClearAlternateValues, Gecko_AppendAlternateValues};
use gecko_bindings::bindings::Gecko_nsFont_ResetFontFeatureValuesLookup;
use gecko_bindings::bindings::Gecko_nsFont_SetFontFeatureValuesLookup;
% for value in "normal swash stylistic ornaments annotation styleset character_variant historical".split():
use gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()};
% endfor
@ -2530,8 +2526,6 @@ fn static_assert() {
if v.0.is_empty() {
self.gecko.mFont.variantAlternates = NS_FONT_VARIANT_ALTERNATES_NORMAL as u16;
unsafe { Gecko_nsFont_ResetFontFeatureValuesLookup(&mut self.gecko.mFont); }
return;
}
for val in v.0.iter() {
@ -2563,10 +2557,6 @@ fn static_assert() {
}
}
}
unsafe {
Gecko_nsFont_SetFontFeatureValuesLookup(&mut self.gecko.mFont, device.pres_context());
}
}
#[allow(non_snake_case)]

View file

@ -2722,13 +2722,12 @@ impl<'a> StyleBuilder<'a> {
&mut self,
value: longhands::${property.ident}::computed_value::T
) {
<% props_need_device = ["content", "list_style_type", "font_variant_alternates"] %>
self.${property.style_struct.ident}.mutate()
.set_${property.ident}(
value,
% if property.logical:
self.writing_mode,
% elif product == "gecko" and property.ident in props_need_device:
% elif product == "gecko" and property.ident in ["content", "list_style_type"]:
self.device,
% endif
);