sorted the extern crate, mod & use declarations

This commit is contained in:
Ravi Shankar 2015-09-24 02:12:45 +05:30
parent 705ad72aee
commit 889eec364b
194 changed files with 804 additions and 870 deletions

View file

@ -14,14 +14,12 @@
//! They are therefore not exactly analogous to constructs like Skia pictures, which consist of
//! low-level drawing primitives.
#![deny(unsafe_code)]
use azure::azure::AzFloat;
use azure::azure_hl::Color;
use display_list::optimizer::DisplayListOptimizer;
use euclid::approxeq::ApproxEq;
use euclid::num::Zero;
use euclid::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D, Matrix4};
use euclid::{Matrix2D, Matrix4, Point2D, Rect, SideOffsets2D, Size2D};
use gfx_traits::color;
use libc::uintptr_t;
use msg::compositor_msg::{LayerId, LayerKind, ScrollPolicy};

View file

@ -16,7 +16,7 @@ use std::sync::Arc;
use style::computed_values::{font_stretch, font_variant, font_weight};
use style::properties::style_structs::Font as FontStyle;
use text::Shaper;
use text::glyph::{GlyphStore, GlyphId};
use text::glyph::{GlyphId, GlyphStore};
use text::shaping::ShaperMethods;
use util::cache::HashCache;
use util::geometry::Au;

View file

@ -13,7 +13,7 @@ use platform::font_template::FontTemplateData;
use std::borrow::ToOwned;
use std::collections::HashMap;
use std::sync::Arc;
use std::sync::mpsc::{Sender, Receiver, channel};
use std::sync::mpsc::{Receiver, Sender, channel};
use string_cache::Atom;
use style::font_face::Source;
use util::str::LowercaseString;

View file

@ -2,16 +2,15 @@
* 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/. */
#![feature(alloc)]
#![feature(box_syntax)]
// For simd (currently x86_64/aarch64)
#![cfg_attr(any(target_arch = "x86_64", target_arch = "aarch64"), feature(convert))]
#![cfg_attr(any(target_os = "linux", target_os = "android"), feature(heap_api))]
#![feature(alloc)]
#![feature(box_syntax)]
#![feature(custom_attribute)]
#![feature(custom_derive)]
#![feature(hashmap_hasher)]
#![cfg_attr(any(target_os = "linux", target_os = "android"), feature(heap_api))]
#![feature(mpsc_select)]
#![feature(plugin)]
#![feature(str_char)]
@ -22,66 +21,71 @@
#![plugin(serde_macros)]
#[macro_use]
extern crate log;
extern crate serde;
extern crate alloc;
extern crate azure;
#[macro_use] extern crate bitflags;
extern crate fnv;
extern crate euclid;
extern crate ipc_channel;
extern crate bitflags;
#[macro_use]
extern crate lazy_static;
extern crate layers;
extern crate libc;
#[macro_use]
extern crate log;
#[macro_use]
extern crate profile_traits;
extern crate script_traits;
extern crate rustc_serialize;
extern crate net_traits;
#[macro_use]
extern crate util;
extern crate msg;
extern crate rand;
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
extern crate simd;
extern crate smallvec;
extern crate string_cache;
extern crate style;
extern crate skia;
extern crate time;
extern crate url;
extern crate gfx_traits;
extern crate alloc;
extern crate azure;
extern crate canvas_traits;
// Eventually we would like the shaper to be pluggable, as many operating systems have their own
// shapers. For now, however, this is a hard dependency.
extern crate harfbuzz;
// Linux and Android-specific library dependencies
#[cfg(any(target_os = "linux", target_os = "android"))]
extern crate fontconfig;
#[cfg(any(target_os = "linux", target_os = "android"))]
extern crate freetype;
// Mac OS-specific library dependencies
#[cfg(target_os = "macos")] extern crate core_foundation;
#[cfg(target_os = "macos")] extern crate core_graphics;
#[cfg(target_os = "macos")] extern crate core_text;
extern crate euclid;
extern crate fnv;
// Linux and Android-specific library dependencies
#[cfg(any(target_os = "linux", target_os = "android"))]
extern crate fontconfig;
#[cfg(any(target_os = "linux", target_os = "android"))]
extern crate freetype;
extern crate gfx_traits;
// Eventually we would like the shaper to be pluggable, as many operating systems have their own
// shapers. For now, however, this is a hard dependency.
extern crate harfbuzz;
extern crate ipc_channel;
extern crate layers;
extern crate libc;
extern crate msg;
extern crate net_traits;
extern crate rand;
extern crate rustc_serialize;
extern crate script_traits;
extern crate serde;
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
extern crate simd;
extern crate skia;
extern crate smallvec;
extern crate string_cache;
extern crate style;
extern crate time;
extern crate url;
pub use paint_context::PaintContext;
// Misc.
mod filters;
// Private painting modules
mod paint_context;
#[deny(unsafe_code)]
#[path = "display_list/mod.rs"]
pub mod display_list;
pub mod paint_task;
// Fonts
pub mod font;
@ -89,8 +93,7 @@ pub mod font_cache_task;
pub mod font_context;
pub mod font_template;
// Misc.
mod filters;
pub mod paint_task;
// Platform-specific implementations.
#[path = "platform/mod.rs"]

View file

@ -6,14 +6,14 @@
use azure::azure::AzIntSize;
use azure::azure_hl::{AntialiasMode, Color, ColorPattern, CompositionOp};
use azure::azure_hl::{CapStyle, JoinStyle};
use azure::azure_hl::{DrawOptions, DrawSurfaceOptions, DrawTarget, ExtendMode, FilterType};
use azure::azure_hl::{Filter, FilterNode, GaussianBlurInput, GradientStop, LinearGradientPattern};
use azure::azure_hl::{GaussianBlurAttribute, StrokeOptions, SurfaceFormat};
use azure::azure_hl::{GaussianBlurInput, GradientStop, Filter, FilterNode, LinearGradientPattern};
use azure::azure_hl::{JoinStyle, CapStyle};
use azure::azure_hl::{Pattern, PatternRef, Path, PathBuilder, SurfacePattern};
use azure::azure_hl::{Path, PathBuilder, Pattern, PatternRef, SurfacePattern};
use azure::scaled_font::ScaledFont;
use azure::{AzDrawTargetFillGlyphs, struct__AzGlyphBuffer, struct__AzPoint};
use azure::{AzFloat, struct__AzDrawOptions, struct__AzGlyph};
use azure::{struct__AzGlyphBuffer, struct__AzPoint, AzDrawTargetFillGlyphs};
use display_list::TextOrientation::{SidewaysLeft, SidewaysRight, Upright};
use display_list::{BLUR_INFLATION_FACTOR, BorderRadii, BoxShadowClipMode, ClippingRegion};
use display_list::{TextDisplayItem};
@ -29,10 +29,8 @@ use libc::types::common::c99::uint32_t;
use msg::compositor_msg::LayerKind;
use net_traits::image::base::{Image, PixelFormat};
use std::default::Default;
use std::f32;
use std::mem;
use std::ptr;
use std::sync::Arc;
use std::{f32, mem, ptr};
use style::computed_values::{border_style, filter, image_rendering, mix_blend_mode};
use text::TextRun;
use text::glyph::CharIndex;

View file

@ -5,7 +5,7 @@
//! The task that handles all painting.
use azure::AzFloat;
use azure::azure_hl::{SurfaceFormat, Color, DrawTarget, BackendType};
use azure::azure_hl::{BackendType, Color, DrawTarget, SurfaceFormat};
use canvas_traits::CanvasMsg;
use display_list::{self, StackingContext};
use euclid::Matrix4;

View file

@ -7,24 +7,23 @@ extern crate freetype;
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
use font::{FontTableTag, FractionalPixel};
use freetype::freetype::{FTErrorMethods, FT_F26Dot6, FT_Face, FT_FaceRec};
use freetype::freetype::{FT_Done_Face, FT_New_Memory_Face};
use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name};
use freetype::freetype::{FT_Get_Kerning, FT_Get_Sfnt_Table, FT_Load_Sfnt_Table};
use freetype::freetype::{FT_GlyphSlot, FT_Library, FT_Long, FT_ULong};
use freetype::freetype::{FT_KERNING_DEFAULT, FT_STYLE_FLAG_ITALIC, FT_STYLE_FLAG_BOLD};
use freetype::freetype::{FT_KERNING_DEFAULT, FT_STYLE_FLAG_BOLD, FT_STYLE_FLAG_ITALIC};
use freetype::freetype::{FT_Load_Glyph, FT_Set_Char_Size};
use freetype::freetype::{FT_New_Memory_Face, FT_Done_Face};
use freetype::freetype::{FT_SizeRec, FT_UInt, FT_Size_Metrics, struct_FT_Vector_};
use freetype::freetype::{FT_SizeRec, FT_Size_Metrics, FT_UInt, struct_FT_Vector_};
use freetype::freetype::{ft_sfnt_os2};
use freetype::tt_os2::TT_OS2;
use libc::c_char;
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
use std::mem;
use std::ptr;
use std::sync::Arc;
use std::{mem, ptr};
use style::computed_values::{font_stretch, font_weight};
use text::glyph::GlyphId;
use text::util::{float_to_fixed, fixed_to_float};
use text::util::{fixed_to_float, float_to_fixed};
use util::geometry::Au;
use util::str::c_str_to_string;

View file

@ -10,7 +10,7 @@ use freetype::freetype::FT_Library;
use freetype::freetype::FT_Memory;
use freetype::freetype::FT_New_Library;
use freetype::freetype::struct_FT_MemoryRec_;
use libc::{c_void, c_long};
use libc::{c_long, c_void};
use std::ptr;
use std::rc::Rc;
use util::mem::{HeapSizeOf, heap_size_of};

View file

@ -4,17 +4,17 @@
#![allow(non_snake_case)]
extern crate freetype;
extern crate fontconfig;
extern crate freetype;
use fontconfig::fontconfig::{FcChar8, FcResultMatch, FcSetSystem};
use fontconfig::fontconfig::{FcConfigGetCurrent, FcConfigGetFonts, FcConfigSubstitute};
use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPatternGetString};
use fontconfig::fontconfig::{FcFontSetDestroy, FcMatchPattern, FcPatternCreate, FcPatternDestroy};
use fontconfig::fontconfig::{FcFontSetList, FcObjectSetCreate, FcObjectSetDestroy, FcPatternAddString};
use fontconfig::fontconfig::{FcObjectSetAdd, FcPatternGetInteger};
use fontconfig::fontconfig::{FcPatternAddString, FcFontSetList, FcObjectSetCreate, FcObjectSetDestroy};
use fontconfig::fontconfig::{FcPatternDestroy, FcFontSetDestroy, FcMatchPattern, FcPatternCreate};
use libc;
use libc::{c_int, c_char};
use libc::{c_char, c_int};
use std::borrow::ToOwned;
use std::ffi::CString;
use std::ptr;

View file

@ -6,12 +6,10 @@ use euclid::point::Point2D;
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
use simd::u32x4;
use std::cmp::{Ordering, PartialOrd};
use std::fmt;
use std::mem;
use std::u16;
use std::vec::Vec;
use std::{fmt, mem, u16};
use util::geometry::Au;
use util::range::{self, Range, RangeIndex, EachIndex};
use util::range::{self, EachIndex, Range, RangeIndex};
use util::vec::*;
/// GlyphEntry is a port of Gecko's CompressedGlyph scheme for storing glyph data compactly.

View file

@ -7,16 +7,17 @@ extern crate harfbuzz;
use euclid::Point2D;
use font::{DISABLE_KERNING_SHAPING_FLAG, Font, FontHandleMethods, FontTableMethods, FontTableTag};
use font::{IGNORE_LIGATURES_SHAPING_FLAG, RTL_FLAG, ShapingOptions};
use harfbuzz::{HB_MEMORY_MODE_READONLY, HB_DIRECTION_LTR, HB_DIRECTION_RTL};
use harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
use harfbuzz::{RUST_hb_blob_create, RUST_hb_face_create_for_tables};
use harfbuzz::{RUST_hb_buffer_add_utf8};
use harfbuzz::{RUST_hb_buffer_create, RUST_hb_font_destroy};
use harfbuzz::{RUST_hb_buffer_destroy};
use harfbuzz::{RUST_hb_buffer_get_glyph_infos, RUST_hb_shape};
use harfbuzz::{RUST_hb_buffer_get_glyph_positions};
use harfbuzz::{RUST_hb_buffer_get_length};
use harfbuzz::{RUST_hb_buffer_set_direction};
use harfbuzz::{RUST_hb_face_destroy};
use harfbuzz::{RUST_hb_font_create};
use harfbuzz::{RUST_hb_font_destroy, RUST_hb_buffer_create};
use harfbuzz::{RUST_hb_font_funcs_create};
use harfbuzz::{RUST_hb_font_funcs_set_glyph_func};
use harfbuzz::{RUST_hb_font_funcs_set_glyph_h_advance_func};
@ -24,23 +25,20 @@ use harfbuzz::{RUST_hb_font_funcs_set_glyph_h_kerning_func};
use harfbuzz::{RUST_hb_font_set_funcs};
use harfbuzz::{RUST_hb_font_set_ppem};
use harfbuzz::{RUST_hb_font_set_scale};
use harfbuzz::{RUST_hb_shape, RUST_hb_buffer_get_glyph_infos};
use harfbuzz::{hb_blob_t};
use harfbuzz::{hb_bool_t};
use harfbuzz::{hb_buffer_t, hb_codepoint_t, hb_font_funcs_t};
use harfbuzz::{hb_face_t, hb_font_t};
use harfbuzz::{hb_feature_t};
use harfbuzz::{hb_font_funcs_t, hb_buffer_t, hb_codepoint_t};
use harfbuzz::{hb_glyph_info_t};
use harfbuzz::{hb_glyph_position_t};
use harfbuzz::{hb_position_t, hb_tag_t};
use libc::{c_uint, c_int, c_void, c_char};
use libc::{c_char, c_int, c_uint, c_void};
use platform::font::FontTable;
use std::char;
use std::cmp;
use std::ptr;
use text::glyph::{CharIndex, GlyphStore, GlyphId, GlyphData};
use std::{char, cmp, ptr};
use text::glyph::{CharIndex, GlyphData, GlyphId, GlyphStore};
use text::shaping::ShaperMethods;
use text::util::{float_to_fixed, fixed_to_float, is_bidi_control};
use text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
use util::geometry::Au;
use util::range::Range;