mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: cherry-pick some changes from m-c that had got lost.
This commit is contained in:
parent
07de715bb5
commit
64cceb328a
3 changed files with 10 additions and 6 deletions
|
@ -12,8 +12,9 @@ use values::generics::NonNegative;
|
|||
|
||||
/// A computed percentage.
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, Default, MallocSizeOf, PartialEq,
|
||||
PartialOrd, ToAnimatedZero, ToComputedValue)]
|
||||
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, Default,
|
||||
MallocSizeOf, PartialEq, PartialOrd, SpecifiedValueInfo,
|
||||
ToAnimatedZero, ToComputedValue)]
|
||||
pub struct Percentage(pub CSSFloat);
|
||||
|
||||
impl Percentage {
|
||||
|
|
|
@ -227,13 +227,14 @@ impl Default for KeywordSize {
|
|||
///
|
||||
/// https://drafts.csswg.org/css-fonts-4/#font-style-prop
|
||||
#[allow(missing_docs)]
|
||||
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
|
||||
PartialEq, ToAnimatedValue, ToAnimatedZero)]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[derive(Animate, Clone, ComputeSquaredDistance, Copy, Debug, MallocSizeOf,
|
||||
PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToAnimatedZero)]
|
||||
pub enum FontStyle<Angle> {
|
||||
#[animation(error)]
|
||||
Normal,
|
||||
#[animation(error)]
|
||||
Italic,
|
||||
#[value_info(starts_with_keyword)]
|
||||
Oblique(Angle),
|
||||
}
|
||||
|
|
|
@ -15,14 +15,16 @@ use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
|||
use parser::{Parse, ParserContext};
|
||||
use properties::longhands::system_font::SystemFont;
|
||||
use std::fmt::{self, Write};
|
||||
use style_traits::{CssWriter, ParseError, StyleParseErrorKind, ToCss};
|
||||
use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
|
||||
use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
|
||||
use style_traits::values::SequenceWriter;
|
||||
use values::CustomIdent;
|
||||
use values::computed::{Angle as ComputedAngle, Percentage as ComputedPercentage};
|
||||
use values::computed::{font as computed, Context, Length, NonNegativeLength, ToComputedValue};
|
||||
use values::computed::font::{FamilyName, FontFamilyList, FontStyleAngle, SingleFontFamily};
|
||||
use values::generics::NonNegative;
|
||||
use values::generics::font::{KeywordSize, VariationValue};
|
||||
use values::generics::font::{self as generics, FeatureTagValue, FontSettings, FontTag};
|
||||
use values::generics::font::{KeywordSize, VariationValue};
|
||||
use values::specified::{AllowQuirks, Angle, Integer, LengthOrPercentage, NoCalcLength, Number, Percentage};
|
||||
use values::specified::length::{FontBaseSize, AU_PER_PT, AU_PER_PX};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue