mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Derive ToResolvedValue.
Differential Revision: https://phabricator.services.mozilla.com/D26783
This commit is contained in:
parent
6ac777ebf2
commit
a47dcb5707
53 changed files with 359 additions and 108 deletions
|
@ -16,7 +16,15 @@ use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
|
|||
|
||||
/// https://drafts.csswg.org/css-fonts-4/#feature-tag-value
|
||||
#[derive(
|
||||
Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToShmem,
|
||||
Clone,
|
||||
Debug,
|
||||
Eq,
|
||||
MallocSizeOf,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
pub struct FeatureTagValue<Integer> {
|
||||
/// A four-character tag, packed into a u32 (one byte per character).
|
||||
|
@ -58,6 +66,7 @@ where
|
|||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
pub struct VariationValue<Number> {
|
||||
|
@ -71,7 +80,16 @@ pub struct VariationValue<Number> {
|
|||
/// A value both for font-variation-settings and font-feature-settings.
|
||||
#[css(comma)]
|
||||
#[derive(
|
||||
Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToCss, ToShmem,
|
||||
Clone,
|
||||
Debug,
|
||||
Eq,
|
||||
MallocSizeOf,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
pub struct FontSettings<T>(#[css(if_empty = "normal", iterable)] pub Box<[T]>);
|
||||
|
||||
|
@ -109,7 +127,16 @@ impl<T: Parse> Parse for FontSettings<T> {
|
|||
/// https://drafts.csswg.org/css-fonts-4/#descdef-font-face-font-feature-settings
|
||||
///
|
||||
#[derive(
|
||||
Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToComputedValue, ToShmem,
|
||||
Clone,
|
||||
Copy,
|
||||
Debug,
|
||||
Eq,
|
||||
MallocSizeOf,
|
||||
PartialEq,
|
||||
SpecifiedValueInfo,
|
||||
ToComputedValue,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
pub struct FontTag(pub u32);
|
||||
|
||||
|
@ -263,6 +290,7 @@ impl Default for KeywordSize {
|
|||
SpecifiedValueInfo,
|
||||
ToAnimatedValue,
|
||||
ToAnimatedZero,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
)]
|
||||
pub enum FontStyle<Angle> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue