mirror of
https://github.com/servo/servo.git
synced 2025-08-10 07:55:33 +01:00
style: Refactor font-feature-settings and font-variation-settings.
This fixes all known issues with serialization and parsing of these two properties, and in particular calc handling and such: https://bugzilla.mozilla.org/show_bug.cgi?id=1434692 https://bugzilla.mozilla.org/show_bug.cgi?id=1434724 Also does a fair amount of cleanup and all that, which was needed.
This commit is contained in:
parent
09398d42af
commit
3b34d734e6
11 changed files with 270 additions and 261 deletions
|
@ -22,13 +22,13 @@ use std::slice;
|
|||
use style_traits::{CssWriter, ParseError, ToCss};
|
||||
use values::CSSFloat;
|
||||
use values::animated::{ToAnimatedValue, ToAnimatedZero};
|
||||
use values::computed::{Context, NonNegativeLength, ToComputedValue};
|
||||
use values::generics::font::{FontSettings, FontSettingTagInt};
|
||||
use values::computed::{Context, NonNegativeLength, ToComputedValue, Integer, Number};
|
||||
use values::generics::font::{FontSettings, FeatureTagValue, VariationValue};
|
||||
use values::specified::font as specified;
|
||||
use values::specified::length::{FontBaseSize, NoCalcLength};
|
||||
|
||||
pub use values::computed::Length as MozScriptMinSize;
|
||||
pub use values::specified::font::{XTextZoom, XLang, MozScriptSizeMultiplier, FontSynthesis, FontVariantSettings};
|
||||
pub use values::specified::font::{XTextZoom, XLang, MozScriptSizeMultiplier, FontSynthesis};
|
||||
|
||||
/// As of CSS Fonts Module Level 3, only the following values are
|
||||
/// valid: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
|
||||
|
@ -712,8 +712,11 @@ pub type FontVariantLigatures = specified::VariantLigatures;
|
|||
/// Use VariantNumeric as computed type of FontVariantNumeric
|
||||
pub type FontVariantNumeric = specified::VariantNumeric;
|
||||
|
||||
/// Use FontSettings as computed type of FontFeatureSettings
|
||||
pub type FontFeatureSettings = FontSettings<FontSettingTagInt>;
|
||||
/// Use FontSettings as computed type of FontFeatureSettings.
|
||||
pub type FontFeatureSettings = FontSettings<FeatureTagValue<Integer>>;
|
||||
|
||||
/// The computed value for font-variation-settings.
|
||||
pub type FontVariationSettings = FontSettings<VariationValue<Number>>;
|
||||
|
||||
/// font-language-override can only have a single three-letter
|
||||
/// OpenType "language system" tag, so we should be able to compute
|
||||
|
|
|
@ -40,7 +40,7 @@ pub use self::background::{BackgroundSize, BackgroundRepeat};
|
|||
pub use self::border::{BorderImageSlice, BorderImageWidth, BorderImageSideWidth};
|
||||
pub use self::border::{BorderRadius, BorderCornerRadius, BorderSpacing};
|
||||
pub use self::font::{FontSize, FontSizeAdjust, FontSynthesis, FontWeight, FontVariantAlternates};
|
||||
pub use self::font::{FontFamily, FontLanguageOverride, FontVariantSettings, FontVariantEastAsian};
|
||||
pub use self::font::{FontFamily, FontLanguageOverride, FontVariationSettings, FontVariantEastAsian};
|
||||
pub use self::font::{FontVariantLigatures, FontVariantNumeric, FontFeatureSettings};
|
||||
pub use self::font::{MozScriptLevel, MozScriptMinSize, MozScriptSizeMultiplier, XTextZoom, XLang};
|
||||
pub use self::box_::{AnimationIterationCount, AnimationName, Display, OverscrollBehavior, Contain};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue