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
|
||||
|
|
|
@ -51,15 +51,15 @@ use values::computed::transform::Translate as ComputedTranslate;
|
|||
use values::computed::transform::Scale as ComputedScale;
|
||||
use values::generics::transform::{self, Rotate, Translate, Scale, Transform, TransformOperation};
|
||||
use values::distance::{ComputeSquaredDistance, SquaredDistance};
|
||||
#[cfg(feature = "gecko")] use values::generics::FontSettings as GenericFontSettings;
|
||||
#[cfg(feature = "gecko")] use values::generics::FontSettingTag as GenericFontSettingTag;
|
||||
#[cfg(feature = "gecko")] use values::generics::FontSettingTagFloat;
|
||||
#[cfg(feature = "gecko")] use values::generics::FontTag;
|
||||
#[cfg(feature = "gecko")] use values::generics::font::FontSettings as GenericFontSettings;
|
||||
#[cfg(feature = "gecko")] use values::generics::font::FontSettingTag as GenericFontSettingTag;
|
||||
#[cfg(feature = "gecko")] use values::generics::font::FontSettingTagFloat;
|
||||
use values::generics::NonNegative;
|
||||
use values::generics::effects::Filter;
|
||||
use values::generics::position as generic_position;
|
||||
use values::generics::svg::{SVGLength, SvgLengthOrPercentageOrNumber, SVGPaint};
|
||||
use values::generics::svg::{SVGPaintKind, SVGStrokeDashArray, SVGOpacity};
|
||||
#[cfg(feature = "gecko")] use values::specified::font::FontTag;
|
||||
|
||||
/// <https://drafts.csswg.org/css-transitions/#animtype-repeatable-list>
|
||||
pub trait RepeatableListAnimatable: Animate {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue