mirror of
https://github.com/servo/servo.git
synced 2025-08-23 22:35:33 +01:00
Move ByteIndex to gfx_traits.
This commit is contained in:
parent
c270622bfd
commit
e5cab36671
5 changed files with 19 additions and 8 deletions
|
@ -13,6 +13,8 @@ azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
|
|||
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
|
||||
msg = {path = "../msg"}
|
||||
plugins = {path = "../plugins"}
|
||||
range = {path = "../range"}
|
||||
rustc-serialize = "0.3"
|
||||
euclid = {version = "0.6.5", features = ["plugins"]}
|
||||
heapsize = "0.3.0"
|
||||
heapsize_plugin = "0.1.2"
|
||||
|
|
|
@ -15,6 +15,9 @@ extern crate euclid;
|
|||
extern crate heapsize;
|
||||
extern crate layers;
|
||||
extern crate msg;
|
||||
#[macro_use]
|
||||
extern crate range;
|
||||
extern crate rustc_serialize;
|
||||
extern crate serde;
|
||||
|
||||
pub mod color;
|
||||
|
@ -25,6 +28,7 @@ use azure::azure_hl::Color;
|
|||
use euclid::Matrix4D;
|
||||
use euclid::rect::Rect;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use range::RangeIndex;
|
||||
use std::fmt::{self, Debug, Formatter};
|
||||
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
||||
|
||||
|
@ -255,3 +259,10 @@ impl FragmentType {
|
|||
}
|
||||
}
|
||||
|
||||
int_range_index! {
|
||||
#[derive(Deserialize, Serialize, RustcEncodable)]
|
||||
#[doc = "An index that refers to a byte offset in a text run. This could \
|
||||
point to the middle of a glyph."]
|
||||
#[derive(HeapSizeOf)]
|
||||
struct ByteIndex(isize)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue