Fix Gecko build.

This commit is contained in:
Emilio Cobos Álvarez 2020-04-16 17:41:12 +02:00
parent 14bda8078e
commit e6b4ceca07
2 changed files with 29 additions and 18 deletions

View file

@ -703,7 +703,7 @@ pub type FontVariationSettings = FontSettings<VariationValue<Number>>;
/// (see http://www.microsoft.com/typography/otspec/languagetags.htm).
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, PartialEq, ToResolvedValue)]
#[repr(C)]
pub struct FontLanguageOverride(u32);
pub struct FontLanguageOverride(pub u32);
impl FontLanguageOverride {
#[inline]
@ -762,6 +762,15 @@ impl ToCss for FontLanguageOverride {
}
}
// FIXME(emilio): Make Gecko use the cbindgen'd fontLanguageOverride, then
// remove this.
#[cfg(feature = "gecko")]
impl From<u32> for FontLanguageOverride {
fn from(v: u32) -> Self {
unsafe { Self::from_u32(v) }
}
}
#[cfg(feature = "gecko")]
impl From<FontLanguageOverride> for u32 {
fn from(v: FontLanguageOverride) -> u32 {