aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-11-01 17:23:56 +0100
committerSimon Sapin <simon.sapin@exyr.org>2018-11-06 15:26:02 +0100
commit76e59a46d3aff701b2e8dfbaf047f6d5c3edcced (patch)
treeee36ca9b3f981d01184871fe72fbc31347086e92 /components/gfx
parent45f7199eee82c66637ec68287eafa40a651001c4 (diff)
downloadservo-76e59a46d3aff701b2e8dfbaf047f6d5c3edcced.tar.gz
servo-76e59a46d3aff701b2e8dfbaf047f6d5c3edcced.zip
Sort `use` statements
Diffstat (limited to 'components/gfx')
-rw-r--r--components/gfx/font.rs10
-rw-r--r--components/gfx/font_cache_thread.rs8
-rw-r--r--components/gfx/font_context.rs4
-rw-r--r--components/gfx/platform/freetype/android/font_list.rs2
-rw-r--r--components/gfx/platform/freetype/font.rs8
-rw-r--r--components/gfx/platform/freetype/font_list.rs2
-rw-r--r--components/gfx/platform/macos/font.rs2
-rw-r--r--components/gfx/platform/windows/font.rs8
-rw-r--r--components/gfx/platform/windows/font_list.rs2
-rw-r--r--components/gfx/text/shaping/harfbuzz.rs6
-rw-r--r--components/gfx/text/text_run.rs2
11 files changed, 27 insertions, 27 deletions
diff --git a/components/gfx/font.rs b/components/gfx/font.rs
index 18188bc9f2d..18a8ed21e11 100644
--- a/components/gfx/font.rs
+++ b/components/gfx/font.rs
@@ -3,14 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::Au;
-use euclid::{Point2D, Rect, Size2D};
use crate::font_context::{FontContext, FontSource};
use crate::font_template::FontTemplateDescriptor;
-use ordered_float::NotNan;
use crate::platform::font::{FontHandle, FontTable};
use crate::platform::font_context::FontContextHandle;
pub use crate::platform::font_list::fallback_font_families;
use crate::platform::font_template::FontTemplateData;
+use crate::text::Shaper;
+use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
+use crate::text::shaping::ShaperMethods;
+use euclid::{Point2D, Rect, Size2D};
+use ordered_float::NotNan;
use servo_atoms::Atom;
use smallvec::SmallVec;
use std::borrow::ToOwned;
@@ -24,9 +27,6 @@ use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
use style::computed_values::{font_stretch, font_style, font_variant_caps, font_weight};
use style::properties::style_structs::Font as FontStyleStruct;
use style::values::computed::font::SingleFontFamily;
-use crate::text::Shaper;
-use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
-use crate::text::shaping::ShaperMethods;
use time;
use unicode_script::Script;
use webrender_api;
diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs
index 0e4c7727997..94b2138d68f 100644
--- a/components/gfx/font_cache_thread.rs
+++ b/components/gfx/font_cache_thread.rs
@@ -6,16 +6,16 @@ use app_units::Au;
use crate::font::{FontFamilyDescriptor, FontFamilyName, FontSearchScope};
use crate::font_context::FontSource;
use crate::font_template::{FontTemplate, FontTemplateDescriptor};
-use fontsan;
-use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
-use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
-use net_traits::request::{Destination, RequestInit};
use crate::platform::font_context::FontContextHandle;
use crate::platform::font_list::SANS_SERIF_FONT_FAMILY;
use crate::platform::font_list::for_each_available_family;
use crate::platform::font_list::for_each_variation;
use crate::platform::font_list::system_default_family;
use crate::platform::font_template::FontTemplateData;
+use fontsan;
+use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
+use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
+use net_traits::request::{Destination, RequestInit};
use servo_atoms::Atom;
use servo_url::ServoUrl;
use std::{fmt, f32, mem, thread};
diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs
index 7356edaa4a6..e2f332e028c 100644
--- a/components/gfx/font_context.rs
+++ b/components/gfx/font_context.rs
@@ -3,13 +3,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::Au;
-use fnv::FnvHasher;
use crate::font::{Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontHandleMethods, FontRef};
use crate::font_cache_thread::FontTemplateInfo;
use crate::font_template::FontTemplateDescriptor;
-use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use crate::platform::font::FontHandle;
pub use crate::platform::font_context::FontContextHandle;
+use fnv::FnvHasher;
+use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
use servo_arc::Arc;
use std::cell::RefCell;
use std::collections::HashMap;
diff --git a/components/gfx/platform/freetype/android/font_list.rs b/components/gfx/platform/freetype/android/font_list.rs
index 940283c55c5..ef4a0612f24 100644
--- a/components/gfx/platform/freetype/android/font_list.rs
+++ b/components/gfx/platform/freetype/android/font_list.rs
@@ -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;
diff --git a/components/gfx/platform/freetype/font.rs b/components/gfx/platform/freetype/font.rs
index b3762b26fe7..4ce38aa96d5 100644
--- a/components/gfx/platform/freetype/font.rs
+++ b/components/gfx/platform/freetype/font.rs
@@ -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
diff --git a/components/gfx/platform/freetype/font_list.rs b/components/gfx/platform/freetype/font_list.rs
index 378f2f1944c..71b7e9bc4e0 100644
--- a/components/gfx/platform/freetype/font_list.rs
+++ b/components/gfx/platform/freetype/font_list.rs
@@ -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";
diff --git a/components/gfx/platform/macos/font.rs b/components/gfx/platform/macos/font.rs
index 6e0bb05c1ef..b9570da0760 100644
--- a/components/gfx/platform/macos/font.rs
+++ b/components/gfx/platform/macos/font.rs
@@ -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;
diff --git a/components/gfx/platform/windows/font.rs b/components/gfx/platform/windows/font.rs
index d9f80de1103..a85c8383f5f 100644
--- a/components/gfx/platform/windows/font.rs
+++ b/components/gfx/platform/windows/font.rs
@@ -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
diff --git a/components/gfx/platform/windows/font_list.rs b/components/gfx/platform/windows/font_list.rs
index 44a3f3704d7..21e47aa76e6 100644
--- a/components/gfx/platform/windows/font_list.rs
+++ b/components/gfx/platform/windows/font_list.rs
@@ -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! {
diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs
index dc25783cb11..343c27c63c9 100644
--- a/components/gfx/text/shaping/harfbuzz.rs
+++ b/components/gfx/text/shaping/harfbuzz.rs
@@ -5,7 +5,6 @@
#![allow(unsafe_code)]
use app_units::Au;
-use euclid::Point2D;
use crate::font::{ShapingFlags, Font, FontTableMethods, FontTableTag, ShapingOptions, KERN};
use crate::harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
use crate::harfbuzz::{hb_blob_create, hb_face_create_for_tables};
@@ -34,11 +33,12 @@ use crate::harfbuzz::hb_font_set_scale;
use crate::harfbuzz::hb_glyph_info_t;
use crate::harfbuzz::hb_glyph_position_t;
use crate::platform::font::FontTable;
-use std::{char, cmp, ptr};
-use std::os::raw::{c_char, c_int, c_uint, c_void};
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
use crate::text::shaping::ShaperMethods;
use crate::text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
+use euclid::Point2D;
+use std::{char, cmp, ptr};
+use std::os::raw::{c_char, c_int, c_uint, c_void};
const NO_GLYPH: i32 = -1;
const LIGA: u32 = ot_tag!('l', 'i', 'g', 'a');
diff --git a/components/gfx/text/text_run.rs b/components/gfx/text/text_run.rs
index c97575bf636..7a6e6623b9c 100644
--- a/components/gfx/text/text_run.rs
+++ b/components/gfx/text/text_run.rs
@@ -6,13 +6,13 @@ use app_units::Au;
use crate::font::{Font, FontHandleMethods, FontMetrics, ShapingFlags};
use crate::font::{RunMetrics, ShapingOptions};
use crate::platform::font_template::FontTemplateData;
+use crate::text::glyph::{ByteIndex, GlyphStore};
use range::Range;
use std::cell::Cell;
use std::cmp::{Ordering, max};
use std::slice::Iter;
use std::sync::Arc;
use style::str::char_is_whitespace;
-use crate::text::glyph::{ByteIndex, GlyphStore};
use unicode_bidi as bidi;
use webrender_api;
use xi_unicode::LineBreakLeafIter;