Auto merge of #9532 - nox:dedup-heapsize, r=Manishearth

Say farewell to in-tree HeapSizeOf

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9532)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-02-05 03:40:36 +05:30
commit 2a6707ce58
82 changed files with 426 additions and 881 deletions

View file

@ -35,7 +35,9 @@ path = "../plugins"
path = "../util" path = "../util"
[dependencies] [dependencies]
cssparser = { version = "0.5", features = [ "serde-serialization" ] } cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
serde_macros = "0.6" serde_macros = "0.6"

View file

@ -7,13 +7,14 @@
#![feature(custom_derive)] #![feature(custom_derive)]
#![feature(nonzero)] #![feature(nonzero)]
#![feature(plugin)] #![feature(plugin)]
#![plugin(serde_macros, plugins)] #![plugin(heapsize_plugin, plugins, serde_macros)]
extern crate azure; extern crate azure;
extern crate core; extern crate core;
extern crate cssparser; extern crate cssparser;
extern crate euclid; extern crate euclid;
extern crate gfx_traits; extern crate gfx_traits;
extern crate heapsize;
extern crate ipc_channel; extern crate ipc_channel;
extern crate layers; extern crate layers;
extern crate offscreen_gl_context; extern crate offscreen_gl_context;
@ -40,7 +41,6 @@ use std::default::Default;
use std::fmt; use std::fmt;
use std::str::FromStr; use std::str::FromStr;
use std::sync::mpsc::Sender; use std::sync::mpsc::Sender;
use util::mem::HeapSizeOf;
#[derive(Clone, Deserialize, Serialize)] #[derive(Clone, Deserialize, Serialize)]
pub enum FillRule { pub enum FillRule {

View file

@ -91,7 +91,7 @@ gleam = "0.2"
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
[target.x86_64-apple-darwin.dependencies] [target.x86_64-apple-darwin.dependencies]
core-graphics = "0.2" core-graphics = "0.2"

View file

@ -25,7 +25,7 @@ git = "https://github.com/servo/ipc-channel"
[dependencies] [dependencies]
hyper = { version = "0.7", features = [ "serde-serialization" ] } hyper = { version = "0.7", features = [ "serde-serialization" ] }
log = "0.3" log = "0.3"
time = "0.1"
rustc-serialize = "0.3" rustc-serialize = "0.3"
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
time = "0.1"

View file

@ -20,11 +20,13 @@ git = "https://github.com/servo/ipc-channel"
path = "../plugins" path = "../plugins"
[dependencies] [dependencies]
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
hyper = { version = "0.7", features = [ "serde-serialization" ] } hyper = { version = "0.7", features = [ "serde-serialization" ] }
time = "0.1" time = "0.1"
rustc-serialize = "0.3" rustc-serialize = "0.3"
bitflags = "0.3" bitflags = "0.3"
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}

View file

@ -13,10 +13,11 @@
#![deny(unsafe_code)] #![deny(unsafe_code)]
#![feature(custom_derive, plugin)] #![feature(custom_derive, plugin)]
#![plugin(serde_macros, plugins)] #![plugin(heapsize_plugin, serde_macros)]
#[macro_use] #[macro_use]
extern crate bitflags; extern crate bitflags;
extern crate heapsize;
extern crate hyper; extern crate hyper;
extern crate ipc_channel; extern crate ipc_channel;
extern crate msg; extern crate msg;
@ -36,7 +37,6 @@ use std::net::TcpStream;
use time::Duration; use time::Duration;
use time::Tm; use time::Tm;
use url::Url; use url::Url;
use util::mem::HeapSizeOf;
// Information would be attached to NewGlobal to be received and show in devtools. // Information would be attached to NewGlobal to be received and show in devtools.
// Extend these fields if we need more information. // Extend these fields if we need more information.

View file

@ -14,6 +14,8 @@ bitflags = "0.3"
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
fnv = "1.0" fnv = "1.0"
harfbuzz-sys = "0.1" harfbuzz-sys = "0.1"
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
lazy_static = "0.1" lazy_static = "0.1"
libc = "0.2" libc = "0.2"
log = "0.3" log = "0.3"
@ -23,10 +25,10 @@ rustc-serialize = "0.3"
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
smallvec = "0.1" smallvec = "0.1"
string_cache = "0.2" string_cache = {version = "0.2.7", features = ["heap_size"]}
time = "0.1.12" time = "0.1.12"
unicode-script = { version = "0.1", features = ["harfbuzz"] } unicode-script = { version = "0.1", features = ["harfbuzz"] }
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
servo-skia = "0.20130412.0" servo-skia = "0.20130412.0"
[dependencies.plugins] [dependencies.plugins]

View file

@ -22,6 +22,7 @@ use euclid::approxeq::ApproxEq;
use euclid::num::Zero; use euclid::num::Zero;
use euclid::{Matrix2D, Matrix4, Point2D, Rect, SideOffsets2D, Size2D}; use euclid::{Matrix2D, Matrix4, Point2D, Rect, SideOffsets2D, Size2D};
use gfx_traits::{color, LayerId, LayerKind, ScrollPolicy}; use gfx_traits::{color, LayerId, LayerKind, ScrollPolicy};
use heapsize::HeapSizeOf;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use net_traits::image::base::Image; use net_traits::image::base::Image;
use paint_context::PaintContext; use paint_context::PaintContext;
@ -41,7 +42,6 @@ use text::glyph::CharIndex;
use util::cursor::Cursor; use util::cursor::Cursor;
use util::geometry::MAX_RECT; use util::geometry::MAX_RECT;
use util::linked_list::prepend_from; use util::linked_list::prepend_from;
use util::mem::HeapSizeOf;
use util::opts; use util::opts;
use util::print_tree::PrintTree; use util::print_tree::PrintTree;
use util::range::Range; use util::range::Range;
@ -1256,8 +1256,8 @@ pub struct GradientDisplayItem {
impl HeapSizeOf for GradientDisplayItem { impl HeapSizeOf for GradientDisplayItem {
fn heap_size_of_children(&self) -> usize { fn heap_size_of_children(&self) -> usize {
use heapsize::heap_size_of;
use libc::c_void; use libc::c_void;
use util::mem::heap_size_of;
// We can't measure `stops` via Vec's HeapSizeOf implementation because GradientStop isn't // We can't measure `stops` via Vec's HeapSizeOf implementation because GradientStop isn't
// defined in this module, and we don't want to import GradientStop into util::mem where // defined in this module, and we don't want to import GradientStop into util::mem where

View file

@ -13,6 +13,7 @@ use font::SpecifiedFontStyle;
use font::{Font, FontGroup}; use font::{Font, FontGroup};
use font_cache_thread::FontCacheThread; use font_cache_thread::FontCacheThread;
use font_template::FontTemplateDescriptor; use font_template::FontTemplateDescriptor;
use heapsize::HeapSizeOf;
use platform::font::FontHandle; use platform::font::FontHandle;
use platform::font_context::FontContextHandle; use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData; use platform::font_template::FontTemplateData;
@ -28,7 +29,6 @@ use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
use string_cache::Atom; use string_cache::Atom;
use style::computed_values::{font_style, font_variant}; use style::computed_values::{font_style, font_variant};
use util::cache::HashCache; use util::cache::HashCache;
use util::mem::HeapSizeOf;
#[cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))] #[cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))]
fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont { fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont {

View file

@ -15,6 +15,7 @@
#![feature(str_char)] #![feature(str_char)]
#![feature(unique)] #![feature(unique)]
#![plugin(heapsize_plugin)]
#![plugin(plugins)] #![plugin(plugins)]
#![plugin(serde_macros)] #![plugin(serde_macros)]
@ -45,6 +46,7 @@ extern crate gfx_traits;
// shapers. For now, however, this is a hard dependency. // shapers. For now, however, this is a hard dependency.
extern crate harfbuzz_sys as harfbuzz; extern crate harfbuzz_sys as harfbuzz;
extern crate heapsize;
extern crate ipc_channel; extern crate ipc_channel;
extern crate layers; extern crate layers;
#[macro_use] #[macro_use]

View file

@ -10,10 +10,10 @@ use freetype::freetype::FT_Library;
use freetype::freetype::FT_Memory; use freetype::freetype::FT_Memory;
use freetype::freetype::FT_New_Library; use freetype::freetype::FT_New_Library;
use freetype::freetype::struct_FT_MemoryRec_; use freetype::freetype::struct_FT_MemoryRec_;
use heapsize::{HeapSizeOf, heap_size_of};
use libc::{c_long, c_void}; use libc::{c_long, c_void};
use std::ptr; use std::ptr;
use std::rc::Rc; use std::rc::Rc;
use util::mem::{HeapSizeOf, heap_size_of};
// We pass a |User| struct -- via an opaque |void*| -- to FreeType each time a new instance is // We pass a |User| struct -- via an opaque |void*| -- to FreeType each time a new instance is
// created. FreeType passes it back to the ft_alloc/ft_realloc/ft_free callbacks. We use it to // created. FreeType passes it back to the ft_alloc/ft_realloc/ft_free callbacks. We use it to

View file

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use util::mem::HeapSizeOf; use heapsize::HeapSizeOf;
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct FontContextHandle { pub struct FontContextHandle {

View file

@ -26,5 +26,7 @@ path = "../util"
[dependencies] [dependencies]
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"

View file

@ -3,13 +3,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![feature(custom_derive, plugin)] #![feature(custom_derive, plugin)]
#![plugin(plugins, serde_macros)] #![plugin(heapsize_plugin, plugins, serde_macros)]
#![crate_name = "gfx_traits"] #![crate_name = "gfx_traits"]
#![crate_type = "rlib"] #![crate_type = "rlib"]
extern crate azure; extern crate azure;
extern crate euclid; extern crate euclid;
extern crate heapsize;
extern crate layers; extern crate layers;
extern crate msg; extern crate msg;
extern crate serde; extern crate serde;

View file

@ -55,20 +55,22 @@ git = "https://github.com/servo/ipc-channel"
[dependencies] [dependencies]
app_units = {version = "0.2", features = ["plugins"]} app_units = {version = "0.2", features = ["plugins"]}
cssparser = { version = "0.5", features = [ "serde-serialization" ] }
log = "0.3"
fnv = "1.0"
bitflags = "0.3" bitflags = "0.3"
rustc-serialize = "0.3" cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
libc = "0.2"
selectors = "0.4.1"
smallvec = "0.1"
string_cache = "0.2"
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
fnv = "1.0"
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
libc = "0.2"
log = "0.3"
rustc-serialize = "0.3"
selectors = {version = "0.4.1", features = ["heap_size"]}
serde = "0.6" serde = "0.6"
serde_macros = "0.6"
serde_json = "0.5" serde_json = "0.5"
serde_macros = "0.6"
smallvec = "0.1"
string_cache = {version = "0.2.7", features = ["heap_size"]}
time = "0.1" time = "0.1"
unicode-bidi = "0.2" unicode-bidi = "0.2"
unicode-script = { version = "0.1", features = ["harfbuzz"] } unicode-script = { version = "0.1", features = ["harfbuzz"] }
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}

View file

@ -14,6 +14,7 @@ use fnv::FnvHasher;
use gfx::font_cache_thread::FontCacheThread; use gfx::font_cache_thread::FontCacheThread;
use gfx::font_context::FontContext; use gfx::font_context::FontContext;
use gfx_traits::LayerId; use gfx_traits::LayerId;
use heapsize::HeapSizeOf;
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
use net_traits::image::base::Image; use net_traits::image::base::Image;
use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread, ImageResponse, ImageState}; use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread, ImageResponse, ImageState};
@ -27,7 +28,6 @@ use std::sync::{Arc, Mutex};
use style::context::{LocalStyleContext, SharedStyleContext, StyleContext}; use style::context::{LocalStyleContext, SharedStyleContext, StyleContext};
use style::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache}; use style::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
use url::Url; use url::Url;
use util::mem::HeapSizeOf;
use util::opts; use util::opts;
struct LocalLayoutContext { struct LocalLayoutContext {

View file

@ -28,6 +28,7 @@ use gfx::font_cache_thread::FontCacheThread;
use gfx::font_context; use gfx::font_context;
use gfx::paint_thread::{LayoutToPaintMsg, PaintLayer}; use gfx::paint_thread::{LayoutToPaintMsg, PaintLayer};
use gfx_traits::{color, Epoch, LayerId, ScrollPolicy}; use gfx_traits::{color, Epoch, LayerId, ScrollPolicy};
use heapsize::HeapSizeOf;
use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAINT}; use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAINT};
use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
@ -73,7 +74,6 @@ use url::Url;
use util::geometry::MAX_RECT; use util::geometry::MAX_RECT;
use util::ipc::OptionalIpcSender; use util::ipc::OptionalIpcSender;
use util::logical_geometry::LogicalPoint; use util::logical_geometry::LogicalPoint;
use util::mem::HeapSizeOf;
use util::opts; use util::opts;
use util::thread; use util::thread;
use util::thread_state; use util::thread_state;

View file

@ -17,6 +17,7 @@
#![deny(unsafe_code)] #![deny(unsafe_code)]
#![plugin(heapsize_plugin)]
#![plugin(plugins)] #![plugin(plugins)]
extern crate app_units; extern crate app_units;
@ -30,6 +31,7 @@ extern crate euclid;
extern crate fnv; extern crate fnv;
extern crate gfx; extern crate gfx;
extern crate gfx_traits; extern crate gfx_traits;
extern crate heapsize;
extern crate ipc_channel; extern crate ipc_channel;
extern crate layout_traits; extern crate layout_traits;
extern crate libc; extern crate libc;

View file

@ -31,4 +31,4 @@ git = "https://github.com/servo/ipc-channel"
[dependencies] [dependencies]
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}

View file

@ -21,11 +21,13 @@ git = "https://github.com/servo/ipc-channel"
path = "../plugins" path = "../plugins"
[dependencies] [dependencies]
cssparser = { version = "0.5", features = [ "serde-serialization" ] }
bitflags = "0.3" bitflags = "0.3"
cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
euclid = {version = "0.6.1", features = ["plugins"]}
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
hyper = { version = "0.7", features = [ "serde-serialization" ] } hyper = { version = "0.7", features = [ "serde-serialization" ] }
rustc-serialize = "0.3.4" rustc-serialize = "0.3.4"
euclid = {version = "0.6.1", features = ["plugins"]}
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}

View file

@ -16,7 +16,6 @@ use std::cell::Cell;
use std::fmt; use std::fmt;
use url::Url; use url::Url;
use util::geometry::{PagePx, ViewportPx}; use util::geometry::{PagePx, ViewportPx};
use util::mem::HeapSizeOf;
use webdriver_msg::{LoadStatus, WebDriverScriptCommand}; use webdriver_msg::{LoadStatus, WebDriverScriptCommand};
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]

View file

@ -3,11 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![feature(custom_attribute, custom_derive, plugin)] #![feature(custom_attribute, custom_derive, plugin)]
#![plugin(serde_macros, plugins)] #![plugin(heapsize_plugin, serde_macros, plugins)]
#[macro_use] #[macro_use]
extern crate bitflags; extern crate bitflags;
extern crate euclid; extern crate euclid;
extern crate heapsize;
extern crate hyper; extern crate hyper;
extern crate ipc_channel; extern crate ipc_channel;
extern crate layers; extern crate layers;

View file

@ -38,6 +38,6 @@ cookie = "0.2"
mime_guess = "1.1.1" mime_guess = "1.1.1"
flate2 = "0.2.0" flate2 = "0.2.0"
uuid = "0.1.16" uuid = "0.1.16"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
websocket = "0.14.0" websocket = "0.14.0"
immeta = "0.2" immeta = "0.2"

View file

@ -20,11 +20,13 @@ git = "https://github.com/servo/ipc-channel"
path = "../plugins" path = "../plugins"
[dependencies] [dependencies]
log = "0.3" heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
hyper = { version = "0.7", features = [ "serde-serialization" ] } hyper = { version = "0.7", features = [ "serde-serialization" ] }
image = "0.5.0" image = "0.5.0"
log = "0.3"
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
stb_image = "0.2" stb_image = "0.2"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
websocket = "0.14.0" websocket = "0.14.0"

View file

@ -6,7 +6,6 @@ use ipc_channel::ipc::{self, IpcSender};
use msg::constellation_msg::{Image, ImageMetadata}; use msg::constellation_msg::{Image, ImageMetadata};
use std::sync::Arc; use std::sync::Arc;
use url::Url; use url::Url;
use util::mem::HeapSizeOf;
/// This is optionally passed to the image cache when requesting /// This is optionally passed to the image cache when requesting
/// and image, and returned to the specified event loop when the /// and image, and returned to the specified event loop when the

View file

@ -9,8 +9,9 @@
#![feature(slice_patterns)] #![feature(slice_patterns)]
#![feature(step_by)] #![feature(step_by)]
#![feature(custom_attribute)] #![feature(custom_attribute)]
#![plugin(serde_macros, plugins)] #![plugin(heapsize_plugin, serde_macros)]
extern crate heapsize;
extern crate hyper; extern crate hyper;
extern crate image as piston_image; extern crate image as piston_image;
extern crate ipc_channel; extern crate ipc_channel;
@ -32,7 +33,6 @@ use msg::constellation_msg::{PipelineId};
use serde::{Deserializer, Serializer}; use serde::{Deserializer, Serializer};
use std::thread; use std::thread;
use url::Url; use url::Url;
use util::mem::HeapSizeOf;
use websocket::header; use websocket::header;
pub mod hosts; pub mod hosts;
@ -69,6 +69,7 @@ pub enum LoadContext {
#[derive(Clone, Deserialize, Serialize, HeapSizeOf)] #[derive(Clone, Deserialize, Serialize, HeapSizeOf)]
pub struct LoadData { pub struct LoadData {
pub url: Url, pub url: Url,
#[ignore_heap_size_of = "Defined in hyper"]
pub method: Method, pub method: Method,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
/// Headers that will apply to the initial request only /// Headers that will apply to the initial request only
@ -297,6 +298,7 @@ pub struct Metadata {
/// Final URL after redirects. /// Final URL after redirects.
pub final_url: Url, pub final_url: Url,
#[ignore_heap_size_of = "Defined in hyper"]
/// MIME type / subtype. /// MIME type / subtype.
pub content_type: Option<(ContentType)>, pub content_type: Option<(ContentType)>,
@ -307,6 +309,7 @@ pub struct Metadata {
/// Headers /// Headers
pub headers: Option<Headers>, pub headers: Option<Headers>,
#[ignore_heap_size_of = "Defined in hyper"]
/// HTTP Status /// HTTP Status
pub status: Option<RawStatus>, pub status: Option<RawStatus>,
} }

View file

@ -17,7 +17,7 @@ rev = "9dca15de3e8ea266d3e7e868c0f358ed4fa5f195"
optional = true optional = true
[dependencies] [dependencies]
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
[features] [features]
default = [] default = []

View file

@ -1,82 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
//! Handles the auto-deriving for `#[derive(HeapSizeOf)]`
//!
//! This provides the `#[derive(HeapSizeOf)]` decorator, which
//! generates a `HeapSizeOf` implementation that adds up
//! calls to heap_size_of_children() for all the fields
//! of a struct or enum variant.
//!
//! Fields marked `#[ignore_heap_size_of = "reason"]` will
//! be ignored in this calculation. Providing a reason is compulsory.
use syntax::ast::*;
use syntax::attr::AttrMetaMethods;
use syntax::codemap::Span;
use syntax::ext::base::{Annotatable, ExtCtxt};
use syntax::ext::build::AstBuilder;
use syntax::ptr::P;
use syntax_ext::deriving::generic::*;
pub fn expand_heap_size(cx: &mut ExtCtxt, span: Span, mitem: &MetaItem,
item: &Annotatable, push: &mut FnMut(Annotatable)) {
let trait_def = TraitDef {
is_unsafe: false,
span: span,
attributes: Vec::new(),
path: ty::Path::new(vec!("util", "mem", "HeapSizeOf")),
additional_bounds: Vec::new(),
generics: ty::LifetimeBounds::empty(),
methods: vec![
MethodDef {
name: "heap_size_of_children",
generics: ty::LifetimeBounds::empty(),
explicit_self: ty::borrowed_explicit_self(),
args: vec!(),
ret_ty: ty::Literal(ty::Path::new_local("usize")),
attributes: vec!(),
is_unsafe: false,
combine_substructure: combine_substructure(Box::new(heap_size_substructure))
}
],
associated_types: vec![],
};
trait_def.expand(cx, mitem, item, push)
}
/// Defines how the implementation for `heap_size_of_children()` is to be generated.
fn heap_size_substructure(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure) -> P<Expr> {
let fields = match *substr.fields {
Struct(ref fs) | EnumMatching(_, _, ref fs) => fs,
_ => cx.span_bug(trait_span, "impossible substructure in `#[derive(HeapSizeOf)]`")
};
fields.iter().fold(cx.expr_usize(trait_span, 0), |acc, ref item| {
if item.attrs.iter()
.find(|ref a| {
if a.check_name("ignore_heap_size_of") {
match a.node.value.node {
MetaNameValue(..) => (),
_ => cx.span_err(a.span, "#[ignore_heap_size_of] \
should have an explanation, \
e.g. #[ignore_heap_size_of = \"\"]")
}
true
} else {
false
}
})
.is_some() {
acc
} else {
cx.expr_binary(item.span, BiAdd, acc,
cx.expr_method_call(item.span,
item.self_.clone(),
substr.method_ident,
Vec::new()))
}
})
}

View file

@ -36,8 +36,6 @@ use syntax::parse::token::intern;
// Public for documentation to show up // Public for documentation to show up
/// Handles the auto-deriving for `#[derive(JSTraceable)]` /// Handles the auto-deriving for `#[derive(JSTraceable)]`
pub mod jstraceable; pub mod jstraceable;
/// Handles the auto-deriving for `#[derive(HeapSizeOf)]`
pub mod heap_size;
pub mod lints; pub mod lints;
/// Autogenerates implementations of Reflectable on DOM structs /// Autogenerates implementations of Reflectable on DOM structs
pub mod reflector; pub mod reflector;
@ -51,7 +49,6 @@ pub fn plugin_registrar(reg: &mut Registry) {
reg.register_syntax_extension(intern("dom_struct"), MultiModifier(box jstraceable::expand_dom_struct)); reg.register_syntax_extension(intern("dom_struct"), MultiModifier(box jstraceable::expand_dom_struct));
reg.register_syntax_extension(intern("derive_JSTraceable"), MultiDecorator(box jstraceable::expand_jstraceable)); reg.register_syntax_extension(intern("derive_JSTraceable"), MultiDecorator(box jstraceable::expand_jstraceable));
reg.register_syntax_extension(intern("_generate_reflector"), MultiDecorator(box reflector::expand_reflector)); reg.register_syntax_extension(intern("_generate_reflector"), MultiDecorator(box reflector::expand_reflector));
reg.register_syntax_extension(intern("derive_HeapSizeOf"), MultiDecorator(box heap_size::expand_heap_size));
reg.register_macro("to_lower", casing::expand_lower); reg.register_macro("to_lower", casing::expand_lower);
reg.register_macro("to_upper", casing::expand_upper); reg.register_macro("to_upper", casing::expand_upper);
reg.register_macro("url", url_plugin::expand_url); reg.register_macro("url", url_plugin::expand_url);

View file

@ -64,27 +64,29 @@ path = "../gfx_traits"
[dependencies] [dependencies]
app_units = {version = "0.2", features = ["plugins"]} app_units = {version = "0.2", features = ["plugins"]}
cssparser = { version = "0.5", features = [ "serde-serialization" ] }
log = "0.3"
encoding = "0.2"
fnv = "1.0"
hyper = { version = "0.7", features = [ "serde-serialization" ] }
time = "0.1.12"
bitflags = "0.3" bitflags = "0.3"
rustc-serialize = "0.3"
libc = "0.2"
unicase = "1.0"
num = "0.1.24"
websocket = "0.14.0"
uuid = "0.1.16"
smallvec = "0.1"
html5ever = { version = "0.4", features = ["unstable"] }
selectors = "0.4.1"
string_cache = { version = "0.2", features = ["unstable"] }
euclid = {version = "0.6.1", features = ["plugins"]}
rand = "0.3"
serde = "0.6"
caseless = "0.1.0" caseless = "0.1.0"
cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
encoding = "0.2"
euclid = {version = "0.6.1", features = ["plugins"]}
fnv = "1.0"
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
html5ever = {version = "0.4.2", features = ["heap_size", "unstable"]}
hyper = { version = "0.7", features = [ "serde-serialization" ] }
image = "0.5.0" image = "0.5.0"
url = "0.5.4" libc = "0.2"
log = "0.3"
num = "0.1.24"
rand = "0.3"
ref_slice = "0.1.0" ref_slice = "0.1.0"
rustc-serialize = "0.3"
selectors = {version = "0.4.1", features = ["heap_size"]}
serde = "0.6"
smallvec = "0.1"
string_cache = {version = "0.2.7", features = ["heap_size", "unstable"]}
time = "0.1.12"
unicase = "1.0"
url = {version = "0.5.4", features = ["heap_size"]}
uuid = "0.1.16"
websocket = "0.14.0"

View file

@ -27,7 +27,6 @@ use std::sync::{Arc, Mutex};
use time::{self, Timespec, now}; use time::{self, Timespec, now};
use unicase::UniCase; use unicase::UniCase;
use url::{SchemeData, Url}; use url::{SchemeData, Url};
use util::mem::HeapSizeOf;
use util::thread::spawn_named; use util::thread::spawn_named;
/// Interface for network listeners concerned with CORS checks. Proper network requests /// Interface for network listeners concerned with CORS checks. Proper network requests
@ -41,6 +40,7 @@ pub struct CORSRequest {
pub origin: Url, pub origin: Url,
pub destination: Url, pub destination: Url,
pub mode: RequestMode, pub mode: RequestMode,
#[ignore_heap_size_of = "Defined in hyper"]
pub method: Method, pub method: Method,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
pub headers: Headers, pub headers: Headers,

View file

@ -14,7 +14,6 @@ use js::jsapi::{JSContext, JSObject, RootedValue};
use js::jsapi::{JS_IsExceptionPending, JS_ReportPendingException, JS_SetPendingException}; use js::jsapi::{JS_IsExceptionPending, JS_ReportPendingException, JS_SetPendingException};
use js::jsapi::{JS_RestoreFrameChain, JS_SaveFrameChain}; use js::jsapi::{JS_RestoreFrameChain, JS_SaveFrameChain};
use js::jsval::UndefinedValue; use js::jsval::UndefinedValue;
use util::mem::HeapSizeOf;
/// DOM exceptions that can be thrown by a native DOM method. /// DOM exceptions that can be thrown by a native DOM method.
#[derive(Debug, Clone, HeapSizeOf)] #[derive(Debug, Clone, HeapSizeOf)]

View file

@ -30,6 +30,7 @@ use dom::bindings::reflector::{Reflectable, Reflector};
use dom::bindings::trace::JSTraceable; use dom::bindings::trace::JSTraceable;
use dom::bindings::trace::trace_reflector; use dom::bindings::trace::trace_reflector;
use dom::node::Node; use dom::node::Node;
use heapsize::HeapSizeOf;
use js::jsapi::{Heap, JSObject, JSTracer}; use js::jsapi::{Heap, JSObject, JSTracer};
use js::jsval::JSVal; use js::jsval::JSVal;
use layout_interface::TrustedNodeAddress; use layout_interface::TrustedNodeAddress;
@ -40,7 +41,6 @@ use std::hash::{Hash, Hasher};
use std::mem; use std::mem;
use std::ops::Deref; use std::ops::Deref;
use std::ptr; use std::ptr;
use util::mem::HeapSizeOf;
use util::thread_state; use util::thread_state;
/// A traced reference to a DOM object /// A traced reference to a DOM object

View file

@ -10,7 +10,6 @@ use std::hash::{Hash, Hasher};
use std::ops; use std::ops;
use std::str; use std::str;
use std::str::FromStr; use std::str::FromStr;
use util::mem::HeapSizeOf;
use util::str::is_token; use util::str::is_token;
/// Encapsulates the IDL `ByteString` type. /// Encapsulates the IDL `ByteString` type.

View file

@ -13,6 +13,7 @@ use dom::bindings::inheritance::TopTypeId;
use dom::bindings::trace::trace_object; use dom::bindings::trace::trace_object;
use dom::browsingcontext; use dom::browsingcontext;
use dom::window; use dom::window;
use heapsize::HeapSizeOf;
use js; use js;
use js::error::throw_type_error; use js::error::throw_type_error;
use js::glue::{CallJitGetterOp, CallJitMethodOp, CallJitSetterOp, IsWrapper}; use js::glue::{CallJitGetterOp, CallJitMethodOp, CallJitSetterOp, IsWrapper};
@ -36,7 +37,6 @@ use libc::{self, c_uint};
use std::default::Default; use std::default::Default;
use std::ffi::CString; use std::ffi::CString;
use std::ptr; use std::ptr;
use util::mem::HeapSizeOf;
use util::non_geckolib::jsstring_to_str; use util::non_geckolib::jsstring_to_str;
/// Proxy handler for a WindowProxy. /// Proxy handler for a WindowProxy.

View file

@ -15,6 +15,7 @@ use core::nonzero::NonZero;
use dom::bindings::js::Root; use dom::bindings::js::Root;
use dom::bindings::reflector::Reflectable; use dom::bindings::reflector::Reflectable;
use dom::bindings::trace::JSTraceable; use dom::bindings::trace::JSTraceable;
use heapsize::HeapSizeOf;
use js::jsapi::{JSTracer, JS_GetReservedSlot, JS_SetReservedSlot}; use js::jsapi::{JSTracer, JS_GetReservedSlot, JS_SetReservedSlot};
use js::jsval::PrivateValue; use js::jsval::PrivateValue;
use libc::c_void; use libc::c_void;
@ -22,7 +23,6 @@ use std::cell::{Cell, UnsafeCell};
use std::iter::Iterator; use std::iter::Iterator;
use std::mem; use std::mem;
use std::ops::{Deref, DerefMut, Drop}; use std::ops::{Deref, DerefMut, Drop};
use util::mem::HeapSizeOf;
/// The index of the slot wherein a pointer to the weak holder cell is /// The index of the slot wherein a pointer to the weak holder cell is
/// stored for weak-referenceable bindings. We use slot 1 for holding it, /// stored for weak-referenceable bindings. We use slot 1 for holding it,

View file

@ -20,6 +20,7 @@ no_jsmanaged_fields!(OsRng);
#[dom_struct] #[dom_struct]
pub struct Crypto { pub struct Crypto {
reflector_: Reflector, reflector_: Reflector,
#[ignore_heap_size_of = "Defined in rand"]
rng: DOMRefCell<OsRng>, rng: DOMRefCell<OsRng>,
} }

View file

@ -84,7 +84,6 @@ use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, parse_sty
use style::selector_impl::{NonTSPseudoClass, ServoSelectorImpl}; use style::selector_impl::{NonTSPseudoClass, ServoSelectorImpl};
use style::values::CSSFloat; use style::values::CSSFloat;
use style::values::specified::{self, CSSColor, CSSRGBA, LengthOrPercentage}; use style::values::specified::{self, CSSColor, CSSRGBA, LengthOrPercentage};
use util::mem::HeapSizeOf;
use util::str::{DOMString, LengthOrPercentageOrAuto}; use util::str::{DOMString, LengthOrPercentageOrAuto};
// TODO: Update focus state when the top-level browsing context gains or loses system focus, // TODO: Update focus state when the top-level browsing context gains or loses system focus,

View file

@ -21,6 +21,7 @@ use dom::eventdispatcher::dispatch_event;
use dom::virtualmethods::VirtualMethods; use dom::virtualmethods::VirtualMethods;
use dom::window::Window; use dom::window::Window;
use fnv::FnvHasher; use fnv::FnvHasher;
use heapsize::HeapSizeOf;
use js::jsapi::{CompileFunction, JS_GetFunctionObject, RootedValue}; use js::jsapi::{CompileFunction, JS_GetFunctionObject, RootedValue};
use js::jsapi::{HandleObject, JSContext, RootedFunction}; use js::jsapi::{HandleObject, JSContext, RootedFunction};
use js::jsapi::{JSAutoCompartment, JSAutoRequest}; use js::jsapi::{JSAutoCompartment, JSAutoRequest};
@ -35,7 +36,6 @@ use std::rc::Rc;
use std::{intrinsics, ptr}; use std::{intrinsics, ptr};
use string_cache::Atom; use string_cache::Atom;
use url::Url; use url::Url;
use util::mem::HeapSizeOf;
use util::str::DOMString; use util::str::DOMString;
#[derive(PartialEq, Clone, JSTraceable)] #[derive(PartialEq, Clone, JSTraceable)]

View file

@ -9,7 +9,6 @@ use core::nonzero::NonZero;
use devtools_traits::NodeInfo; use devtools_traits::NodeInfo;
use document_loader::DocumentLoader; use document_loader::DocumentLoader;
use dom::attr::Attr; use dom::attr::Attr;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
use dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods; use dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods; use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
@ -47,6 +46,7 @@ use dom::text::Text;
use dom::virtualmethods::{VirtualMethods, vtable_for}; use dom::virtualmethods::{VirtualMethods, vtable_for};
use dom::window::Window; use dom::window::Window;
use euclid::rect::Rect; use euclid::rect::Rect;
use heapsize::{HeapSizeOf, heap_size_of};
use js::jsapi::{JSContext, JSObject, JSRuntime}; use js::jsapi::{JSContext, JSObject, JSRuntime};
use layout_interface::{LayoutChan, Msg}; use layout_interface::{LayoutChan, Msg};
use libc::{self, c_void, uintptr_t}; use libc::{self, c_void, uintptr_t};
@ -57,7 +57,7 @@ use selectors::matching::matches;
use selectors::parser::Selector; use selectors::parser::Selector;
use selectors::parser::parse_author_origin_selector_list_from_str; use selectors::parser::parse_author_origin_selector_list_from_str;
use std::borrow::ToOwned; use std::borrow::ToOwned;
use std::cell::Cell; use std::cell::{Cell, UnsafeCell};
use std::cmp::max; use std::cmp::max;
use std::default::Default; use std::default::Default;
use std::iter::{self, FilterMap, Peekable}; use std::iter::{self, FilterMap, Peekable};
@ -120,7 +120,7 @@ pub struct Node {
/// node is finalized. /// node is finalized.
style_and_layout_data: Cell<Option<OpaqueStyleAndLayoutData>>, style_and_layout_data: Cell<Option<OpaqueStyleAndLayoutData>>,
unique_id: DOMRefCell<Option<Box<Uuid>>>, unique_id: UniqueId,
} }
bitflags! { bitflags! {
@ -755,11 +755,7 @@ impl Node {
} }
pub fn get_unique_id(&self) -> String { pub fn get_unique_id(&self) -> String {
if self.unique_id.borrow().is_none() { self.unique_id.borrow().to_simple_string()
let mut unique_id = self.unique_id.borrow_mut();
*unique_id = Some(Box::new(Uuid::new_v4()));
}
self.unique_id.borrow().as_ref().unwrap().to_simple_string()
} }
pub fn summarize(&self) -> NodeInfo { pub fn summarize(&self) -> NodeInfo {
@ -1266,7 +1262,7 @@ impl Node {
style_and_layout_data: Cell::new(None), style_and_layout_data: Cell::new(None),
unique_id: DOMRefCell::new(None), unique_id: UniqueId::new(),
} }
} }
@ -2438,3 +2434,40 @@ impl<'a> UnbindContext<'a> {
index index
} }
} }
/// A node's unique ID, for devtools.
struct UniqueId {
cell: UnsafeCell<Option<Box<Uuid>>>,
}
no_jsmanaged_fields!(UniqueId);
impl HeapSizeOf for UniqueId {
#[allow(unsafe_code)]
fn heap_size_of_children(&self) -> usize {
if let &Some(ref uuid) = unsafe { &*self.cell.get() } {
heap_size_of(&** uuid as *const Uuid as *const c_void)
} else {
0
}
}
}
impl UniqueId {
/// Create a new `UniqueId` value. The underlying `Uuid` is lazily created.
fn new() -> UniqueId {
UniqueId { cell: UnsafeCell::new(None) }
}
/// The Uuid of that unique ID.
#[allow(unsafe_code)]
fn borrow(&self) -> &Uuid {
unsafe {
let ptr = self.cell.get();
if (*ptr).is_none() {
*ptr = Some(box Uuid::new_v4());
}
&(&*ptr).as_ref().unwrap()
}
}
}

View file

@ -23,10 +23,10 @@ use dom::document::Document;
use dom::documentfragment::DocumentFragment; use dom::documentfragment::DocumentFragment;
use dom::node::{Node, UnbindContext}; use dom::node::{Node, UnbindContext};
use dom::text::Text; use dom::text::Text;
use heapsize::HeapSizeOf;
use js::jsapi::JSTracer; use js::jsapi::JSTracer;
use std::cell::{Cell, UnsafeCell}; use std::cell::{Cell, UnsafeCell};
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd}; use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
use util::mem::HeapSizeOf;
use util::str::DOMString; use util::str::DOMString;
#[dom_struct] #[dom_struct]

View file

@ -62,7 +62,6 @@ use string_cache::Atom;
use time; use time;
use timers::{ScheduledCallback, TimerHandle}; use timers::{ScheduledCallback, TimerHandle};
use url::Url; use url::Url;
use util::mem::HeapSizeOf;
use util::str::DOMString; use util::str::DOMString;
pub type SendParam = BlobOrStringOrURLSearchParams; pub type SendParam = BlobOrStringOrURLSearchParams;
@ -127,11 +126,13 @@ pub struct XMLHttpRequest {
response_xml: MutNullableHeap<JS<Document>>, response_xml: MutNullableHeap<JS<Document>>,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
response_headers: DOMRefCell<Headers>, response_headers: DOMRefCell<Headers>,
#[ignore_heap_size_of = "Defined in hyper"]
override_mime_type: DOMRefCell<Option<Mime>>, override_mime_type: DOMRefCell<Option<Mime>>,
#[ignore_heap_size_of = "Defined in rust-encoding"] #[ignore_heap_size_of = "Defined in rust-encoding"]
override_charset: DOMRefCell<Option<EncodingRef>>, override_charset: DOMRefCell<Option<EncodingRef>>,
// Associated concepts // Associated concepts
#[ignore_heap_size_of = "Defined in hyper"]
request_method: DOMRefCell<Method>, request_method: DOMRefCell<Method>,
request_url: DOMRefCell<Option<Url>>, request_url: DOMRefCell<Option<Url>>,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]

View file

@ -26,6 +26,7 @@
#![doc = "The script crate contains all matters DOM."] #![doc = "The script crate contains all matters DOM."]
#![plugin(heapsize_plugin)]
#![plugin(plugins)] #![plugin(plugins)]
extern crate angle; extern crate angle;
@ -42,6 +43,7 @@ extern crate encoding;
extern crate euclid; extern crate euclid;
extern crate fnv; extern crate fnv;
extern crate gfx_traits; extern crate gfx_traits;
extern crate heapsize;
extern crate html5ever; extern crate html5ever;
extern crate hyper; extern crate hyper;
extern crate image; extern crate image;

View file

@ -6,8 +6,8 @@
use dom::bindings::conversions::get_dom_class; use dom::bindings::conversions::get_dom_class;
use dom::bindings::reflector::Reflectable; use dom::bindings::reflector::Reflectable;
use heapsize::{HeapSizeOf, heap_size_of};
use libc::c_void; use libc::c_void;
use util::mem::{HeapSizeOf, heap_size_of};
// This is equivalent to measuring a Box<T>, except that DOM objects lose their // This is equivalent to measuring a Box<T>, except that DOM objects lose their
// associated box in order to stash their pointers in a reserved slot of their // associated box in order to stash their pointers in a reserved slot of their

View file

@ -12,7 +12,6 @@ use std::borrow::ToOwned;
use std::cmp::{max, min}; use std::cmp::{max, min};
use std::default::Default; use std::default::Default;
use std::usize; use std::usize;
use util::mem::HeapSizeOf;
use util::str::DOMString; use util::str::DOMString;
#[derive(Copy, Clone, PartialEq)] #[derive(Copy, Clone, PartialEq)]

View file

@ -9,6 +9,7 @@ use dom::bindings::reflector::Reflectable;
use dom::bindings::trace::JSTraceable; use dom::bindings::trace::JSTraceable;
use dom::window::ScriptHelpers; use dom::window::ScriptHelpers;
use euclid::length::Length; use euclid::length::Length;
use heapsize::HeapSizeOf;
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use js::jsapi::{HandleValue, Heap, RootedValue}; use js::jsapi::{HandleValue, Heap, RootedValue};
use js::jsval::{JSVal, UndefinedValue}; use js::jsval::{JSVal, UndefinedValue};
@ -19,7 +20,6 @@ use std::cell::Cell;
use std::cmp::{self, Ord, Ordering}; use std::cmp::{self, Ord, Ordering};
use std::default::Default; use std::default::Default;
use std::rc::Rc; use std::rc::Rc;
use util::mem::HeapSizeOf;
use util::str::DOMString; use util::str::DOMString;
#[derive(JSTraceable, PartialEq, Eq, Copy, Clone, HeapSizeOf, Hash, PartialOrd, Ord, Debug)] #[derive(JSTraceable, PartialEq, Eq, Copy, Clone, HeapSizeOf, Hash, PartialOrd, Ord, Debug)]

View file

@ -42,9 +42,11 @@ git = "https://github.com/servo/ipc-channel"
[dependencies] [dependencies]
app_units = {version = "0.2", features = ["plugins"]} app_units = {version = "0.2", features = ["plugins"]}
libc = "0.2"
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
libc = "0.2"
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
time = "0.1.12" time = "0.1.12"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}

View file

@ -7,7 +7,7 @@
//! to depend on script. //! to depend on script.
#![feature(custom_derive, plugin)] #![feature(custom_derive, plugin)]
#![plugin(plugins, serde_macros)] #![plugin(heapsize_plugin, plugins, serde_macros)]
#![deny(missing_docs)] #![deny(missing_docs)]
extern crate app_units; extern crate app_units;
@ -15,6 +15,7 @@ extern crate canvas_traits;
extern crate devtools_traits; extern crate devtools_traits;
extern crate euclid; extern crate euclid;
extern crate gfx_traits; extern crate gfx_traits;
extern crate heapsize;
extern crate ipc_channel; extern crate ipc_channel;
extern crate libc; extern crate libc;
extern crate msg; extern crate msg;
@ -50,7 +51,6 @@ use profile_traits::mem;
use std::any::Any; use std::any::Any;
use url::Url; use url::Url;
use util::ipc::OptionalOpaqueIpcSender; use util::ipc::OptionalOpaqueIpcSender;
use util::mem::HeapSizeOf;
pub use script_msg::{LayoutMsg, ScriptMsg}; pub use script_msg::{LayoutMsg, ScriptMsg};

View file

@ -80,7 +80,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -102,7 +102,7 @@ dependencies = [
"core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -167,9 +167,11 @@ name = "canvas_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"azure 0.4.0 (git+https://github.com/servo/rust-azure)", "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
@ -347,10 +349,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "cssparser" name = "cssparser"
version = "0.5.0" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -391,6 +395,8 @@ name = "devtools_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
@ -540,7 +546,7 @@ name = "euclid"
version = "0.6.1" version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
@ -647,6 +653,8 @@ dependencies = [
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"harfbuzz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "harfbuzz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
@ -665,7 +673,7 @@ dependencies = [
"servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)", "servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)",
"simd 0.1.0 (git+https://github.com/huonw/simd)", "simd 0.1.0 (git+https://github.com/huonw/simd)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -688,6 +696,8 @@ version = "0.0.1"
dependencies = [ dependencies = [
"azure 0.4.0 (git+https://github.com/servo/rust-azure)", "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
@ -797,7 +807,7 @@ dependencies = [
[[package]] [[package]]
name = "heapsize" name = "heapsize"
version = "0.2.2" version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -818,15 +828,17 @@ dependencies = [
[[package]] [[package]]
name = "html5ever" name = "html5ever"
version = "0.4.0" version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -918,7 +930,7 @@ name = "js"
version = "0.1.1" version = "0.1.1"
source = "git+https://github.com/servo/rust-mozjs#b96675b217534c7742cbfda8150ea0536aedbdfb" source = "git+https://github.com/servo/rust-mozjs#b96675b217534c7742cbfda8150ea0536aedbdfb"
dependencies = [ dependencies = [
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)", "mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
@ -956,7 +968,7 @@ dependencies = [
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"io-surface 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "io-surface 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -976,11 +988,13 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1", "canvas 0.0.1",
"canvas_traits 0.0.1", "canvas_traits 0.0.1",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1", "gfx 0.0.1",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layout_traits 0.0.1", "layout_traits 0.0.1",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -997,7 +1011,7 @@ dependencies = [
"serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1167,8 +1181,10 @@ name = "msg"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
@ -1239,6 +1255,8 @@ dependencies = [
name = "net_traits" name = "net_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
@ -1549,13 +1567,15 @@ dependencies = [
"canvas 0.0.1", "canvas 0.0.1",
"canvas_traits 0.0.1", "canvas_traits 0.0.1",
"caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"html5ever 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
@ -1575,7 +1595,7 @@ dependencies = [
"selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1604,6 +1624,8 @@ dependencies = [
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1", "msg 0.0.1",
@ -1625,12 +1647,14 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quickersort 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1798,10 +1822,12 @@ dependencies = [
[[package]] [[package]]
name = "string_cache" name = "string_cache"
version = "0.2.5" version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_generator 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_generator 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1814,10 +1840,12 @@ version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1828,7 +1856,7 @@ dependencies = [
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1840,12 +1868,12 @@ name = "style_tests"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
"selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"style_traits 0.0.1", "style_traits 0.0.1",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1856,8 +1884,10 @@ dependencies = [
name = "style_traits" name = "style_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1972,6 +2002,8 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2004,10 +2036,12 @@ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.0 (git+https://github.com/servo/rust-azure)", "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"js 0.1.1 (git+https://github.com/servo/rust-mozjs)", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)",
@ -2025,7 +2059,7 @@ dependencies = [
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -2209,7 +2243,7 @@ dependencies = [
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
] ]

View file

@ -163,8 +163,8 @@ version = "0.2"
git = "https://github.com/ecoal95/rust-offscreen-rendering-context" git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
[dependencies] [dependencies]
env_logger = "0.3"
bitflags = "0.3" bitflags = "0.3"
libc = "0.2" env_logger = "0.3"
url = {version = "0.5.4", features = ["serde_serialization", "query_encoding"]}
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
libc = "0.2"
url = {version = "0.5.4", features = ["heap_size", "serde_serialization", "query_encoding"]}

View file

@ -20,21 +20,23 @@ path = "../style_traits"
[dependencies] [dependencies]
app_units = {version = "0.2", features = ["plugins"]} app_units = {version = "0.2", features = ["plugins"]}
cssparser = { version = "0.5", features = [ "serde-serialization" ] } cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
log = "0.3" log = "0.3"
encoding = "0.2" encoding = "0.2"
fnv = "1.0" fnv = "1.0"
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
rustc-serialize = "0.3" rustc-serialize = "0.3"
matches = "0.1" matches = "0.1"
bitflags = "0.3" bitflags = "0.3"
num = "0.1.24" num = "0.1.24"
lazy_static = "0.1.10" lazy_static = "0.1.10"
selectors = { version = "0.4.1", features = ["unstable"] } selectors = {version = "0.4.1", features = ["heap_size", "unstable"]}
smallvec = "0.1" smallvec = "0.1"
string_cache = "0.2" string_cache = {version = "0.2.7", features = ["heap_size"]}
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
time = "0.1" time = "0.1"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}

View file

@ -10,7 +10,6 @@ use std::collections::{HashMap, HashSet};
use std::fmt; use std::fmt;
use std::sync::Arc; use std::sync::Arc;
use string_cache::Atom; use string_cache::Atom;
use util::mem::HeapSizeOf;
// Does not include the `--` prefix // Does not include the `--` prefix
pub type Name = Atom; pub type Name = Atom;

View file

@ -8,7 +8,6 @@ use parser::{ParserContext, log_css_error};
use properties::longhands::font_family::parse_one_family; use properties::longhands::font_family::parse_one_family;
use std::ascii::AsciiExt; use std::ascii::AsciiExt;
use url::Url; use url::Url;
use util::mem::HeapSizeOf;
#[derive(Clone, Debug, HeapSizeOf, PartialEq, Eq, Deserialize, Serialize)] #[derive(Clone, Debug, HeapSizeOf, PartialEq, Eq, Deserialize, Serialize)]
pub enum Source { pub enum Source {

View file

@ -11,9 +11,9 @@
#![feature(custom_derive)] #![feature(custom_derive)]
#![feature(plugin)] #![feature(plugin)]
#![plugin(serde_macros)] #![plugin(heapsize_plugin)]
#![plugin(serde_macros)]
#![plugin(plugins)] #![plugin(plugins)]
#![plugin(serde_macros)]
#![recursion_limit = "500"] // For match_ignore_ascii_case in PropertyDeclaration::parse #![recursion_limit = "500"] // For match_ignore_ascii_case in PropertyDeclaration::parse
@ -26,6 +26,7 @@ extern crate cssparser;
extern crate encoding; extern crate encoding;
extern crate euclid; extern crate euclid;
extern crate fnv; extern crate fnv;
extern crate heapsize;
#[macro_use] #[macro_use]
extern crate lazy_static; extern crate lazy_static;
#[macro_use] #[macro_use]

View file

@ -8,7 +8,6 @@ use euclid::size::{Size2D, TypedSize2D};
use properties::longhands; use properties::longhands;
use std::ascii::AsciiExt; use std::ascii::AsciiExt;
use util::geometry::ViewportPx; use util::geometry::ViewportPx;
use util::mem::HeapSizeOf;
use values::specified; use values::specified;

View file

@ -19,7 +19,6 @@ use std::iter::Iterator;
use std::slice; use std::slice;
use string_cache::{Atom, Namespace}; use string_cache::{Atom, Namespace};
use url::Url; use url::Url;
use util::mem::HeapSizeOf;
use viewport::ViewportRule; use viewport::ViewportRule;

View file

@ -18,7 +18,6 @@ use std::str::Chars;
use style_traits::viewport::{Orientation, UserZoom, ViewportConstraints, Zoom}; use style_traits::viewport::{Orientation, UserZoom, ViewportConstraints, Zoom};
use stylesheets::Origin; use stylesheets::Origin;
use util::geometry::ViewportPx; use util::geometry::ViewportPx;
use util::mem::HeapSizeOf;
use values::computed::{Context, ToComputedValue}; use values::computed::{Context, ToComputedValue};
use values::specified::{Length, LengthOrPercentageOrAuto, ViewportPercentageLength}; use values::specified::{Length, LengthOrPercentageOrAuto, ViewportPercentageLength};

View file

@ -14,14 +14,15 @@ path = "../util"
path = "../plugins" path = "../plugins"
[dependencies] [dependencies]
cssparser = { version = "0.5", features = [ "serde-serialization" ] } cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
log = "0.3" heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
lazy_static = "0.1.10" lazy_static = "0.1.10"
log = "0.3"
num = "0.1.24" num = "0.1.24"
rustc-serialize = "0.3" rustc-serialize = "0.3"
selectors = "0.4.1" selectors = {version = "0.4.1", features = ["heap_size"]}
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}

View file

@ -10,6 +10,7 @@
#![crate_type = "rlib"] #![crate_type = "rlib"]
#![feature(custom_derive)] #![feature(custom_derive)]
#![feature(plugin)] #![feature(plugin)]
#![plugin(heapsize_plugin)]
#![plugin(serde_macros)] #![plugin(serde_macros)]
#![plugin(plugins)] #![plugin(plugins)]
#![deny(unsafe_code)] #![deny(unsafe_code)]
@ -17,6 +18,7 @@
#[macro_use] #[macro_use]
extern crate cssparser; extern crate cssparser;
extern crate euclid; extern crate euclid;
extern crate heapsize;
extern crate rustc_serialize; extern crate rustc_serialize;
extern crate serde; extern crate serde;
extern crate util; extern crate util;

View file

@ -46,25 +46,27 @@ git = "https://github.com/servo/ipc-channel"
[dependencies] [dependencies]
app_units = {version = "0.2", features = ["plugins"]} app_units = {version = "0.2", features = ["plugins"]}
cssparser = { version = "0.5", features = [ "serde-serialization" ] }
log = "0.3"
bitflags = "0.3" bitflags = "0.3"
html5ever = { version = "0.4", features = ["unstable"], optional = true } cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
euclid = {version = "0.6.1", features = ["unstable", "plugins"]}
getopts = "0.2.11"
html5ever = {version = "0.4.2", features = ["heap_size", "unstable"], optional = true}
heapsize = "0.2.5"
heapsize_plugin = "0.1.2"
hyper = { version = "0.7", optional = true }
lazy_static = "0.1"
libc = "0.2" libc = "0.2"
log = "0.3"
num = "0.1.24"
num_cpus = "0.2.2"
rand = "0.3" rand = "0.3"
rustc-serialize = "0.3" rustc-serialize = "0.3"
smallvec = "0.1" selectors = {version = "0.4.1", features = ["heap_size"]}
num_cpus = "0.2.2"
num = "0.1.24"
euclid = {version = "0.6.1", features = ["unstable", "plugins"]}
selectors = "0.4.1"
serde = "0.6" serde = "0.6"
serde_macros = "0.6" serde_macros = "0.6"
string_cache = "0.2" smallvec = "0.1"
lazy_static = "0.1" string_cache = {version = "0.2.7", features = ["heap_size"]}
getopts = "0.2.11" url = {version = "0.5.4", features = ["heap_size", "serde_serialization"]}
hyper = { version = "0.7", optional = true }
url = {version = "0.5.4", features = ["serde_serialization"]}
uuid = "0.1.17" uuid = "0.1.17"
[target.x86_64-pc-windows-gnu.dependencies] [target.x86_64-pc-windows-gnu.dependencies]

View file

@ -9,7 +9,7 @@ use std::ascii::AsciiExt;
macro_rules! define_cursor { macro_rules! define_cursor {
($( $css: expr => $variant: ident = $value: expr, )+) => { ($( $css: expr => $variant: ident = $value: expr, )+) => {
#[derive(Clone, Copy, PartialEq, Eq, Debug, Deserialize, Serialize)] #[derive(Clone, Copy, Debug, Deserialize, Eq, HeapSizeOf, PartialEq, Serialize)]
#[repr(u8)] #[repr(u8)]
pub enum Cursor { pub enum Cursor {
$( $variant = $value ),+ $( $variant = $value ),+

View file

@ -23,7 +23,7 @@ use std::i32;
/// ///
/// The ratio between ScreenPx and DevicePixel for a given display be found by calling /// The ratio between ScreenPx and DevicePixel for a given display be found by calling
/// `servo::windowing::WindowMethods::hidpi_factor`. /// `servo::windowing::WindowMethods::hidpi_factor`.
#[derive(Debug, Copy, Clone)] #[derive(Clone, Copy, Debug, HeapSizeOf)]
pub enum ScreenPx {} pub enum ScreenPx {}
/// One CSS "px" in the coordinate system of the "initial viewport": /// One CSS "px" in the coordinate system of the "initial viewport":
@ -35,7 +35,7 @@ pub enum ScreenPx {}
/// ///
/// At the default zoom level of 100%, one PagePx is equal to one ScreenPx. However, if the /// At the default zoom level of 100%, one PagePx is equal to one ScreenPx. However, if the
/// document is zoomed in or out then this scale may be larger or smaller. /// document is zoomed in or out then this scale may be larger or smaller.
#[derive(RustcEncodable, Debug, Copy, Clone)] #[derive(Clone, Copy, Debug, HeapSizeOf)]
pub enum ViewportPx {} pub enum ViewportPx {}
/// One CSS "px" in the root coordinate system for the content document. /// One CSS "px" in the root coordinate system for the content document.
@ -44,7 +44,7 @@ pub enum ViewportPx {}
/// This is the mobile-style "pinch zoom" that enlarges content without reflowing it. When the /// This is the mobile-style "pinch zoom" that enlarges content without reflowing it. When the
/// viewport zoom is not equal to 1.0, then the layout viewport is no longer the same physical size /// viewport zoom is not equal to 1.0, then the layout viewport is no longer the same physical size
/// as the viewable area. /// as the viewable area.
#[derive(RustcEncodable, Debug, Copy, Clone)] #[derive(Clone, Copy, Debug, HeapSizeOf)]
pub enum PagePx {} pub enum PagePx {}
// In summary, the hierarchy of pixel units and the factors to convert from one to the next: // In summary, the hierarchy of pixel units and the factors to convert from one to the next:

View file

@ -18,7 +18,7 @@
#![feature(step_trait)] #![feature(step_trait)]
#![feature(zero_one)] #![feature(zero_one)]
#![plugin(plugins, serde_macros)] #![plugin(heapsize_plugin, plugins, serde_macros)]
extern crate alloc; extern crate alloc;
extern crate app_units; extern crate app_units;
@ -30,6 +30,7 @@ extern crate bitflags;
extern crate cssparser; extern crate cssparser;
extern crate euclid; extern crate euclid;
extern crate getopts; extern crate getopts;
extern crate heapsize;
#[cfg(feature = "non-geckolib")] #[cfg(feature = "non-geckolib")]
extern crate html5ever; extern crate html5ever;
#[cfg(feature = "non-geckolib")] #[cfg(feature = "non-geckolib")]
@ -66,7 +67,6 @@ pub mod geometry;
pub mod ipc; pub mod ipc;
pub mod linked_list; pub mod linked_list;
pub mod logical_geometry; pub mod logical_geometry;
#[macro_use] pub mod mem;
#[cfg(feature = "non-geckolib")] #[cfg(feature = "non-geckolib")]
pub mod non_geckolib; pub mod non_geckolib;
pub mod opts; pub mod opts;

View file

@ -11,7 +11,7 @@ use std::fmt::{self, Debug, Error, Formatter};
use std::ops::{Add, Sub}; use std::ops::{Add, Sub};
bitflags!( bitflags!(
#[derive(RustcEncodable)] #[derive(HeapSizeOf, RustcEncodable)]
flags WritingMode: u8 { flags WritingMode: u8 {
const FLAG_RTL = 1 << 0, const FLAG_RTL = 1 << 0,
const FLAG_VERTICAL = 1 << 1, const FLAG_VERTICAL = 1 << 1,

View file

@ -1,360 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
//! Data structure measurement.
use app_units::Au;
use cssparser::Color as CSSParserColor;
use cssparser::{RGBA, TokenSerializationType};
use cursor::Cursor;
use euclid::length::Length;
use euclid::scale_factor::ScaleFactor;
use euclid::{Matrix2D, Matrix4, Point2D, Rect, SideOffsets2D, Size2D};
use geometry::{PagePx, ViewportPx};
use libc::{c_void, size_t};
use logical_geometry::WritingMode;
use rand::OsRng;
use range::Range;
use selectors::parser::{Combinator, CompoundSelector, Selector, SimpleSelector, SelectorImpl};
use std::cell::{Cell, RefCell};
use std::collections::{HashMap, LinkedList};
use std::hash::{BuildHasher, Hash};
use std::mem::{size_of, transmute};
use std::rc::Rc;
use std::result::Result;
use std::sync::Arc;
use std::sync::atomic::{AtomicIsize, AtomicUsize};
use str::{DOMString, LengthOrPercentageOrAuto};
use string_cache::atom::Atom;
use string_cache::namespace::{QualName, Namespace};
use url;
use uuid::Uuid;
extern {
// Get the size of a heap block.
//
// Ideally Rust would expose a function like this in std::rt::heap, which would avoid the
// jemalloc dependence.
//
// The C prototype is `je_malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void *ptr)`. On some
// platforms `JEMALLOC_USABLE_SIZE_CONST` is `const` and on some it is empty. But in practice
// this function doesn't modify the contents of the block that `ptr` points to, so we use
// `*const c_void` here.
fn je_malloc_usable_size(ptr: *const c_void) -> size_t;
}
// A wrapper for je_malloc_usable_size that handles `EMPTY` and returns `usize`.
pub fn heap_size_of(ptr: *const c_void) -> usize {
if ptr == ::alloc::heap::EMPTY as *const c_void {
0
} else {
unsafe { je_malloc_usable_size(ptr) as usize }
}
}
// The simplest trait for measuring the size of heap data structures. More complex traits that
// return multiple measurements -- e.g. measure text separately from images -- are also possible,
// and should be used when appropriate.
//
pub trait HeapSizeOf {
/// Measure the size of any heap-allocated structures that hang off this value, but not the
/// space taken up by the value itself (i.e. what size_of::<T> measures, more or less); that
/// space is handled by the implementation of HeapSizeOf for Box<T> below.
fn heap_size_of_children(&self) -> usize;
}
// There are two possible ways to measure the size of `self` when it's on the heap: compute it
// (with `::std::rt::heap::usable_size(::std::mem::size_of::<T>(), 0)`) or measure it directly
// using the heap allocator (with `heap_size_of`). We do the latter, for the following reasons.
//
// * The heap allocator is the true authority for the sizes of heap blocks; its measurement is
// guaranteed to be correct. In comparison, size computations are error-prone. (For example, the
// `rt::heap::usable_size` function used in some of Rust's non-default allocator implementations
// underestimate the true usable size of heap blocks, which is safe in general but would cause
// under-measurement here.)
//
// * If we measure something that isn't a heap block, we'll get a crash. This keeps us honest,
// which is important because unsafe code is involved and this can be gotten wrong.
//
// However, in the best case, the two approaches should give the same results.
//
impl<T: HeapSizeOf> HeapSizeOf for Box<T> {
fn heap_size_of_children(&self) -> usize {
// Measure size of `self`.
heap_size_of(&**self as *const T as *const c_void) + (**self).heap_size_of_children()
}
}
impl HeapSizeOf for String {
fn heap_size_of_children(&self) -> usize {
heap_size_of(self.as_ptr() as *const c_void)
}
}
impl HeapSizeOf for DOMString {
fn heap_size_of_children(&self) -> usize {
heap_size_of(self.as_ptr() as *const c_void)
}
}
impl<T: HeapSizeOf> HeapSizeOf for Option<T> {
fn heap_size_of_children(&self) -> usize {
match *self {
None => 0,
Some(ref x) => x.heap_size_of_children()
}
}
}
impl HeapSizeOf for url::Url {
fn heap_size_of_children(&self) -> usize {
// Using a struct pattern without `..` rather than `foo.bar` field access
// makes sure this will be updated if a field is added.
let &url::Url { ref scheme, ref scheme_data, ref query, ref fragment } = self;
scheme.heap_size_of_children() +
scheme_data.heap_size_of_children() +
query.heap_size_of_children() +
fragment.heap_size_of_children()
}
}
impl HeapSizeOf for url::SchemeData {
fn heap_size_of_children(&self) -> usize {
match *self {
url::SchemeData::Relative(ref data) => data.heap_size_of_children(),
url::SchemeData::NonRelative(ref str) => str.heap_size_of_children()
}
}
}
impl HeapSizeOf for url::RelativeSchemeData {
fn heap_size_of_children(&self) -> usize {
// Using a struct pattern without `..` rather than `foo.bar` field access
// makes sure this will be updated if a field is added.
let &url::RelativeSchemeData { ref username, ref password, ref host,
ref port, ref default_port, ref path } = self;
username.heap_size_of_children() +
password.heap_size_of_children() +
host.heap_size_of_children() +
port.heap_size_of_children() +
default_port.heap_size_of_children() +
path.heap_size_of_children()
}
}
impl HeapSizeOf for url::Host {
fn heap_size_of_children(&self) -> usize {
match *self {
url::Host::Domain(ref str) => str.heap_size_of_children(),
url::Host::Ipv6(_) => 0,
url::Host::Ipv4(_) => 0,
}
}
}
impl<T: HeapSizeOf, U: HeapSizeOf> HeapSizeOf for (T, U) {
fn heap_size_of_children(&self) -> usize {
self.0.heap_size_of_children() + self.1.heap_size_of_children()
}
}
impl<T: HeapSizeOf> HeapSizeOf for Arc<T> {
fn heap_size_of_children(&self) -> usize {
(**self).heap_size_of_children()
}
}
impl<T: HeapSizeOf> HeapSizeOf for RefCell<T> {
fn heap_size_of_children(&self) -> usize {
self.borrow().heap_size_of_children()
}
}
impl<T: HeapSizeOf + Copy> HeapSizeOf for Cell<T> {
fn heap_size_of_children(&self) -> usize {
self.get().heap_size_of_children()
}
}
impl<T: HeapSizeOf> HeapSizeOf for Vec<T> {
fn heap_size_of_children(&self) -> usize {
heap_size_of(self.as_ptr() as *const c_void) +
self.iter().fold(0, |n, elem| n + elem.heap_size_of_children())
}
}
impl<T> HeapSizeOf for Vec<Rc<T>> {
fn heap_size_of_children(&self) -> usize {
// The fate of measuring Rc<T> is still undecided, but we still want to measure
// the space used for storing them.
heap_size_of(self.as_ptr() as *const c_void)
}
}
impl<K: HeapSizeOf, V: HeapSizeOf, S> HeapSizeOf for HashMap<K, V, S>
where K: Eq + Hash, S: BuildHasher {
fn heap_size_of_children(&self) -> usize {
//TODO(#6908) measure actual bucket memory usage instead of approximating
let size = self.capacity() * (size_of::<V>() + size_of::<K>());
self.iter().fold(size, |n, (key, value)| {
n + key.heap_size_of_children() + value.heap_size_of_children()
})
}
}
// FIXME(njn): We can't implement HeapSizeOf accurately for LinkedList because it requires access
// to the private Node type. Eventually we'll want to add HeapSizeOf (or equivalent) to Rust
// itself. In the meantime, we use the dirty hack of transmuting LinkedList into an identical type
// (LinkedList2) and measuring that.
impl<T: HeapSizeOf> HeapSizeOf for LinkedList<T> {
fn heap_size_of_children(&self) -> usize {
let list2: &LinkedList2<T> = unsafe { transmute(self) };
list2.heap_size_of_children()
}
}
struct LinkedList2<T> {
_length: usize,
list_head: Link<T>,
_list_tail: Rawlink<Node<T>>,
}
type Link<T> = Option<Box<Node<T>>>;
struct Rawlink<T> {
_p: *mut T,
}
struct Node<T> {
next: Link<T>,
_prev: Rawlink<Node<T>>,
value: T,
}
impl<T: HeapSizeOf> HeapSizeOf for Node<T> {
// Unlike most heap_size_of_children() functions, this one does *not* measure descendents.
// Instead, LinkedList2<T>::heap_size_of_children() handles that, so that it can use iteration
// instead of recursion, which avoids potentially blowing the stack.
fn heap_size_of_children(&self) -> usize {
self.value.heap_size_of_children()
}
}
impl<T: HeapSizeOf> HeapSizeOf for LinkedList2<T> {
fn heap_size_of_children(&self) -> usize {
let mut size = 0;
let mut curr: &Link<T> = &self.list_head;
while curr.is_some() {
size += (*curr).heap_size_of_children();
curr = &curr.as_ref().unwrap().next;
}
size
}
}
// This is a basic sanity check. If the representation of LinkedList changes such that it becomes a
// different size to LinkedList2, this will fail at compile-time.
#[allow(dead_code)]
unsafe fn linked_list2_check() {
transmute::<LinkedList<i32>, LinkedList2<i32>>(panic!());
}
// Currently, types that implement the Drop type are larger than those that don't. Because
// LinkedList implements Drop, LinkedList2 must also so that linked_list2_check() doesn't fail.
impl<T> Drop for LinkedList2<T> {
fn drop(&mut self) {}
}
/// For use on types defined in external crates
/// with known heap sizes.
#[macro_export]
macro_rules! known_heap_size(
($size:expr, $($ty:ident),+) => (
$(
impl $crate::mem::HeapSizeOf for $ty {
#[inline(always)]
fn heap_size_of_children(&self) -> usize {
$size
}
}
)+
);
($size: expr, $($ty:ident<$($gen:ident),+>),+) => (
$(
impl<$($gen: $crate::mem::HeapSizeOf),+> $crate::mem::HeapSizeOf for $ty<$($gen),+> {
#[inline(always)]
fn heap_size_of_children(&self) -> usize {
$size
}
}
)+
);
);
impl<T: HeapSizeOf, U: HeapSizeOf> HeapSizeOf for Result<T, U> {
fn heap_size_of_children(&self) -> usize {
match *self {
Result::Ok(ref ok) => ok.heap_size_of_children(),
Result::Err(ref err) => err.heap_size_of_children()
}
}
}
impl HeapSizeOf for () {
fn heap_size_of_children(&self) -> usize {
0
}
}
impl<T: SelectorImpl> HeapSizeOf for Selector<T>
where T::NonTSPseudoClass: HeapSizeOf,
T::PseudoElement: HeapSizeOf {
fn heap_size_of_children(&self) -> usize {
let &Selector { ref compound_selectors, ref pseudo_element, ref specificity } = self;
compound_selectors.heap_size_of_children() + pseudo_element.heap_size_of_children() +
specificity.heap_size_of_children()
}
}
impl<T: SelectorImpl> HeapSizeOf for CompoundSelector<T>
where T::NonTSPseudoClass: HeapSizeOf {
fn heap_size_of_children(&self) -> usize {
let &CompoundSelector { ref simple_selectors, ref next } = self;
simple_selectors.heap_size_of_children() + next.heap_size_of_children()
}
}
impl<T: SelectorImpl> HeapSizeOf for SimpleSelector<T>
where T::NonTSPseudoClass: HeapSizeOf {
fn heap_size_of_children(&self) -> usize {
match *self {
SimpleSelector::Negation(ref vec) => vec.heap_size_of_children(),
SimpleSelector::AttrIncludes(_, ref str) | SimpleSelector::AttrPrefixMatch(_, ref str) |
SimpleSelector::AttrSubstringMatch(_, ref str) | SimpleSelector::AttrSuffixMatch(_, ref str)
=> str.heap_size_of_children(),
SimpleSelector::AttrEqual(_, ref str, _) => str.heap_size_of_children(),
SimpleSelector::AttrDashMatch(_, ref first, ref second)
=> first.heap_size_of_children() + second.heap_size_of_children(),
SimpleSelector::NonTSPseudoClass(ref pseudo_class)
=> pseudo_class.heap_size_of_children(),
// All other types come down to Atom, enum or i32, all 0
_ => 0
}
}
}
known_heap_size!(0, u8, u16, u32, u64, usize);
known_heap_size!(0, i8, i16, i32, i64, isize);
known_heap_size!(0, bool, f32, f64);
known_heap_size!(0, AtomicIsize, AtomicUsize);
known_heap_size!(0, Rect<T>, Point2D<T>, Size2D<T>, Matrix2D<T>, SideOffsets2D<T>, Range<T>);
known_heap_size!(0, Length<T, U>, ScaleFactor<T, U, V>);
known_heap_size!(0, Au, WritingMode, CSSParserColor, RGBA, Cursor, Matrix4, QualName, Atom, Namespace);
known_heap_size!(0, PagePx, ViewportPx, OsRng);
known_heap_size!(0, TokenSerializationType, LengthOrPercentageOrAuto);
known_heap_size!(0, Combinator, str);
known_heap_size!(0, Uuid);

View file

@ -4,20 +4,10 @@
///! Miscellaneous Code which depends on large libraries that we don't ///! Miscellaneous Code which depends on large libraries that we don't
/// depend on in GeckoLib builds. /// depend on in GeckoLib builds.
use azure::azure_hl::Color;
use html5ever::tree_builder::QuirksMode;
use hyper::header::ContentType;
use hyper::http::RawStatus;
use hyper::method::Method;
use hyper::mime::{Attr, Mime, SubLevel, TopLevel, Value};
use js::conversions::{FromJSValConvertible, ToJSValConvertible, latin1_to_string}; use js::conversions::{FromJSValConvertible, ToJSValConvertible, latin1_to_string};
use js::jsapi::{JSContext, JSString, HandleValue, Heap, MutableHandleValue}; use js::jsapi::{JSContext, JSString, HandleValue, MutableHandleValue};
use js::jsapi::{JS_GetTwoByteStringCharsAndLength, JS_StringHasLatin1Chars}; use js::jsapi::{JS_GetTwoByteStringCharsAndLength, JS_StringHasLatin1Chars};
use js::jsval::JSVal; use js::rust::ToString;
use js::rust::{GCMethods, ToString};
use layers::geometry::DevicePixel;
use mem::HeapSizeOf;
use opts; use opts;
use std::char; use std::char;
use std::ptr; use std::ptr;
@ -99,73 +89,3 @@ pub unsafe fn jsstring_to_str(cx: *mut JSContext, s: *mut JSString) -> DOMString
s s
}) })
} }
// This is measured properly by the heap measurement implemented in SpiderMonkey.
impl<T: Copy + GCMethods<T>> HeapSizeOf for Heap<T> {
fn heap_size_of_children(&self) -> usize {
0
}
}
impl HeapSizeOf for ContentType {
fn heap_size_of_children(&self) -> usize {
let &ContentType(ref mime) = self;
mime.heap_size_of_children()
}
}
impl HeapSizeOf for Method {
fn heap_size_of_children(&self) -> usize {
match *self {
Method::Extension(ref str) => str.heap_size_of_children(),
_ => 0
}
}
}
impl HeapSizeOf for Mime {
fn heap_size_of_children(&self) -> usize {
let &Mime(ref top_level, ref sub_level, ref vec) = self;
top_level.heap_size_of_children() + sub_level.heap_size_of_children() +
vec.heap_size_of_children()
}
}
impl HeapSizeOf for TopLevel {
fn heap_size_of_children(&self) -> usize {
match *self {
TopLevel::Ext(ref str) => str.heap_size_of_children(),
_ => 0
}
}
}
impl HeapSizeOf for SubLevel {
fn heap_size_of_children(&self) -> usize {
match *self {
SubLevel::Ext(ref str) => str.heap_size_of_children(),
_ => 0
}
}
}
impl HeapSizeOf for Attr {
fn heap_size_of_children(&self) -> usize {
match *self {
Attr::Ext(ref str) => str.heap_size_of_children(),
_ => 0
}
}
}
impl HeapSizeOf for Value {
fn heap_size_of_children(&self) -> usize {
match *self {
Value::Ext(ref str) => str.heap_size_of_children(),
_ => 0
}
}
}
known_heap_size!(0, Color, DevicePixel, JSVal, QuirksMode, RawStatus);

View file

@ -136,7 +136,7 @@ macro_rules! int_range_index {
} }
/// A range of indices /// A range of indices
#[derive(Clone, RustcEncodable, Copy, Deserialize, Serialize)] #[derive(Clone, Copy, Deserialize, HeapSizeOf, RustcEncodable, Serialize)]
pub struct Range<I> { pub struct Range<I> {
begin: I, begin: I,
length: I, length: I,

View file

@ -16,7 +16,7 @@ use std::iter::{Filter, Peekable};
use std::ops::{Deref, DerefMut}; use std::ops::{Deref, DerefMut};
use std::str::{Bytes, CharIndices, FromStr, Split, from_utf8}; use std::str::{Bytes, CharIndices, FromStr, Split, from_utf8};
#[derive(Clone, PartialOrd, Ord, PartialEq, Eq, Deserialize, Serialize, Hash, Debug)] #[derive(Clone, Debug, Deserialize, Eq, Hash, HeapSizeOf, Ord, PartialEq, PartialOrd, Serialize)]
pub struct DOMString(String); pub struct DOMString(String);
impl !Send for DOMString {} impl !Send for DOMString {}
@ -220,7 +220,7 @@ pub fn parse_unsigned_integer<T: Iterator<Item=char>>(input: T) -> Option<u32> {
}) })
} }
#[derive(Copy, Clone, Debug, PartialEq)] #[derive(Clone, Copy, Debug, HeapSizeOf, PartialEq)]
pub enum LengthOrPercentageOrAuto { pub enum LengthOrPercentageOrAuto {
Auto, Auto,
Percentage(f32), Percentage(f32),

View file

@ -31,5 +31,5 @@ log = "0.3"
hyper = "0.7" hyper = "0.7"
rustc-serialize = "0.3.4" rustc-serialize = "0.3.4"
regex = "0.1.33" regex = "0.1.33"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
uuid = "0.1" uuid = "0.1"

88
ports/cef/Cargo.lock generated
View file

@ -68,7 +68,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -90,7 +90,7 @@ dependencies = [
"core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -155,9 +155,11 @@ name = "canvas_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"azure 0.4.0 (git+https://github.com/servo/rust-azure)", "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
@ -320,10 +322,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "cssparser" name = "cssparser"
version = "0.5.0" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -364,6 +368,8 @@ name = "devtools_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
@ -480,7 +486,7 @@ name = "euclid"
version = "0.6.1" version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
@ -587,6 +593,8 @@ dependencies = [
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"harfbuzz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "harfbuzz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
@ -605,7 +613,7 @@ dependencies = [
"servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)", "servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)",
"simd 0.1.0 (git+https://github.com/huonw/simd)", "simd 0.1.0 (git+https://github.com/huonw/simd)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -619,6 +627,8 @@ version = "0.0.1"
dependencies = [ dependencies = [
"azure 0.4.0 (git+https://github.com/servo/rust-azure)", "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
@ -728,7 +738,7 @@ dependencies = [
[[package]] [[package]]
name = "heapsize" name = "heapsize"
version = "0.2.2" version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -749,15 +759,17 @@ dependencies = [
[[package]] [[package]]
name = "html5ever" name = "html5ever"
version = "0.4.0" version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -849,7 +861,7 @@ name = "js"
version = "0.1.1" version = "0.1.1"
source = "git+https://github.com/servo/rust-mozjs#b96675b217534c7742cbfda8150ea0536aedbdfb" source = "git+https://github.com/servo/rust-mozjs#b96675b217534c7742cbfda8150ea0536aedbdfb"
dependencies = [ dependencies = [
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)", "mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
@ -887,7 +899,7 @@ dependencies = [
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"io-surface 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "io-surface 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -907,11 +919,13 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1", "canvas 0.0.1",
"canvas_traits 0.0.1", "canvas_traits 0.0.1",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1", "gfx 0.0.1",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layout_traits 0.0.1", "layout_traits 0.0.1",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -928,7 +942,7 @@ dependencies = [
"serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1098,8 +1112,10 @@ name = "msg"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
@ -1152,6 +1168,8 @@ dependencies = [
name = "net_traits" name = "net_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
@ -1437,13 +1455,15 @@ dependencies = [
"canvas 0.0.1", "canvas 0.0.1",
"canvas_traits 0.0.1", "canvas_traits 0.0.1",
"caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"html5ever 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
@ -1463,7 +1483,7 @@ dependencies = [
"selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1483,6 +1503,8 @@ dependencies = [
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1", "msg 0.0.1",
@ -1504,12 +1526,14 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quickersort 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1712,10 +1736,12 @@ dependencies = [
[[package]] [[package]]
name = "string_cache" name = "string_cache"
version = "0.2.5" version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_generator 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_generator 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1728,10 +1754,12 @@ version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1742,7 +1770,7 @@ dependencies = [
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1753,8 +1781,10 @@ dependencies = [
name = "style_traits" name = "style_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1869,6 +1899,8 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1901,10 +1933,12 @@ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.0 (git+https://github.com/servo/rust-azure)", "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"js 0.1.1 (git+https://github.com/servo/rust-mozjs)", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)",
@ -1922,7 +1956,7 @@ dependencies = [
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -2095,7 +2129,7 @@ dependencies = [
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
] ]

View file

@ -14,7 +14,7 @@ gleam = "0.2"
libc = "0.2" libc = "0.2"
log = "0.3" log = "0.3"
stb_image = "0.2" stb_image = "0.2"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
[dependencies.servo] [dependencies.servo]
path = "../../components/servo" path = "../../components/servo"

View file

@ -4,14 +4,14 @@ version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
@ -32,7 +32,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -67,10 +67,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "cssparser" name = "cssparser"
version = "0.5.0" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -146,7 +148,7 @@ name = "euclid"
version = "0.6.1" version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
@ -167,7 +169,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "heapsize" name = "heapsize"
version = "0.2.2" version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -317,12 +319,14 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quickersort 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -358,10 +362,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "string_cache" name = "string_cache"
version = "0.2.5" version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_generator 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_generator 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -374,10 +380,12 @@ version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -388,7 +396,7 @@ dependencies = [
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -399,8 +407,10 @@ dependencies = [
name = "style_traits" name = "style_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
@ -454,6 +464,8 @@ name = "url"
version = "0.5.4" version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -468,9 +480,11 @@ version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
@ -485,7 +499,7 @@ dependencies = [
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
] ]

View file

@ -11,15 +11,15 @@ crate-type = ["staticlib"]
[dependencies] [dependencies]
app_units = {version = "0.2", features = ["plugins"]} app_units = {version = "0.2", features = ["plugins"]}
bitflags = "0.3" bitflags = "0.3"
cssparser = { version = "0.5", features = [ "serde-serialization" ] } cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
libc = "0.2" libc = "0.2"
log = "0.3" log = "0.3"
num_cpus = "0.2.2" num_cpus = "0.2.2"
selectors = "0.4.1" selectors = {version = "0.4.1", features = ["heap_size"]}
smallvec = "0.1" smallvec = "0.1"
string_cache = "0.2" string_cache = {version = "0.2.7", features = ["heap_size"]}
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
[dependencies.util] [dependencies.util]
path = "../../components/util" path = "../../components/util"

View file

@ -13,7 +13,7 @@ headless = ["servo-glutin/headless"]
[dependencies] [dependencies]
bitflags = "0.3" bitflags = "0.3"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
gleam = "0.2" gleam = "0.2"
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}
servo-glutin = "0.4" servo-glutin = "0.4"

88
ports/gonk/Cargo.lock generated
View file

@ -60,7 +60,7 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -82,7 +82,7 @@ dependencies = [
"core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -147,9 +147,11 @@ name = "canvas_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"azure 0.4.0 (git+https://github.com/servo/rust-azure)", "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)", "offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
@ -312,10 +314,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "cssparser" name = "cssparser"
version = "0.5.0" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -356,6 +360,8 @@ name = "devtools_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1", "msg 0.0.1",
@ -482,7 +488,7 @@ name = "euclid"
version = "0.6.1" version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
@ -589,6 +595,8 @@ dependencies = [
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)", "freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"harfbuzz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "harfbuzz-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
@ -607,7 +615,7 @@ dependencies = [
"servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)", "servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)",
"simd 0.1.0 (git+https://github.com/huonw/simd)", "simd 0.1.0 (git+https://github.com/huonw/simd)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-script 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -621,6 +629,8 @@ version = "0.0.1"
dependencies = [ dependencies = [
"azure 0.4.0 (git+https://github.com/servo/rust-azure)", "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"msg 0.0.1", "msg 0.0.1",
"plugins 0.0.1", "plugins 0.0.1",
@ -710,7 +720,7 @@ dependencies = [
[[package]] [[package]]
name = "heapsize" name = "heapsize"
version = "0.2.2" version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -731,15 +741,17 @@ dependencies = [
[[package]] [[package]]
name = "html5ever" name = "html5ever"
version = "0.4.0" version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "mac 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -831,7 +843,7 @@ name = "js"
version = "0.1.1" version = "0.1.1"
source = "git+https://github.com/servo/rust-mozjs#b96675b217534c7742cbfda8150ea0536aedbdfb" source = "git+https://github.com/servo/rust-mozjs#b96675b217534c7742cbfda8150ea0536aedbdfb"
dependencies = [ dependencies = [
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)", "mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
@ -869,7 +881,7 @@ dependencies = [
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"io-surface 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "io-surface 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -889,11 +901,13 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1", "canvas 0.0.1",
"canvas_traits 0.0.1", "canvas_traits 0.0.1",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1", "gfx 0.0.1",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layout_traits 0.0.1", "layout_traits 0.0.1",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -910,7 +924,7 @@ dependencies = [
"serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1080,8 +1094,10 @@ name = "msg"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"layers 0.2.1 (git+https://github.com/servo/rust-layers)", "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
@ -1134,6 +1150,8 @@ dependencies = [
name = "net_traits" name = "net_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
@ -1419,13 +1437,15 @@ dependencies = [
"canvas 0.0.1", "canvas 0.0.1",
"canvas_traits 0.0.1", "canvas_traits 0.0.1",
"caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "caseless 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"html5ever 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
@ -1445,7 +1465,7 @@ dependencies = [
"selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"unicase 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1465,6 +1485,8 @@ dependencies = [
"devtools_traits 0.0.1", "devtools_traits 0.0.1",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx_traits 0.0.1", "gfx_traits 0.0.1",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1", "msg 0.0.1",
@ -1486,12 +1508,14 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quickersort 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1692,10 +1716,12 @@ dependencies = [
[[package]] [[package]]
name = "string_cache" name = "string_cache"
version = "0.2.5" version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "debug_unreachable 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_generator 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_generator 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1708,10 +1734,12 @@ version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1722,7 +1750,7 @@ dependencies = [
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1733,8 +1761,10 @@ dependencies = [
name = "style_traits" name = "style_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1849,6 +1879,8 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1881,10 +1913,12 @@ dependencies = [
"app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"azure 0.4.0 (git+https://github.com/servo/rust-azure)", "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_plugin 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"html5ever 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)", "ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"js 0.1.1 (git+https://github.com/servo/rust-mozjs)", "js 0.1.1 (git+https://github.com/servo/rust-mozjs)",
@ -1902,7 +1936,7 @@ dependencies = [
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -2044,7 +2078,7 @@ dependencies = [
"phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "phf_codegen 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "tendril 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
] ]

View file

@ -46,7 +46,7 @@ features = ["non-geckolib"]
[dependencies] [dependencies]
env_logger = "0.3" env_logger = "0.3"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
time = "0.1.17" time = "0.1.17"
errno = "0.1" errno = "0.1"
libc = "0.2" libc = "0.2"

View file

@ -32,6 +32,6 @@ git = "https://github.com/servo/ipc-channel"
[dependencies] [dependencies]
cookie = "0.2" cookie = "0.2"
hyper = "0.7" hyper = "0.7"
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
time = "0.1" time = "0.1"
flate2 = "0.2.0" flate2 = "0.2.0"

View file

@ -12,4 +12,4 @@ doctest = false
path = "../../../components/plugins" path = "../../../components/plugins"
[dependencies] [dependencies]
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}

View file

@ -38,10 +38,10 @@ macro_rules! sizeof_checker (
// Update the sizes here // Update the sizes here
sizeof_checker!(size_event_target, EventTarget, 40); sizeof_checker!(size_event_target, EventTarget, 40);
sizeof_checker!(size_node, Node, 168); sizeof_checker!(size_node, Node, 160);
sizeof_checker!(size_element, Element, 312); sizeof_checker!(size_element, Element, 304);
sizeof_checker!(size_htmlelement, HTMLElement, 328); sizeof_checker!(size_htmlelement, HTMLElement, 320);
sizeof_checker!(size_div, HTMLDivElement, 328); sizeof_checker!(size_div, HTMLDivElement, 320);
sizeof_checker!(size_span, HTMLSpanElement, 328); sizeof_checker!(size_span, HTMLSpanElement, 320);
sizeof_checker!(size_text, Text, 200); sizeof_checker!(size_text, Text, 192);
sizeof_checker!(size_characterdata, CharacterData, 200); sizeof_checker!(size_characterdata, CharacterData, 192);

View file

@ -25,8 +25,8 @@ path = "../../../components/util"
[dependencies] [dependencies]
app_units = {version = "0.2", features = ["plugins"]} app_units = {version = "0.2", features = ["plugins"]}
url = "0.5.4" url = {version = "0.5.4", features = ["heap_size"]}
cssparser = "0.5" cssparser = {version = "0.5.2", features = ["heap_size"]}
selectors = "0.4.1" selectors = {version = "0.4.1", features = ["heap_size"]}
string_cache = "0.2" string_cache = {version = "0.2.7", features = ["heap_size"]}
euclid = {version = "0.6.1", features = ["plugins"]} euclid = {version = "0.6.1", features = ["plugins"]}

View file

@ -16,6 +16,5 @@ extern crate util;
#[cfg(test)] mod logical_geometry; #[cfg(test)] mod logical_geometry;
#[cfg(test)] mod thread; #[cfg(test)] mod thread;
#[cfg(test)] mod vec; #[cfg(test)] mod vec;
#[cfg(test)] mod mem;
#[cfg(test)] mod str; #[cfg(test)] mod str;
#[cfg(test)] mod opts; #[cfg(test)] mod opts;

View file

@ -1,106 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* 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 libc::c_void;
use util::mem::{HeapSizeOf, heap_size_of};
struct Four;
impl HeapSizeOf for Four {
fn heap_size_of_children(&self) -> usize {
4
}
}
#[derive(HeapSizeOf)]
struct Eight(Four, Four, bool, bool, bool);
#[derive(HeapSizeOf)]
enum EightOrFour {
Eight(Eight),
Four(Four),
Zero(u8)
}
#[test]
fn test_heap_size() {
// Note: jemalloc often rounds up request sizes. However, it does not round up for request
// sizes of 8 and higher that are powers of two. We take advantage of knowledge here to make
// the sizes of various heap-allocated blocks predictable.
//-----------------------------------------------------------------------
// Start with basic heap block measurement.
unsafe {
// EMPTY is the special non-null address used to represent zero-size allocations.
assert_eq!(heap_size_of(::alloc::heap::EMPTY as *const c_void), 0);
// A 64 byte request is allocated exactly.
let x = ::alloc::heap::allocate(64, 0);
assert_eq!(heap_size_of(x as *const c_void), 64);
::alloc::heap::deallocate(x, 64, 0);
// A 255 byte request is rounded up to 256 bytes.
let x = ::alloc::heap::allocate(255, 0);
assert_eq!(heap_size_of(x as *const c_void), 256);
::alloc::heap::deallocate(x, 255, 0);
// A 1MiB request is allocated exactly.
let x = ::alloc::heap::allocate(1024 * 1024, 0);
assert_eq!(heap_size_of(x as *const c_void), 1024 * 1024);
::alloc::heap::deallocate(x, 1024 * 1024, 0);
}
//-----------------------------------------------------------------------
// Test HeapSizeOf implementations for various built-in types.
// Not on the heap; 0 bytes.
let x = 0i64;
assert_eq!(x.heap_size_of_children(), 0);
// An i64 is 8 bytes.
let x = Box::new(0i64);
assert_eq!(x.heap_size_of_children(), 8);
// An ascii string with 16 chars is 16 bytes in UTF-8.
assert_eq!(String::from("0123456789abcdef").heap_size_of_children(), 16);
// Not on the heap.
let x: Option<i32> = None;
assert_eq!(x.heap_size_of_children(), 0);
// Not on the heap.
let x = Some(0i64);
assert_eq!(x.heap_size_of_children(), 0);
// The `Some` is not on the heap, but the Box is.
let x = Some(Box::new(0i64));
assert_eq!(x.heap_size_of_children(), 8);
// Not on the heap.
let x = ::std::sync::Arc::new(0i64);
assert_eq!(x.heap_size_of_children(), 0);
// The `Arc` is not on the heap, but the Box is.
let x = ::std::sync::Arc::new(Box::new(0i64));
assert_eq!(x.heap_size_of_children(), 8);
// Zero elements, no heap storage.
let x: Vec<i64> = vec![];
assert_eq!(x.heap_size_of_children(), 0);
// Four elements, 8 bytes per element.
let x = vec![0i64, 1i64, 2i64, 3i64];
assert_eq!(x.heap_size_of_children(), 32);
//-----------------------------------------------------------------------
// Test the HeapSizeOf auto-deriving.
assert_eq!(Four.heap_size_of_children(), 4);
let eight = Eight(Four, Four, true, true, true);
assert_eq!(eight.heap_size_of_children(), 8);
assert_eq!(EightOrFour::Eight(eight).heap_size_of_children(), 8);
assert_eq!(EightOrFour::Four(Four).heap_size_of_children(), 4);
assert_eq!(EightOrFour::Zero(1).heap_size_of_children(), 0);
}