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:
Jonathan Kew 2022-08-12 11:25:59 +00:00 committed by Martin Robinson
parent 87bee1710c
commit 52d1e07ee2

View file

@ -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