From 52d1e07ee204414d362885357fdcafd62d18fb6d Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Fri, 12 Aug 2022 11:25:59 +0000 Subject: [PATCH] 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 --- components/style/font_face.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/style/font_face.rs b/components/style/font_face.rs index 92108bfdeb1..bb1e49d7596 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -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