mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Derive Serialize and Deserialize traits for font styles for #[cfg_attr(feature = "servo")]
This commit is contained in:
parent
6c86429082
commit
8372cf1bd8
5 changed files with 8 additions and 23 deletions
|
@ -93,9 +93,8 @@ impl From<FontWeight> for FontKitFontWeight {
|
|||
ToAnimatedZero,
|
||||
ToCss,
|
||||
ToResolvedValue,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
)]
|
||||
#[cfg_attr(feature = "servo", derive(Serialize, Deserialize))]
|
||||
/// The computed value of font-size
|
||||
pub struct FontSize {
|
||||
/// The size.
|
||||
|
@ -478,20 +477,10 @@ impl From<&SingleFontFamily> for FontKitFamilyName {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
#[derive(
|
||||
Clone,
|
||||
Debug,
|
||||
Eq,
|
||||
Hash,
|
||||
MallocSizeOf,
|
||||
PartialEq,
|
||||
ToComputedValue,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, ToComputedValue, ToResolvedValue, ToShmem,
|
||||
)]
|
||||
#[cfg_attr(feature = "servo", derive(Serialize, Deserialize))]
|
||||
/// A list of SingleFontFamily
|
||||
pub struct FontFamilyList(Box<[SingleFontFamily]>);
|
||||
|
||||
|
|
|
@ -496,9 +496,8 @@ impl ToComputedValue for FontStretch {
|
|||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
)]
|
||||
#[cfg_attr(feature = "servo", derive(Serialize, Deserialize))]
|
||||
#[allow(missing_docs)]
|
||||
pub enum KeywordSize {
|
||||
#[css(keyword = "xx-small")]
|
||||
|
@ -542,9 +541,8 @@ impl Default for KeywordSize {
|
|||
ToCss,
|
||||
ToResolvedValue,
|
||||
ToShmem,
|
||||
Serialize,
|
||||
Deserialize,
|
||||
)]
|
||||
#[cfg_attr(feature = "servo", derive(Serialize, Deserialize))]
|
||||
/// Additional information for keyword-derived font sizes.
|
||||
pub struct KeywordInfo {
|
||||
/// The keyword used
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue