mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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
This commit is contained in:
parent
dcfe30ff18
commit
eefd440656
2 changed files with 0 additions and 11 deletions
|
@ -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)]
|
||||
|
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue