Bug 1957541: Enable font-variation-settings property for servo engine (r=jwatt)

Signed-off-by: Nico Burns <nico@nicoburns.com>

Differential Revision: https://phabricator.services.mozilla.com/D243750
This commit is contained in:
Nico Burns
2025-04-02 18:46:02 +00:00
parent d979fcdd68
commit fca95adb1b
2 changed files with 5 additions and 1 deletions

View File

@@ -242,7 +242,8 @@ ${helpers.predefined_type(
${helpers.predefined_type(
"font-variation-settings",
"FontVariationSettings",
engines="gecko",
engines="gecko servo",
servo_pref="layout.unimplemented",
gecko_pref="layout.css.font-variations.enabled",
has_effect_on_gecko_scrollbars=False,
initial_value="computed::FontVariationSettings::normal()",

View File

@@ -84,6 +84,7 @@ where
ToResolvedValue,
ToShmem,
)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
pub struct VariationValue<Number> {
/// A four-character tag, packed into a u32 (one byte per character).
#[animation(constant)]
@@ -102,6 +103,7 @@ impl<T> TaggedFontValue for VariationValue<T> {
#[derive(
Clone, Debug, Eq, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToAnimatedValue, ToCss, ToResolvedValue, ToShmem,
)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[css(comma)]
pub struct FontSettings<T>(#[css(if_empty = "normal", iterable)] pub Box<[T]>);
@@ -154,6 +156,7 @@ impl<T: Parse> Parse for FontSettings<T> {
ToResolvedValue,
ToShmem,
)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
pub struct FontTag(pub u32);
impl ToCss for FontTag {