mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Move util::range into its own crate
This commit is contained in:
parent
455ed0ae6d
commit
205336bf2e
21 changed files with 96 additions and 26 deletions
|
@ -32,6 +32,9 @@ path = "../script"
|
|||
[dependencies.layout_traits]
|
||||
path = "../layout_traits"
|
||||
|
||||
[dependencies.range]
|
||||
path = "../range"
|
||||
|
||||
[dependencies.script_traits]
|
||||
path = "../script_traits"
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@ use list_item::ListItemFlow;
|
|||
use model::{self, MaybeAuto, ToGfxMatrix};
|
||||
use net_traits::image::base::{Image, PixelFormat};
|
||||
use net_traits::image_cache_thread::UsePlaceholder;
|
||||
use range::Range;
|
||||
use std::default::Default;
|
||||
use std::sync::Arc;
|
||||
use std::{cmp, f32};
|
||||
|
@ -57,7 +58,6 @@ use style_traits::cursor::Cursor;
|
|||
use table_cell::CollapsedBordersForCell;
|
||||
use url::Url;
|
||||
use util::opts;
|
||||
use util::range::Range;
|
||||
|
||||
/// The logical width of an insertion point: at the moment, a one-pixel-wide line.
|
||||
const INSERTION_POINT_LOGICAL_WIDTH: Au = Au(1 * AU_PER_PX);
|
||||
|
|
|
@ -27,6 +27,7 @@ use model::{self, IntrinsicISizes, IntrinsicISizesContribution, MaybeAuto, speci
|
|||
use msg::constellation_msg::PipelineId;
|
||||
use net_traits::image::base::{Image, ImageMetadata};
|
||||
use net_traits::image_cache_thread::{ImageOrMetadataAvailable, UsePlaceholder};
|
||||
use range::*;
|
||||
use rustc_serialize::{Encodable, Encoder};
|
||||
use script::dom::htmlcanvaselement::HTMLCanvasData;
|
||||
use std::borrow::ToOwned;
|
||||
|
@ -48,7 +49,6 @@ use text;
|
|||
use text::TextRunScanner;
|
||||
use url::Url;
|
||||
use util;
|
||||
use util::range::*;
|
||||
use util::str::slice_chars;
|
||||
use wrapper::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ use gfx::font_context::FontContext;
|
|||
use incremental::{BUBBLE_ISIZES, REFLOW, REFLOW_OUT_OF_FLOW, REPAINT, RESOLVE_GENERATED_CONTENT};
|
||||
use layout_debug;
|
||||
use model::IntrinsicISizesContribution;
|
||||
use range::{Range, RangeIndex};
|
||||
use std::cmp::max;
|
||||
use std::collections::VecDeque;
|
||||
use std::sync::Arc;
|
||||
|
@ -34,7 +35,6 @@ use text;
|
|||
use unicode_bidi;
|
||||
use util;
|
||||
use util::print_tree::PrintTree;
|
||||
use util::range::{Range, RangeIndex};
|
||||
use wrapper::PseudoElementType;
|
||||
|
||||
// From gfxFontConstants.h in Firefox
|
||||
|
|
|
@ -43,6 +43,8 @@ extern crate net_traits;
|
|||
extern crate plugins as servo_plugins;
|
||||
#[macro_use]
|
||||
extern crate profile_traits;
|
||||
#[macro_use]
|
||||
extern crate range;
|
||||
extern crate rustc_serialize;
|
||||
extern crate script;
|
||||
extern crate script_traits;
|
||||
|
@ -57,7 +59,6 @@ extern crate time;
|
|||
extern crate unicode_bidi;
|
||||
extern crate unicode_script;
|
||||
extern crate url;
|
||||
#[macro_use]
|
||||
extern crate util;
|
||||
extern crate webrender_traits;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ use gfx::text::glyph::CharIndex;
|
|||
use gfx::text::text_run::TextRun;
|
||||
use gfx::text::util::{self, CompressionMode};
|
||||
use inline::InlineFragments;
|
||||
use range::{Range, RangeIndex};
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::LinkedList;
|
||||
use std::mem;
|
||||
|
@ -27,7 +28,6 @@ use style::properties::style_structs::Font as FontStyle;
|
|||
use unicode_bidi::{is_rtl, process_text};
|
||||
use unicode_script::{get_script, Script};
|
||||
use util::linked_list::split_off_head;
|
||||
use util::range::{Range, RangeIndex};
|
||||
|
||||
/// Returns the concatenated text of a list of unscanned text fragments.
|
||||
fn text(fragments: &LinkedList<Fragment>) -> String {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue