mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
parent
52205e8483
commit
55e2cd5dc3
7 changed files with 85 additions and 100 deletions
|
@ -176,7 +176,7 @@ impl Device {
|
|||
context.mMedium
|
||||
};
|
||||
|
||||
MediaType(CustomIdent(Atom::from(medium_to_use)))
|
||||
MediaType(CustomIdent(unsafe { Atom::from_raw(medium_to_use) }))
|
||||
}
|
||||
|
||||
/// Returns the current viewport size in app units.
|
||||
|
@ -262,7 +262,7 @@ impl ToCss for Expression {
|
|||
}
|
||||
|
||||
// NB: CssStringWriter not needed, feature names are under control.
|
||||
write!(dest, "{}", Atom::from(unsafe { *self.feature.mName }))?;
|
||||
write!(dest, "{}", unsafe { Atom::from_static(*self.feature.mName) })?;
|
||||
|
||||
if let Some(ref val) = self.value {
|
||||
dest.write_str(": ")?;
|
||||
|
@ -394,9 +394,9 @@ impl MediaExpressionValue {
|
|||
}
|
||||
nsMediaFeature_ValueType::eIdent => {
|
||||
debug_assert_eq!(css_value.mUnit, nsCSSUnit::eCSSUnit_AtomIdent);
|
||||
Some(MediaExpressionValue::Ident(Atom::from(unsafe {
|
||||
*css_value.mValue.mAtom.as_ref()
|
||||
})))
|
||||
Some(MediaExpressionValue::Ident(unsafe {
|
||||
Atom::from_raw(*css_value.mValue.mAtom.as_ref())
|
||||
}))
|
||||
}
|
||||
nsMediaFeature_ValueType::eIntRatio => {
|
||||
let array = unsafe { css_value.array_unchecked() };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue