mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +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,8 @@
|
|||
|
||||
use app_units::Au;
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
#[cfg(feature = "gecko")]
|
||||
use crate::gecko_bindings::bindings;
|
||||
use crate::parser::{Parse, ParserContext};
|
||||
use crate::properties::longhands::system_font::SystemFont;
|
||||
use crate::values::computed::font::{FamilyName, FontFamilyList, FontStyleAngle, SingleFontFamily};
|
||||
|
@ -23,15 +25,12 @@ use crate::values::CustomIdent;
|
|||
use crate::Atom;
|
||||
use cssparser::{Parser, Token};
|
||||
#[cfg(feature = "gecko")]
|
||||
use gecko_bindings::bindings;
|
||||
#[cfg(feature = "gecko")]
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use std::fmt::{self, Write};
|
||||
use style_traits::values::SequenceWriter;
|
||||
use style_traits::{CssWriter, KeywordsCollectFn, ParseError};
|
||||
use style_traits::{SpecifiedValueInfo, StyleParseErrorKind, ToCss};
|
||||
|
||||
|
||||
// FIXME(emilio): The system font code is copy-pasta, and should be cleaned up.
|
||||
macro_rules! system_font_methods {
|
||||
($ty:ident, $field:ident) => {
|
||||
|
@ -753,8 +752,8 @@ impl ToComputedValue for KeywordSize {
|
|||
type ComputedValue = NonNegativeLength;
|
||||
#[inline]
|
||||
fn to_computed_value(&self, cx: &Context) -> NonNegativeLength {
|
||||
use context::QuirksMode;
|
||||
use values::specified::length::au_to_int_px;
|
||||
use crate::context::QuirksMode;
|
||||
use crate::values::specified::length::au_to_int_px;
|
||||
|
||||
// The tables in this function are originally from
|
||||
// nsRuleNode::CalcFontPointSize in Gecko:
|
||||
|
@ -1310,7 +1309,7 @@ macro_rules! impl_variant_east_asian {
|
|||
#[cfg(feature = "gecko")]
|
||||
#[inline]
|
||||
pub fn assert_variant_east_asian_matches() {
|
||||
use gecko_bindings::structs;
|
||||
use crate::gecko_bindings::structs;
|
||||
$(
|
||||
debug_assert_eq!(structs::$gecko as u16, VariantEastAsian::$ident.bits());
|
||||
)+
|
||||
|
@ -1520,7 +1519,7 @@ macro_rules! impl_variant_ligatures {
|
|||
#[cfg(feature = "gecko")]
|
||||
#[inline]
|
||||
pub fn assert_variant_ligatures_matches() {
|
||||
use gecko_bindings::structs;
|
||||
use crate::gecko_bindings::structs;
|
||||
$(
|
||||
debug_assert_eq!(structs::$gecko as u16, VariantLigatures::$ident.bits());
|
||||
)+
|
||||
|
@ -1739,7 +1738,7 @@ macro_rules! impl_variant_numeric {
|
|||
#[cfg(feature = "gecko")]
|
||||
#[inline]
|
||||
pub fn assert_variant_numeric_matches() {
|
||||
use gecko_bindings::structs;
|
||||
use crate::gecko_bindings::structs;
|
||||
$(
|
||||
debug_assert_eq!(structs::$gecko as u8, VariantNumeric::$ident.bits());
|
||||
)+
|
||||
|
@ -2019,7 +2018,7 @@ impl ToCss for FontSynthesis {
|
|||
#[cfg(feature = "gecko")]
|
||||
impl From<u8> for FontSynthesis {
|
||||
fn from(bits: u8) -> FontSynthesis {
|
||||
use gecko_bindings::structs;
|
||||
use crate::gecko_bindings::structs;
|
||||
|
||||
FontSynthesis {
|
||||
weight: bits & structs::NS_FONT_SYNTHESIS_WEIGHT as u8 != 0,
|
||||
|
@ -2031,7 +2030,7 @@ impl From<u8> for FontSynthesis {
|
|||
#[cfg(feature = "gecko")]
|
||||
impl From<FontSynthesis> for u8 {
|
||||
fn from(v: FontSynthesis) -> u8 {
|
||||
use gecko_bindings::structs;
|
||||
use crate::gecko_bindings::structs;
|
||||
|
||||
let mut bits: u8 = 0;
|
||||
if v.weight {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue