Sort use statements

This commit is contained in:
Simon Sapin 2018-11-01 17:23:56 +01:00
parent 45f7199eee
commit 76e59a46d3
162 changed files with 444 additions and 431 deletions

View file

@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::text::util::is_cjk;
use std::cell::RefCell;
use std::fs::File;
use std::io::{self, Read};
use std::path::Path;
use crate::text::util::is_cjk;
use ucd::{Codepoint, UnicodeBlock};
use xml5ever::Attribute;
use xml5ever::driver::parse_document;

View file

@ -5,6 +5,10 @@
use app_units::Au;
use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods};
use crate::font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN};
use crate::platform::font_context::FontContextHandle;
use crate::platform::font_template::FontTemplateData;
use crate::text::glyph::GlyphId;
use crate::text::util::fixed_to_float;
use freetype::freetype::{FT_Done_Face, FT_New_Face, FT_New_Memory_Face};
use freetype::freetype::{FT_F26Dot6, FT_Face, FT_FaceRec};
use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name};
@ -16,8 +20,6 @@ use freetype::freetype::{FT_SizeRec, FT_Size_Metrics, FT_UInt, FT_Vector};
use freetype::freetype::FT_Sfnt_Tag;
use freetype::succeeded;
use freetype::tt_os2::TT_OS2;
use crate::platform::font_context::FontContextHandle;
use crate::platform::font_template::FontTemplateData;
use servo_atoms::Atom;
use std::{mem, ptr};
use std::ffi::CString;
@ -27,8 +29,6 @@ use style::computed_values::font_stretch::T as FontStretch;
use style::computed_values::font_weight::T as FontWeight;
use style::values::computed::font::FontStyle;
use super::c_str_to_string;
use crate::text::glyph::GlyphId;
use crate::text::util::fixed_to_float;
// This constant is not present in the freetype
// bindings due to bindgen not handling the way

View file

@ -2,6 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::text::util::is_cjk;
use fontconfig::fontconfig::{FcChar8, FcResultMatch, FcSetSystem};
use fontconfig::fontconfig::{FcConfigGetCurrent, FcConfigGetFonts, FcConfigSubstitute};
use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPatternGetString};
@ -13,7 +14,6 @@ use libc::{c_char, c_int};
use std::ffi::CString;
use std::ptr;
use super::c_str_to_string;
use crate::text::util::is_cjk;
static FC_FAMILY: &'static [u8] = b"family\0";
static FC_FILE: &'static [u8] = b"file\0";

View file

@ -17,12 +17,12 @@ use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods, FontTableTag
use crate::font::{GPOS, GSUB, KERN};
use crate::platform::font_template::FontTemplateData;
use crate::platform::macos::font_context::FontContextHandle;
use crate::text::glyph::GlyphId;
use servo_atoms::Atom;
use std::{fmt, ptr};
use std::ops::Range;
use std::sync::Arc;
use style::values::computed::font::{FontStretch, FontStyle, FontWeight};
use crate::text::glyph::GlyphId;
const KERN_PAIR_LEN: usize = 6;

View file

@ -7,14 +7,15 @@
// renderer moves to a sandboxed process.
use app_units::Au;
use dwrote;
use dwrote::{Font, FontFace, FontFile};
use dwrote::{FontStretch, FontStyle};
use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods};
use crate::font::{FontTableTag, FractionalPixel};
use crate::platform::font_template::FontTemplateData;
use crate::platform::windows::font_context::FontContextHandle;
use crate::platform::windows::font_list::font_from_atom;
use crate::text::glyph::GlyphId;
use dwrote;
use dwrote::{Font, FontFace, FontFile};
use dwrote::{FontStretch, FontStyle};
use servo_atoms::Atom;
use std::fmt;
use std::ops::Deref;
@ -25,7 +26,6 @@ use style::values::computed::font::FontStyle as StyleFontStyle;
use style::values::generics::NonNegative;
use style::values::generics::font::FontStyle as GenericFontStyle;
use style::values::specified::font::FontStretchKeyword;
use crate::text::glyph::GlyphId;
use truetype;
// 1em = 12pt = 16px, assuming 72 points per inch and 96 px per inch

View file

@ -2,12 +2,12 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use crate::text::util::unicode_plane;
use dwrote::{Font, FontDescriptor, FontCollection};
use servo_atoms::Atom;
use std::collections::HashMap;
use std::sync::Mutex;
use std::sync::atomic::{Ordering, AtomicUsize};
use crate::text::util::unicode_plane;
use ucd::{Codepoint, UnicodeBlock};
lazy_static! {