mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
style: Move a bunch of font stuff living under generics to the proper module.
FontSettingsTagInt and such shouldn't be in the generic module, I know... But that will change in a bit.
This commit is contained in:
parent
1380f1a14f
commit
09398d42af
7 changed files with 189 additions and 177 deletions
|
@ -1432,13 +1432,13 @@ impl Clone for ${style_struct.gecko_struct_name} {
|
|||
%>
|
||||
|
||||
pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
|
||||
use values::generics::FontSettings;
|
||||
use values::generics::font::FontSettings;
|
||||
|
||||
let current_settings = &mut self.gecko.mFont.${gecko_ffi_name};
|
||||
current_settings.clear_pod();
|
||||
|
||||
match v {
|
||||
FontSettings::Normal => (), // do nothing, length is already 0
|
||||
FontSettings::Normal => {}, // do nothing, length is already 0
|
||||
|
||||
FontSettings::Tag(other_settings) => {
|
||||
unsafe { current_settings.set_len_pod(other_settings.len() as u32) };
|
||||
|
@ -1470,7 +1470,8 @@ impl Clone for ${style_struct.gecko_struct_name} {
|
|||
}
|
||||
|
||||
pub fn clone_${ident}(&self) -> longhands::${ident}::computed_value::T {
|
||||
use values::generics::{FontSettings, FontTag, FontSettingTag, ${tag_type}} ;
|
||||
use values::generics::font::{FontSettings, FontSettingTag, ${tag_type}};
|
||||
use values::specified::font::FontTag;
|
||||
|
||||
if self.gecko.mFont.${gecko_ffi_name}.len() == 0 {
|
||||
FontSettings::Normal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue