From eefd440656c3073847c4e72603f92169e24dff3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Mon, 18 Feb 2019 14:03:47 +0000 Subject: [PATCH] style: Remove nsFont::featureValueLookup. It's a global object, it doesn't have to be stored in nsFont. Pass it from the caller like the user font set and co. Depends on D20141 Differential Revision: https://phabricator.services.mozilla.com/D20142 --- components/style/properties/gecko.mako.rs | 8 -------- components/style/properties/properties.mako.rs | 3 --- 2 files changed, 11 deletions(-) diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index db7824c5f39..74bae028761 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -2641,11 +2641,8 @@ fn static_assert() { pub fn set_font_variant_alternates( &mut self, v: values::computed::font::FontVariantAlternates, - device: &Device, ) { use crate::gecko_bindings::bindings::{Gecko_ClearAlternateValues, Gecko_AppendAlternateValues}; - use crate::gecko_bindings::bindings::Gecko_nsFont_ResetFontFeatureValuesLookup; - use crate::gecko_bindings::bindings::Gecko_nsFont_SetFontFeatureValuesLookup; % for value in "normal swash stylistic ornaments annotation styleset character_variant historical".split(): use crate::gecko_bindings::structs::NS_FONT_VARIANT_ALTERNATES_${value.upper()}; % endfor @@ -2657,7 +2654,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; } @@ -2690,10 +2686,6 @@ fn static_assert() { } } } - - unsafe { - Gecko_nsFont_SetFontFeatureValuesLookup(&mut self.gecko.mFont, device.pres_context()); - } } #[allow(non_snake_case)] diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 727f5293fd5..7e35d318c30 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -3507,14 +3507,11 @@ impl<'a> StyleBuilder<'a> { self.modified_reset = true; % endif - <% props_need_device = ["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: - self.device, % endif ); }