Move util::range into its own crate

This commit is contained in:
Jonathan Schuster 2016-02-21 13:08:20 -05:00
parent 455ed0ae6d
commit 205336bf2e
21 changed files with 96 additions and 26 deletions

View file

@ -52,6 +52,9 @@ path = "../msg"
[dependencies.profile_traits]
path = "../profile_traits"
[dependencies.range]
path = "../range"
[dependencies.style]
path = "../style"

View file

@ -27,6 +27,7 @@ use msg::constellation_msg::PipelineId;
use net_traits::image::base::Image;
use paint_context::PaintContext;
use paint_thread::{PaintLayerContents, PaintLayer};
use range::Range;
use self::DisplayItem::*;
use smallvec::SmallVec;
use std::cmp::Ordering;
@ -44,7 +45,6 @@ use util::geometry::MAX_RECT;
use util::linked_list::prepend_from;
use util::opts;
use util::print_tree::PrintTree;
use util::range::Range;
use webrender_traits::WebGLContextId;
pub use style::dom::OpaqueNode;

View file

@ -59,6 +59,8 @@ extern crate net_traits;
#[macro_use]
extern crate profile_traits;
extern crate rand;
#[macro_use]
extern crate range;
extern crate rustc_serialize;
extern crate serde;
@ -73,7 +75,6 @@ extern crate style_traits;
extern crate time;
extern crate unicode_script;
extern crate url;
#[macro_use]
extern crate util;
extern crate webrender_traits;

View file

@ -28,6 +28,7 @@ use filters;
use font_context::FontContext;
use gfx_traits::{color, LayerKind};
use net_traits::image::base::{Image, PixelFormat};
use range::Range;
use std::default::Default;
use std::sync::Arc;
use std::{f32, mem, ptr};
@ -36,7 +37,6 @@ use text::TextRun;
use text::glyph::CharIndex;
use util::geometry::{self, MAX_RECT, PagePx, ScreenPx};
use util::opts;
use util::range::Range;
pub struct PaintContext<'a> {
pub draw_target: DrawTarget,

View file

@ -4,12 +4,12 @@
use app_units::Au;
use euclid::point::Point2D;
use range::{self, EachIndex, Range, RangeIndex};
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
use simd::u32x4;
use std::cmp::{Ordering, PartialOrd};
use std::vec::Vec;
use std::{fmt, mem, u16};
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

@ -34,11 +34,11 @@ use harfbuzz::{hb_glyph_position_t};
use harfbuzz::{hb_position_t, hb_tag_t};
use libc::{c_char, c_int, c_uint, c_void};
use platform::font::FontTable;
use range::Range;
use std::{char, cmp, ptr};
use text::glyph::{CharIndex, GlyphData, GlyphId, GlyphStore};
use text::shaping::ShaperMethods;
use text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
use util::range::Range;
macro_rules! hb_tag {
($t1:expr, $t2:expr, $t3:expr, $t4:expr) => (

View file

@ -6,12 +6,12 @@ use app_units::Au;
use font::{Font, FontHandleMethods, FontMetrics, IS_WHITESPACE_SHAPING_FLAG, RunMetrics};
use font::{ShapingOptions};
use platform::font_template::FontTemplateData;
use range::Range;
use std::cell::Cell;
use std::cmp::{Ordering, max};
use std::slice::Iter;
use std::sync::Arc;
use text::glyph::{CharIndex, GlyphStore};
use util::range::Range;
use util::vec::{Comparator, FullBinarySearchMethods};
use webrender_traits;