mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
cargo fix --edition --features gecko
This commit is contained in:
parent
a15d33a10e
commit
b1822a39fa
87 changed files with 614 additions and 585 deletions
|
@ -6,6 +6,10 @@
|
|||
|
||||
use app_units::Au;
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
#[cfg(feature = "gecko")]
|
||||
use crate::gecko_bindings::sugar::refptr::RefPtr;
|
||||
#[cfg(feature = "gecko")]
|
||||
use crate::gecko_bindings::{bindings, structs};
|
||||
use crate::values::animated::{ToAnimatedValue, ToAnimatedZero};
|
||||
use crate::values::computed::{Angle, Context, Integer, NonNegativeLength, NonNegativePercentage};
|
||||
use crate::values::computed::{Number, Percentage, ToComputedValue};
|
||||
|
@ -18,10 +22,6 @@ use crate::values::CSSFloat;
|
|||
use crate::Atom;
|
||||
use cssparser::{serialize_identifier, CssStringWriter, Parser};
|
||||
#[cfg(feature = "gecko")]
|
||||
use gecko_bindings::sugar::refptr::RefPtr;
|
||||
#[cfg(feature = "gecko")]
|
||||
use gecko_bindings::{bindings, structs};
|
||||
#[cfg(feature = "gecko")]
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use std::fmt::{self, Write};
|
||||
use std::hash::{Hash, Hasher};
|
||||
|
@ -441,7 +441,7 @@ impl SingleFontFamily {
|
|||
#[cfg(feature = "gecko")]
|
||||
/// Return the generic ID for a given generic font name
|
||||
pub fn generic(name: &Atom) -> (structs::FontFamilyType, u8) {
|
||||
use gecko_bindings::structs::FontFamilyType;
|
||||
use crate::gecko_bindings::structs::FontFamilyType;
|
||||
if *name == atom!("serif") {
|
||||
(FontFamilyType::eFamily_serif, structs::kGenericFont_serif)
|
||||
} else if *name == atom!("sans-serif") {
|
||||
|
@ -477,7 +477,7 @@ impl SingleFontFamily {
|
|||
#[cfg(feature = "gecko")]
|
||||
/// Get the corresponding font-family with family name
|
||||
fn from_font_family_name(family: &structs::FontFamilyName) -> SingleFontFamily {
|
||||
use gecko_bindings::structs::FontFamilyType;
|
||||
use crate::gecko_bindings::structs::FontFamilyType;
|
||||
|
||||
match family.mType {
|
||||
FontFamilyType::eFamily_sans_serif => SingleFontFamily::Generic(atom!("sans-serif")),
|
||||
|
@ -545,7 +545,7 @@ impl Hash for FontFamilyList {
|
|||
where
|
||||
H: Hasher,
|
||||
{
|
||||
use string_cache::WeakAtom;
|
||||
use crate::string_cache::WeakAtom;
|
||||
|
||||
for name in self.0.mNames.iter() {
|
||||
name.mType.hash(state);
|
||||
|
@ -827,7 +827,7 @@ impl ToComputedValue for specified::MozScriptLevel {
|
|||
type ComputedValue = MozScriptLevel;
|
||||
|
||||
fn to_computed_value(&self, cx: &Context) -> i8 {
|
||||
use properties::longhands::_moz_math_display::SpecifiedValue as DisplayValue;
|
||||
use crate::properties::longhands::_moz_math_display::SpecifiedValue as DisplayValue;
|
||||
use std::{cmp, i8};
|
||||
|
||||
let int = match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue