style: build / rebase fixes.

This commit is contained in:
Emilio Cobos Álvarez 2020-06-18 17:37:12 +02:00
parent 56283a3226
commit 7a696cbffe
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
2 changed files with 7 additions and 2 deletions

View file

@ -258,6 +258,8 @@ impl<T> Locked<T> {
#[cfg(feature = "gecko")]
impl<T: ToShmem> ToShmem for Locked<T> {
fn to_shmem(&self, builder: &mut SharedMemoryBuilder) -> to_shmem::Result<Self> {
use std::mem::ManuallyDrop;
let guard = self.shared_lock.read();
Ok(ManuallyDrop::new(Locked {
shared_lock: SharedRwLock::read_only(),

View file

@ -498,10 +498,12 @@ impl ToComputedValue for FontStretch {
ToCss,
ToResolvedValue,
ToShmem,
Serialize,
Deserialize,
)]
#[cfg_attr(feature = "servo", derive(Serialize, Deserialize))]
#[allow(missing_docs)]
pub enum KeywordSize {
#[repr(u8)]
pub enum FontSizeKeyword {
#[css(keyword = "xx-small")]
XXSmall,
XSmall,
@ -794,6 +796,7 @@ impl FontSizeKeyword {
FontSizeKeyword::XLarge => medium * 3.0 / 2.0,
FontSizeKeyword::XXLarge => medium * 2.0,
FontSizeKeyword::XXXLarge => medium * 3.0,
FontSizeKeyword::None => unreachable!(),
})
}