mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Use the style-system format hint directly in gfx, instead of mapping to a separate internal enum
Now that the style system has keywords for this, we don't need to define them in gfx but can just use the enum directly. (No functional change, just code simplification.) Depends on D154237 Differential Revision: https://phabricator.services.mozilla.com/D154238
This commit is contained in:
parent
87bee1710c
commit
52d1e07ee2
1 changed files with 5 additions and 0 deletions
|
@ -51,11 +51,14 @@ impl OneOrMoreSeparated for Source {
|
|||
}
|
||||
|
||||
/// Keywords for the font-face src descriptor's format() function.
|
||||
/// ('None' and 'Unknown' are for internal use in gfx, not exposed to CSS.)
|
||||
#[derive(Clone, Copy, Debug, Eq, Parse, PartialEq, ToCss, ToShmem)]
|
||||
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
|
||||
#[repr(u8)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum FontFaceSourceFormatKeyword {
|
||||
#[css(skip)]
|
||||
None,
|
||||
Collection,
|
||||
EmbeddedOpentype,
|
||||
Opentype,
|
||||
|
@ -63,6 +66,8 @@ pub enum FontFaceSourceFormatKeyword {
|
|||
Truetype,
|
||||
Woff,
|
||||
Woff2,
|
||||
#[css(skip)]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
/// A POD representation for Gecko. All pointers here are non-owned and as such
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue