aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml1
-rw-r--r--cargo-nightly-build2
-rw-r--r--components/canvas/Cargo.toml2
-rw-r--r--components/canvas/lib.rs1
-rw-r--r--components/canvas_traits/Cargo.toml6
-rw-r--r--components/canvas_traits/lib.rs4
-rw-r--r--components/compositing/Cargo.toml6
-rw-r--r--components/compositing/lib.rs1
-rw-r--r--components/devtools/Cargo.toml2
-rw-r--r--components/devtools_traits/Cargo.toml4
-rw-r--r--components/devtools_traits/lib.rs4
-rw-r--r--components/gfx/Cargo.toml10
-rw-r--r--components/gfx/display_list/mod.rs4
-rw-r--r--components/gfx/font_context.rs2
-rw-r--r--components/gfx/lib.rs3
-rw-r--r--components/gfx/platform/freetype/font_context.rs2
-rw-r--r--components/gfx/platform/macos/font_context.rs2
-rw-r--r--components/gfx_traits/Cargo.toml4
-rw-r--r--components/gfx_traits/lib.rs3
-rw-r--r--components/layout/Cargo.toml24
-rw-r--r--components/layout/context.rs3
-rw-r--r--components/layout/layout_thread.rs2
-rw-r--r--components/layout/lib.rs2
-rw-r--r--components/layout_traits/Cargo.toml2
-rw-r--r--components/msg/Cargo.toml8
-rw-r--r--components/msg/constellation_msg.rs1
-rw-r--r--components/msg/lib.rs3
-rw-r--r--components/net/Cargo.toml2
-rw-r--r--components/net/file_loader.rs45
-rw-r--r--components/net_traits/Cargo.toml6
-rw-r--r--components/net_traits/image_cache_thread.rs1
-rw-r--r--components/net_traits/lib.rs7
-rw-r--r--components/net_traits/request.rs57
-rw-r--r--components/plugins/Cargo.toml2
-rw-r--r--components/plugins/heap_size.rs82
-rw-r--r--components/plugins/lib.rs3
-rw-r--r--components/script/Cargo.toml38
-rw-r--r--components/script/cors.rs2
-rw-r--r--components/script/dom/bindings/error.rs1
-rw-r--r--components/script/dom/bindings/js.rs2
-rw-r--r--components/script/dom/bindings/str.rs1
-rw-r--r--components/script/dom/bindings/utils.rs2
-rw-r--r--components/script/dom/bindings/weakref.rs2
-rw-r--r--components/script/dom/crypto.rs1
-rw-r--r--components/script/dom/element.rs1
-rw-r--r--components/script/dom/eventtarget.rs2
-rw-r--r--components/script/dom/node.rs51
-rw-r--r--components/script/dom/range.rs2
-rw-r--r--components/script/dom/xmlhttprequest.rs3
-rw-r--r--components/script/lib.rs2
-rw-r--r--components/script/mem.rs2
-rw-r--r--components/script/textinput.rs1
-rw-r--r--components/script/timers.rs2
-rw-r--r--components/script_traits/Cargo.toml8
-rw-r--r--components/script_traits/lib.rs4
-rw-r--r--components/servo/Cargo.lock282
-rw-r--r--components/servo/Cargo.toml12
-rw-r--r--components/style/Cargo.toml14
-rw-r--r--components/style/custom_properties.rs1
-rw-r--r--components/style/font_face.rs1
-rw-r--r--components/style/lib.rs5
-rw-r--r--components/style/media_queries.rs1
-rw-r--r--components/style/properties.mako.rs6
-rw-r--r--components/style/stylesheets.rs1
-rw-r--r--components/style/traversal.rs45
-rw-r--r--components/style/viewport.rs1
-rw-r--r--components/style_traits/Cargo.toml13
-rw-r--r--components/style_traits/lib.rs2
-rw-r--r--components/util/Cargo.toml30
-rw-r--r--components/util/cursor.rs2
-rw-r--r--components/util/geometry.rs6
-rw-r--r--components/util/lib.rs4
-rw-r--r--components/util/logical_geometry.rs2
-rw-r--r--components/util/mem.rs360
-rw-r--r--components/util/non_geckolib.rs84
-rw-r--r--components/util/range.rs2
-rw-r--r--components/util/str.rs4
-rw-r--r--components/webdriver_server/Cargo.toml2
-rw-r--r--ports/cef/Cargo.lock266
-rw-r--r--ports/cef/Cargo.toml6
-rw-r--r--ports/geckolib/Cargo.lock63
-rw-r--r--ports/geckolib/Cargo.toml12
-rw-r--r--ports/geckolib/bindings.rs85
-rw-r--r--ports/geckolib/data.rs75
-rw-r--r--ports/geckolib/glue.rs144
-rw-r--r--ports/geckolib/lib.rs2
-rw-r--r--ports/geckolib/traversal.rs82
-rw-r--r--ports/geckolib/wrapper.rs36
-rw-r--r--ports/glutin/Cargo.toml4
-rw-r--r--ports/gonk/Cargo.lock241
-rw-r--r--ports/gonk/Cargo.toml4
-rw-r--r--python/servo/testing_commands.py64
-rw-r--r--python/tidy.py2
-rw-r--r--tests/compiletest/helper/Cargo.toml12
-rw-r--r--tests/compiletest/helper/lib.rs29
-rw-r--r--tests/compiletest/plugin/Cargo.toml15
-rw-r--r--tests/compiletest/plugin/compile-fail/ban.rs18
-rw-r--r--tests/compiletest/plugin/compile-fail/privatize.rs16
-rw-r--r--tests/compiletest/plugin/compile-fail/str_to_string.rs16
-rw-r--r--tests/compiletest/plugin/compile-fail/transmute_type.rs19
-rw-r--r--tests/compiletest/plugin/compile-fail/unrooted_must_root.rs27
-rw-r--r--tests/compiletest/plugin/lib.rs10
-rw-r--r--tests/unit/net/Cargo.toml2
-rw-r--r--tests/unit/plugin/Cargo.toml2
-rw-r--r--tests/unit/script/size_of.rs14
-rw-r--r--tests/unit/style/Cargo.toml12
-rw-r--r--tests/unit/util/Cargo.toml4
-rw-r--r--tests/unit/util/lib.rs1
-rw-r--r--tests/unit/util/mem.rs106
-rw-r--r--tests/wpt/harness/README.rst13
-rw-r--r--tests/wpt/harness/docs/usage.rst42
-rw-r--r--tests/wpt/harness/wptrunner/browsers/b2g.py2
-rw-r--r--tests/wpt/harness/wptrunner/browsers/firefox.py10
-rw-r--r--tests/wpt/harness/wptrunner/browsers/servo.py14
-rw-r--r--tests/wpt/harness/wptrunner/browsers/servodriver.py13
-rw-r--r--tests/wpt/harness/wptrunner/executors/executormarionette.py6
-rw-r--r--tests/wpt/harness/wptrunner/executors/executorservo.py3
-rw-r--r--tests/wpt/harness/wptrunner/manifestinclude.py44
-rw-r--r--tests/wpt/harness/wptrunner/manifestupdate.py71
-rw-r--r--tests/wpt/harness/wptrunner/metadata.py44
-rw-r--r--tests/wpt/harness/wptrunner/products.py15
-rw-r--r--tests/wpt/harness/wptrunner/update/metadata.py20
-rw-r--r--tests/wpt/harness/wptrunner/update/update.py2
-rw-r--r--tests/wpt/harness/wptrunner/wptcommandline.py19
-rw-r--r--tests/wpt/metadata-css/css-transforms-1_dev/html/perspective-translateZ-positive.htm.ini3
-rw-r--r--tests/wpt/metadata-css/css-transforms-1_dev/html/transform-stacking-003.htm.ini3
-rw-r--r--tests/wpt/metadata-css/css-transforms-1_dev/html/transform-stacking-004.htm.ini3
-rw-r--r--tests/wpt/mozilla/meta/MANIFEST.json24
-rw-r--r--tests/wpt/mozilla/meta/css/position_fixed_a.html.ini3
-rw-r--r--tests/wpt/mozilla/tests/css/text_node_opacity.html21
-rw-r--r--tests/wpt/mozilla/tests/css/text_node_opacity_ref.html20
131 files changed, 1731 insertions, 1373 deletions
diff --git a/.travis.yml b/.travis.yml
index 5c810b5064b..63fc4ddddcc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,7 @@ matrix:
script:
- ./mach build -d --verbose
- ./mach test-unit
+ - ./mach test-compiletest
- bash etc/ci/lockfile_changed.sh
- bash etc/ci/manifest_changed.sh
cache:
diff --git a/cargo-nightly-build b/cargo-nightly-build
index cd3d0a1ea7d..ca2e22d7d38 100644
--- a/cargo-nightly-build
+++ b/cargo-nightly-build
@@ -1 +1 @@
-2015-10-01
+2016-02-03
diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml
index 942b10709ca..c0532721d3c 100644
--- a/components/canvas/Cargo.toml
+++ b/components/canvas/Cargo.toml
@@ -37,4 +37,4 @@ git = "https://github.com/servo/ipc-channel"
log = "0.3"
num = "0.1.24"
gleam = "0.2"
-euclid = {version = "0.4", features = ["plugins"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
diff --git a/components/canvas/lib.rs b/components/canvas/lib.rs
index 5a0b1a9e596..7377e0385c7 100644
--- a/components/canvas/lib.rs
+++ b/components/canvas/lib.rs
@@ -2,7 +2,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#![feature(clone_from_slice)]
#![feature(nonzero)]
#![feature(plugin)]
#![plugin(plugins)]
diff --git a/components/canvas_traits/Cargo.toml b/components/canvas_traits/Cargo.toml
index 12964b8f66b..83bb07f7076 100644
--- a/components/canvas_traits/Cargo.toml
+++ b/components/canvas_traits/Cargo.toml
@@ -35,7 +35,9 @@ path = "../plugins"
path = "../util"
[dependencies]
-cssparser = { version = "0.5", features = [ "serde-serialization" ] }
-euclid = {version = "0.4", features = ["plugins"]}
+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"
serde_macros = "0.6"
diff --git a/components/canvas_traits/lib.rs b/components/canvas_traits/lib.rs
index d54530b94fd..4dc0a5904f8 100644
--- a/components/canvas_traits/lib.rs
+++ b/components/canvas_traits/lib.rs
@@ -7,13 +7,14 @@
#![feature(custom_derive)]
#![feature(nonzero)]
#![feature(plugin)]
-#![plugin(serde_macros, plugins)]
+#![plugin(heapsize_plugin, plugins, serde_macros)]
extern crate azure;
extern crate core;
extern crate cssparser;
extern crate euclid;
extern crate gfx_traits;
+extern crate heapsize;
extern crate ipc_channel;
extern crate layers;
extern crate offscreen_gl_context;
@@ -40,7 +41,6 @@ use std::default::Default;
use std::fmt;
use std::str::FromStr;
use std::sync::mpsc::Sender;
-use util::mem::HeapSizeOf;
#[derive(Clone, Deserialize, Serialize)]
pub enum FillRule {
diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml
index eddb778fe9b..937bc11e3bb 100644
--- a/components/compositing/Cargo.toml
+++ b/components/compositing/Cargo.toml
@@ -82,16 +82,16 @@ git = "https://github.com/servo/gaol"
git = "https://github.com/servo/gaol"
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
+app_units = {version = "0.2", features = ["plugins"]}
image = "0.5.0"
log = "0.3"
num = "0.1.24"
time = "0.1.17"
gleam = "0.2"
-euclid = {version = "0.4", features = ["plugins"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
serde = "0.6"
serde_macros = "0.6"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
[target.x86_64-apple-darwin.dependencies]
core-graphics = "0.2"
diff --git a/components/compositing/lib.rs b/components/compositing/lib.rs
index bf192bd044a..6434c3a8939 100644
--- a/components/compositing/lib.rs
+++ b/components/compositing/lib.rs
@@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![feature(box_syntax)]
-#![feature(clone_from_slice)]
#![feature(custom_derive)]
#![feature(plugin)]
#![feature(mpsc_select)]
diff --git a/components/devtools/Cargo.toml b/components/devtools/Cargo.toml
index b825ef9bc48..36567380d14 100644
--- a/components/devtools/Cargo.toml
+++ b/components/devtools/Cargo.toml
@@ -25,7 +25,7 @@ git = "https://github.com/servo/ipc-channel"
[dependencies]
hyper = { version = "0.7", features = [ "serde-serialization" ] }
log = "0.3"
-time = "0.1"
rustc-serialize = "0.3"
serde = "0.6"
serde_macros = "0.6"
+time = "0.1"
diff --git a/components/devtools_traits/Cargo.toml b/components/devtools_traits/Cargo.toml
index c0a282226f7..115ab732691 100644
--- a/components/devtools_traits/Cargo.toml
+++ b/components/devtools_traits/Cargo.toml
@@ -20,11 +20,13 @@ git = "https://github.com/servo/ipc-channel"
path = "../plugins"
[dependencies]
+heapsize = "0.2.5"
+heapsize_plugin = "0.1.2"
hyper = { version = "0.7", features = [ "serde-serialization" ] }
time = "0.1"
rustc-serialize = "0.3"
bitflags = "0.3"
serde = "0.6"
serde_macros = "0.6"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
diff --git a/components/devtools_traits/lib.rs b/components/devtools_traits/lib.rs
index 81644badc44..8408a79b197 100644
--- a/components/devtools_traits/lib.rs
+++ b/components/devtools_traits/lib.rs
@@ -13,10 +13,11 @@
#![deny(unsafe_code)]
#![feature(custom_derive, plugin)]
-#![plugin(serde_macros, plugins)]
+#![plugin(heapsize_plugin, serde_macros)]
#[macro_use]
extern crate bitflags;
+extern crate heapsize;
extern crate hyper;
extern crate ipc_channel;
extern crate msg;
@@ -36,7 +37,6 @@ use std::net::TcpStream;
use time::Duration;
use time::Tm;
use url::Url;
-use util::mem::HeapSizeOf;
// Information would be attached to NewGlobal to be received and show in devtools.
// Extend these fields if we need more information.
diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml
index 8730eddfa1b..874e95d591a 100644
--- a/components/gfx/Cargo.toml
+++ b/components/gfx/Cargo.toml
@@ -9,11 +9,13 @@ name = "gfx"
path = "lib.rs"
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
+app_units = {version = "0.2", features = ["plugins"]}
bitflags = "0.3"
-euclid = {version = "0.4", features = ["plugins"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
fnv = "1.0"
harfbuzz-sys = "0.1"
+heapsize = "0.2.5"
+heapsize_plugin = "0.1.2"
lazy_static = "0.1"
libc = "0.2"
log = "0.3"
@@ -23,10 +25,10 @@ rustc-serialize = "0.3"
serde = "0.6"
serde_macros = "0.6"
smallvec = "0.1"
-string_cache = "0.2"
+string_cache = {version = "0.2.7", features = ["heap_size"]}
time = "0.1.12"
unicode-script = { version = "0.1", features = ["harfbuzz"] }
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
servo-skia = "0.20130412.0"
[dependencies.plugins]
diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs
index b6565753f36..96c953d3dfe 100644
--- a/components/gfx/display_list/mod.rs
+++ b/components/gfx/display_list/mod.rs
@@ -22,6 +22,7 @@ use euclid::approxeq::ApproxEq;
use euclid::num::Zero;
use euclid::{Matrix2D, Matrix4, Point2D, Rect, SideOffsets2D, Size2D};
use gfx_traits::{color, LayerId, LayerKind, ScrollPolicy};
+use heapsize::HeapSizeOf;
use msg::constellation_msg::PipelineId;
use net_traits::image::base::Image;
use paint_context::PaintContext;
@@ -41,7 +42,6 @@ use text::glyph::CharIndex;
use util::cursor::Cursor;
use util::geometry::MAX_RECT;
use util::linked_list::prepend_from;
-use util::mem::HeapSizeOf;
use util::opts;
use util::print_tree::PrintTree;
use util::range::Range;
@@ -1256,8 +1256,8 @@ pub struct GradientDisplayItem {
impl HeapSizeOf for GradientDisplayItem {
fn heap_size_of_children(&self) -> usize {
+ use heapsize::heap_size_of;
use libc::c_void;
- use util::mem::heap_size_of;
// 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
diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs
index 173f1815ed2..8262b0d15fb 100644
--- a/components/gfx/font_context.rs
+++ b/components/gfx/font_context.rs
@@ -13,6 +13,7 @@ use font::SpecifiedFontStyle;
use font::{Font, FontGroup};
use font_cache_thread::FontCacheThread;
use font_template::FontTemplateDescriptor;
+use heapsize::HeapSizeOf;
use platform::font::FontHandle;
use platform::font_context::FontContextHandle;
use platform::font_template::FontTemplateData;
@@ -27,7 +28,6 @@ use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
use string_cache::Atom;
use style::computed_values::{font_style, font_variant};
use util::cache::HashCache;
-use util::mem::HeapSizeOf;
#[cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))]
fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont {
diff --git a/components/gfx/lib.rs b/components/gfx/lib.rs
index dbf255a56b4..1ce6fb64f1c 100644
--- a/components/gfx/lib.rs
+++ b/components/gfx/lib.rs
@@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// For simd (currently x86_64/aarch64)
-#![cfg_attr(any(target_arch = "x86_64", target_arch = "aarch64"), feature(convert))]
#![cfg_attr(any(target_os = "linux", target_os = "android", target_os = "windows"), feature(heap_api))]
#![feature(alloc)]
@@ -15,6 +14,7 @@
#![feature(str_char)]
#![feature(unique)]
+#![plugin(heapsize_plugin)]
#![plugin(plugins)]
#![plugin(serde_macros)]
@@ -45,6 +45,7 @@ extern crate gfx_traits;
// shapers. For now, however, this is a hard dependency.
extern crate harfbuzz_sys as harfbuzz;
+extern crate heapsize;
extern crate ipc_channel;
extern crate layers;
#[macro_use]
diff --git a/components/gfx/platform/freetype/font_context.rs b/components/gfx/platform/freetype/font_context.rs
index 05cbd0675f6..1ed40300639 100644
--- a/components/gfx/platform/freetype/font_context.rs
+++ b/components/gfx/platform/freetype/font_context.rs
@@ -10,10 +10,10 @@ use freetype::freetype::FT_Library;
use freetype::freetype::FT_Memory;
use freetype::freetype::FT_New_Library;
use freetype::freetype::struct_FT_MemoryRec_;
+use heapsize::{HeapSizeOf, heap_size_of};
use libc::{c_long, c_void};
use std::ptr;
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
// created. FreeType passes it back to the ft_alloc/ft_realloc/ft_free callbacks. We use it to
diff --git a/components/gfx/platform/macos/font_context.rs b/components/gfx/platform/macos/font_context.rs
index e260f84b17b..e728b62aebd 100644
--- a/components/gfx/platform/macos/font_context.rs
+++ b/components/gfx/platform/macos/font_context.rs
@@ -2,7 +2,7 @@
* 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 util::mem::HeapSizeOf;
+use heapsize::HeapSizeOf;
#[derive(Clone, Debug)]
pub struct FontContextHandle {
diff --git a/components/gfx_traits/Cargo.toml b/components/gfx_traits/Cargo.toml
index fd927351ed1..0f7165f3494 100644
--- a/components/gfx_traits/Cargo.toml
+++ b/components/gfx_traits/Cargo.toml
@@ -25,6 +25,8 @@ path = "../plugins"
path = "../util"
[dependencies]
-euclid = {version = "0.4", features = ["plugins"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
+heapsize = "0.2.5"
+heapsize_plugin = "0.1.2"
serde = "0.6"
serde_macros = "0.6"
diff --git a/components/gfx_traits/lib.rs b/components/gfx_traits/lib.rs
index 980e850b014..84e74038e40 100644
--- a/components/gfx_traits/lib.rs
+++ b/components/gfx_traits/lib.rs
@@ -3,13 +3,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![feature(custom_derive, plugin)]
-#![plugin(plugins, serde_macros)]
+#![plugin(heapsize_plugin, plugins, serde_macros)]
#![crate_name = "gfx_traits"]
#![crate_type = "rlib"]
extern crate azure;
extern crate euclid;
+extern crate heapsize;
extern crate layers;
extern crate msg;
extern crate serde;
diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml
index 48b4f7f69c9..9c494dbc07c 100644
--- a/components/layout/Cargo.toml
+++ b/components/layout/Cargo.toml
@@ -54,21 +54,23 @@ path = "../util"
git = "https://github.com/servo/ipc-channel"
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
-cssparser = { version = "0.5", features = [ "serde-serialization" ] }
-log = "0.3"
-fnv = "1.0"
+app_units = {version = "0.2", features = ["plugins"]}
bitflags = "0.3"
-rustc-serialize = "0.3"
+cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
+fnv = "1.0"
+heapsize = "0.2.5"
+heapsize_plugin = "0.1.2"
libc = "0.2"
-selectors = "0.4.1"
-smallvec = "0.1"
-string_cache = "0.2"
-euclid = {version = "0.4", features = ["plugins"]}
+log = "0.3"
+rustc-serialize = "0.3"
+selectors = {version = "0.4.1", features = ["heap_size"]}
serde = "0.6"
-serde_macros = "0.6"
serde_json = "0.5"
+serde_macros = "0.6"
+smallvec = "0.1"
+string_cache = {version = "0.2.7", features = ["heap_size"]}
time = "0.1"
unicode-bidi = "0.2"
unicode-script = { version = "0.1", features = ["harfbuzz"] }
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
diff --git a/components/layout/context.rs b/components/layout/context.rs
index ec2be6f2141..7eb01a68846 100644
--- a/components/layout/context.rs
+++ b/components/layout/context.rs
@@ -14,6 +14,7 @@ use fnv::FnvHasher;
use gfx::font_cache_thread::FontCacheThread;
use gfx::font_context::FontContext;
use gfx_traits::LayerId;
+use heapsize::HeapSizeOf;
use ipc_channel::ipc::{self, IpcSender};
use net_traits::image::base::Image;
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::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
use url::Url;
-use util::mem::HeapSizeOf;
use util::opts;
struct LocalLayoutContext {
@@ -50,6 +50,7 @@ pub fn heap_size_of_local_context() -> usize {
})
}
+// Keep this implementation in sync with the one in ports/geckolib/traversal.rs.
fn create_or_get_local_context(shared_layout_context: &SharedLayoutContext)
-> Rc<LocalLayoutContext> {
LOCAL_CONTEXT_KEY.with(|r| {
diff --git a/components/layout/layout_thread.rs b/components/layout/layout_thread.rs
index 49875094b4f..8599b89cc2d 100644
--- a/components/layout/layout_thread.rs
+++ b/components/layout/layout_thread.rs
@@ -28,6 +28,7 @@ use gfx::font_cache_thread::FontCacheThread;
use gfx::font_context;
use gfx::paint_thread::{LayoutToPaintMsg, PaintLayer};
use gfx_traits::{color, Epoch, LayerId, ScrollPolicy};
+use heapsize::HeapSizeOf;
use incremental::{LayoutDamageComputation, REFLOW, REFLOW_ENTIRE_DOCUMENT, REPAINT};
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use ipc_channel::router::ROUTER;
@@ -73,7 +74,6 @@ use url::Url;
use util::geometry::MAX_RECT;
use util::ipc::OptionalIpcSender;
use util::logical_geometry::LogicalPoint;
-use util::mem::HeapSizeOf;
use util::opts;
use util::thread;
use util::thread_state;
diff --git a/components/layout/lib.rs b/components/layout/lib.rs
index 4f46b0fe134..85f70270148 100644
--- a/components/layout/lib.rs
+++ b/components/layout/lib.rs
@@ -16,6 +16,7 @@
#![deny(unsafe_code)]
+#![plugin(heapsize_plugin)]
#![plugin(plugins)]
extern crate app_units;
@@ -29,6 +30,7 @@ extern crate euclid;
extern crate fnv;
extern crate gfx;
extern crate gfx_traits;
+extern crate heapsize;
extern crate ipc_channel;
extern crate layout_traits;
extern crate libc;
diff --git a/components/layout_traits/Cargo.toml b/components/layout_traits/Cargo.toml
index 4729605b282..a2c4c2fba27 100644
--- a/components/layout_traits/Cargo.toml
+++ b/components/layout_traits/Cargo.toml
@@ -31,4 +31,4 @@ git = "https://github.com/servo/ipc-channel"
[dependencies]
serde = "0.6"
serde_macros = "0.6"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
diff --git a/components/msg/Cargo.toml b/components/msg/Cargo.toml
index 5668d40a211..129355c8ae6 100644
--- a/components/msg/Cargo.toml
+++ b/components/msg/Cargo.toml
@@ -21,11 +21,13 @@ git = "https://github.com/servo/ipc-channel"
path = "../plugins"
[dependencies]
-cssparser = { version = "0.5", features = [ "serde-serialization" ] }
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" ] }
rustc-serialize = "0.3.4"
-euclid = {version = "0.4", features = ["plugins"]}
serde = "0.6"
serde_macros = "0.6"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
diff --git a/components/msg/constellation_msg.rs b/components/msg/constellation_msg.rs
index 2ce14039a15..adefb76010c 100644
--- a/components/msg/constellation_msg.rs
+++ b/components/msg/constellation_msg.rs
@@ -16,7 +16,6 @@ use std::cell::Cell;
use std::fmt;
use url::Url;
use util::geometry::{PagePx, ViewportPx};
-use util::mem::HeapSizeOf;
use webdriver_msg::{LoadStatus, WebDriverScriptCommand};
#[derive(Deserialize, Serialize)]
diff --git a/components/msg/lib.rs b/components/msg/lib.rs
index 3b5c99b8f3c..febf188fd77 100644
--- a/components/msg/lib.rs
+++ b/components/msg/lib.rs
@@ -3,11 +3,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![feature(custom_attribute, custom_derive, plugin)]
-#![plugin(serde_macros, plugins)]
+#![plugin(heapsize_plugin, serde_macros, plugins)]
#[macro_use]
extern crate bitflags;
extern crate euclid;
+extern crate heapsize;
extern crate hyper;
extern crate ipc_channel;
extern crate layers;
diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml
index b0bb98b779f..0c5e34874d0 100644
--- a/components/net/Cargo.toml
+++ b/components/net/Cargo.toml
@@ -38,6 +38,6 @@ cookie = "0.2"
mime_guess = "1.1.1"
flate2 = "0.2.0"
uuid = "0.1.16"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
websocket = "0.14.0"
immeta = "0.2"
diff --git a/components/net/file_loader.rs b/components/net/file_loader.rs
index cc4652c6408..a6e8eb4706c 100644
--- a/components/net/file_loader.rs
+++ b/components/net/file_loader.rs
@@ -8,7 +8,7 @@ use mime_guess::guess_mime_type;
use net_traits::ProgressMsg::{Done, Payload};
use net_traits::{LoadConsumer, LoadData, Metadata};
use resource_thread::{CancellationListener, ProgressSender};
-use resource_thread::{send_error, start_sending_sniffed, start_sending_sniffed_opt};
+use resource_thread::{send_error, start_sending_sniffed_opt};
use std::borrow::ToOwned;
use std::error::Error;
use std::fs::File;
@@ -46,6 +46,7 @@ fn read_all(reader: &mut File, progress_chan: &ProgressSender, cancel_listener:
-> Result<LoadResult, String> {
loop {
if cancel_listener.is_cancelled() {
+ let _ = progress_chan.send(Done(Err("load cancelled".to_owned())));
return Ok(LoadResult::Cancelled);
}
@@ -56,29 +57,37 @@ fn read_all(reader: &mut File, progress_chan: &ProgressSender, cancel_listener:
}
}
+fn get_progress_chan(load_data: LoadData, file_path: PathBuf,
+ senders: LoadConsumer, classifier: Arc<MIMEClassifier>, buf: &[u8])
+ -> Result<ProgressSender, ()> {
+ let mut metadata = Metadata::default(load_data.url);
+ let mime_type = guess_mime_type(file_path.as_path());
+ metadata.set_content_type(Some(&mime_type));
+ return start_sending_sniffed_opt(senders, metadata, classifier, buf, load_data.context);
+}
+
pub fn factory(load_data: LoadData,
senders: LoadConsumer,
classifier: Arc<MIMEClassifier>,
cancel_listener: CancellationListener) {
- let url = load_data.url;
- let context = load_data.context;
- assert!(&*url.scheme == "file");
+ assert!(&*load_data.url.scheme == "file");
spawn_named("file_loader".to_owned(), move || {
- let file_path: Result<PathBuf, ()> = url.to_file_path();
+ let file_path: Result<PathBuf, ()> = load_data.url.to_file_path();
match file_path {
Ok(file_path) => {
match File::open(&file_path) {
Ok(ref mut reader) => {
if cancel_listener.is_cancelled() {
+ if let Ok(progress_chan) = get_progress_chan(load_data, file_path,
+ senders, classifier, &[]) {
+ let _ = progress_chan.send(Done(Err("load cancelled".to_owned())));
+ }
return;
}
match read_block(reader) {
Ok(ReadStatus::Partial(buf)) => {
- let mut metadata = Metadata::default(url);
- let mime_type = guess_mime_type(file_path.as_path());
- metadata.set_content_type(Some(&mime_type));
- let progress_chan = start_sending_sniffed(senders, metadata,
- classifier, &buf, context);
+ let progress_chan = get_progress_chan(load_data, file_path,
+ senders, classifier, &buf).ok().unwrap();
progress_chan.send(Payload(buf)).unwrap();
let read_result = read_all(reader, &progress_chan, &cancel_listener);
if let Ok(load_result) = read_result {
@@ -89,19 +98,13 @@ pub fn factory(load_data: LoadData,
}
}
Ok(ReadStatus::EOF) => {
- let mut metadata = Metadata::default(url);
- let mime_type = guess_mime_type(file_path.as_path());
- metadata.set_content_type(Some(&mime_type));
- if let Ok(chan) = start_sending_sniffed_opt(senders,
- metadata,
- classifier,
- &[],
- context) {
+ if let Ok(chan) = get_progress_chan(load_data, file_path,
+ senders, classifier, &[]) {
let _ = chan.send(Done(Ok(())));
}
}
Err(e) => {
- send_error(url, e, senders);
+ send_error(load_data.url, e, senders);
}
};
}
@@ -110,13 +113,13 @@ pub fn factory(load_data: LoadData,
// http://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.open
// but, we'll go for a "file not found!"
let url = Url::parse("about:not-found").unwrap();
- let load_data_404 = LoadData::new(context, url, None);
+ let load_data_404 = LoadData::new(load_data.context, url, None);
about_loader::factory(load_data_404, senders, classifier, cancel_listener)
}
}
}
Err(_) => {
- send_error(url, "Could not parse path".to_owned(), senders);
+ send_error(load_data.url, "Could not parse path".to_owned(), senders);
}
}
});
diff --git a/components/net_traits/Cargo.toml b/components/net_traits/Cargo.toml
index 06d87f49e9d..d41649797c1 100644
--- a/components/net_traits/Cargo.toml
+++ b/components/net_traits/Cargo.toml
@@ -20,11 +20,13 @@ git = "https://github.com/servo/ipc-channel"
path = "../plugins"
[dependencies]
-log = "0.3"
+heapsize = "0.2.5"
+heapsize_plugin = "0.1.2"
hyper = { version = "0.7", features = [ "serde-serialization" ] }
image = "0.5.0"
+log = "0.3"
serde = "0.6"
serde_macros = "0.6"
stb_image = "0.2"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
websocket = "0.14.0"
diff --git a/components/net_traits/image_cache_thread.rs b/components/net_traits/image_cache_thread.rs
index 2381efbb997..8324bae8b23 100644
--- a/components/net_traits/image_cache_thread.rs
+++ b/components/net_traits/image_cache_thread.rs
@@ -6,7 +6,6 @@ use ipc_channel::ipc::{self, IpcSender};
use msg::constellation_msg::{Image, ImageMetadata};
use std::sync::Arc;
use url::Url;
-use util::mem::HeapSizeOf;
/// This is optionally passed to the image cache when requesting
/// and image, and returned to the specified event loop when the
diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs
index 654a64e811c..45d01a9818d 100644
--- a/components/net_traits/lib.rs
+++ b/components/net_traits/lib.rs
@@ -9,8 +9,9 @@
#![feature(slice_patterns)]
#![feature(step_by)]
#![feature(custom_attribute)]
-#![plugin(serde_macros, plugins)]
+#![plugin(heapsize_plugin, serde_macros)]
+extern crate heapsize;
extern crate hyper;
extern crate image as piston_image;
extern crate ipc_channel;
@@ -32,7 +33,6 @@ use msg::constellation_msg::{PipelineId};
use serde::{Deserializer, Serializer};
use std::thread;
use url::Url;
-use util::mem::HeapSizeOf;
use websocket::header;
pub mod hosts;
@@ -69,6 +69,7 @@ pub enum LoadContext {
#[derive(Clone, Deserialize, Serialize, HeapSizeOf)]
pub struct LoadData {
pub url: Url,
+ #[ignore_heap_size_of = "Defined in hyper"]
pub method: Method,
#[ignore_heap_size_of = "Defined in hyper"]
/// Headers that will apply to the initial request only
@@ -297,6 +298,7 @@ pub struct Metadata {
/// Final URL after redirects.
pub final_url: Url,
+ #[ignore_heap_size_of = "Defined in hyper"]
/// MIME type / subtype.
pub content_type: Option<(ContentType)>,
@@ -307,6 +309,7 @@ pub struct Metadata {
/// Headers
pub headers: Option<Headers>,
+ #[ignore_heap_size_of = "Defined in hyper"]
/// HTTP Status
pub status: Option<RawStatus>,
}
diff --git a/components/net_traits/request.rs b/components/net_traits/request.rs
index d9f6a520b95..2a85d1112b3 100644
--- a/components/net_traits/request.rs
+++ b/components/net_traits/request.rs
@@ -78,6 +78,12 @@ pub enum ResponseTainting {
Opaque
}
+/// [CORS settings attribute](https://html.spec.whatwg.org/multipage/#attr-crossorigin-anonymous)
+pub enum CORSSettings {
+ Anonymous,
+ UseCredentials
+}
+
/// A [Request](https://fetch.spec.whatwg.org/#requests) as defined by the Fetch spec
#[derive(Clone)]
pub struct Request {
@@ -113,7 +119,10 @@ pub struct Request {
}
impl Request {
- pub fn new(url: Url, context: Context, origin: Origin, is_service_worker_global_scope: bool) -> Request {
+ pub fn new(url: Url,
+ context: Context,
+ origin: Origin,
+ is_service_worker_global_scope: bool) -> Request {
Request {
method: RefCell::new(Method::Get),
local_urls_only: false,
@@ -144,6 +153,52 @@ impl Request {
}
}
+ /// https://html.spec.whatwg.org/multipage/#create-a-potential-cors-request
+ pub fn potential_cors_request(url: Url,
+ cors_attribute_state: Option<CORSSettings>,
+ context: Context,
+ is_service_worker_global_scope: bool,
+ same_origin_fallback: bool) -> Request {
+ let origin = url.origin();
+ Request {
+ method: RefCell::new(Method::Get),
+ local_urls_only: false,
+ url_list: RefCell::new(vec![url]),
+ headers: RefCell::new(Headers::new()),
+ unsafe_request: false,
+ body: None,
+ preserve_content_codings: false,
+ is_service_worker_global_scope: is_service_worker_global_scope,
+ skip_service_worker: Cell::new(false),
+ context: context,
+ context_frame_type: ContextFrameType::ContextNone,
+ origin: origin,
+ force_origin_header: false,
+ same_origin_data: Cell::new(false),
+ omit_origin_header: false,
+ referer: Referer::Client,
+ authentication: false,
+ synchronous: false,
+ use_cors_preflight: false,
+ // Step 1-2
+ mode: match cors_attribute_state {
+ Some(_) => RequestMode::CORSMode,
+ None if same_origin_fallback => RequestMode::SameOrigin,
+ None => RequestMode::NoCORS
+ },
+ // Step 3-4
+ credentials_mode: match cors_attribute_state {
+ Some(CORSSettings::Anonymous) => CredentialsMode::CredentialsSameOrigin,
+ _ => CredentialsMode::Include,
+ },
+ use_url_credentials: true,
+ cache_mode: Cell::new(CacheMode::Default),
+ redirect_mode: Cell::new(RedirectMode::Follow),
+ redirect_count: Cell::new(0),
+ response_tainting: Cell::new(ResponseTainting::Basic)
+ }
+ }
+
pub fn get_last_url_string(&self) -> String {
self.url_list.borrow().last().unwrap().serialize()
}
diff --git a/components/plugins/Cargo.toml b/components/plugins/Cargo.toml
index 172a0d3adf3..d5d1f0246b0 100644
--- a/components/plugins/Cargo.toml
+++ b/components/plugins/Cargo.toml
@@ -17,7 +17,7 @@ rev = "9dca15de3e8ea266d3e7e868c0f358ed4fa5f195"
optional = true
[dependencies]
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
[features]
default = []
diff --git a/components/plugins/heap_size.rs b/components/plugins/heap_size.rs
deleted file mode 100644
index 0f8ea67fa62..00000000000
--- a/components/plugins/heap_size.rs
+++ /dev/null
@@ -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()))
- }
- })
-}
diff --git a/components/plugins/lib.rs b/components/plugins/lib.rs
index b1d701e6aec..25181f2197c 100644
--- a/components/plugins/lib.rs
+++ b/components/plugins/lib.rs
@@ -36,8 +36,6 @@ use syntax::parse::token::intern;
// Public for documentation to show up
/// Handles the auto-deriving for `#[derive(JSTraceable)]`
pub mod jstraceable;
-/// Handles the auto-deriving for `#[derive(HeapSizeOf)]`
-pub mod heap_size;
pub mod lints;
/// Autogenerates implementations of Reflectable on DOM structs
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("derive_JSTraceable"), MultiDecorator(box jstraceable::expand_jstraceable));
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_upper", casing::expand_upper);
reg.register_macro("url", url_plugin::expand_url);
diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml
index 4ca81831eba..b06ae8e8e48 100644
--- a/components/script/Cargo.toml
+++ b/components/script/Cargo.toml
@@ -63,28 +63,30 @@ features = ["unstable"]
path = "../gfx_traits"
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
-cssparser = { version = "0.5", features = [ "serde-serialization" ] }
-log = "0.3"
+app_units = {version = "0.2", features = ["plugins"]}
+bitflags = "0.3"
+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" ] }
-time = "0.1.12"
-bitflags = "0.3"
-rustc-serialize = "0.3"
+image = "0.5.0"
libc = "0.2"
-unicase = "1.0"
+log = "0.3"
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.4", features = ["plugins"]}
rand = "0.3"
-serde = "0.6"
-caseless = "0.1.0"
-image = "0.5.0"
-url = "0.5.4"
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"
diff --git a/components/script/cors.rs b/components/script/cors.rs
index 7bf5127a22e..e64583e0a58 100644
--- a/components/script/cors.rs
+++ b/components/script/cors.rs
@@ -27,7 +27,6 @@ use std::sync::{Arc, Mutex};
use time::{self, Timespec, now};
use unicase::UniCase;
use url::{SchemeData, Url};
-use util::mem::HeapSizeOf;
use util::thread::spawn_named;
/// Interface for network listeners concerned with CORS checks. Proper network requests
@@ -41,6 +40,7 @@ pub struct CORSRequest {
pub origin: Url,
pub destination: Url,
pub mode: RequestMode,
+ #[ignore_heap_size_of = "Defined in hyper"]
pub method: Method,
#[ignore_heap_size_of = "Defined in hyper"]
pub headers: Headers,
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs
index 95f22e693e5..dafd14f58c9 100644
--- a/components/script/dom/bindings/error.rs
+++ b/components/script/dom/bindings/error.rs
@@ -14,7 +14,6 @@ use js::jsapi::{JSContext, JSObject, RootedValue};
use js::jsapi::{JS_IsExceptionPending, JS_ReportPendingException, JS_SetPendingException};
use js::jsapi::{JS_RestoreFrameChain, JS_SaveFrameChain};
use js::jsval::UndefinedValue;
-use util::mem::HeapSizeOf;
/// DOM exceptions that can be thrown by a native DOM method.
#[derive(Debug, Clone, HeapSizeOf)]
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index 6abf5f9b4e5..37d673f3c26 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -30,6 +30,7 @@ use dom::bindings::reflector::{Reflectable, Reflector};
use dom::bindings::trace::JSTraceable;
use dom::bindings::trace::trace_reflector;
use dom::node::Node;
+use heapsize::HeapSizeOf;
use js::jsapi::{Heap, JSObject, JSTracer};
use js::jsval::JSVal;
use layout_interface::TrustedNodeAddress;
@@ -40,7 +41,6 @@ use std::hash::{Hash, Hasher};
use std::mem;
use std::ops::Deref;
use std::ptr;
-use util::mem::HeapSizeOf;
use util::thread_state;
/// A traced reference to a DOM object
diff --git a/components/script/dom/bindings/str.rs b/components/script/dom/bindings/str.rs
index df69bc77fd0..26c8568eadf 100644
--- a/components/script/dom/bindings/str.rs
+++ b/components/script/dom/bindings/str.rs
@@ -10,7 +10,6 @@ use std::hash::{Hash, Hasher};
use std::ops;
use std::str;
use std::str::FromStr;
-use util::mem::HeapSizeOf;
use util::str::is_token;
/// Encapsulates the IDL `ByteString` type.
diff --git a/components/script/dom/bindings/utils.rs b/components/script/dom/bindings/utils.rs
index d34d8f3f9f4..83e7a2e4cb2 100644
--- a/components/script/dom/bindings/utils.rs
+++ b/components/script/dom/bindings/utils.rs
@@ -13,6 +13,7 @@ use dom::bindings::inheritance::TopTypeId;
use dom::bindings::trace::trace_object;
use dom::browsingcontext;
use dom::window;
+use heapsize::HeapSizeOf;
use js;
use js::error::throw_type_error;
use js::glue::{CallJitGetterOp, CallJitMethodOp, CallJitSetterOp, IsWrapper};
@@ -36,7 +37,6 @@ use libc::{self, c_uint};
use std::default::Default;
use std::ffi::CString;
use std::ptr;
-use util::mem::HeapSizeOf;
use util::non_geckolib::jsstring_to_str;
/// Proxy handler for a WindowProxy.
diff --git a/components/script/dom/bindings/weakref.rs b/components/script/dom/bindings/weakref.rs
index e311d4a40bb..99adb8a0c02 100644
--- a/components/script/dom/bindings/weakref.rs
+++ b/components/script/dom/bindings/weakref.rs
@@ -15,6 +15,7 @@ use core::nonzero::NonZero;
use dom::bindings::js::Root;
use dom::bindings::reflector::Reflectable;
use dom::bindings::trace::JSTraceable;
+use heapsize::HeapSizeOf;
use js::jsapi::{JSTracer, JS_GetReservedSlot, JS_SetReservedSlot};
use js::jsval::PrivateValue;
use libc::c_void;
@@ -22,7 +23,6 @@ use std::cell::{Cell, UnsafeCell};
use std::iter::Iterator;
use std::mem;
use std::ops::{Deref, DerefMut, Drop};
-use util::mem::HeapSizeOf;
/// 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,
diff --git a/components/script/dom/crypto.rs b/components/script/dom/crypto.rs
index b8c595f3aa4..6e0351d37ee 100644
--- a/components/script/dom/crypto.rs
+++ b/components/script/dom/crypto.rs
@@ -20,6 +20,7 @@ no_jsmanaged_fields!(OsRng);
#[dom_struct]
pub struct Crypto {
reflector_: Reflector,
+ #[ignore_heap_size_of = "Defined in rand"]
rng: DOMRefCell<OsRng>,
}
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index d093380b008..3cdf3f6ba43 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -84,7 +84,6 @@ use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, parse_sty
use style::selector_impl::{NonTSPseudoClass, ServoSelectorImpl};
use style::values::CSSFloat;
use style::values::specified::{self, CSSColor, CSSRGBA, LengthOrPercentage};
-use util::mem::HeapSizeOf;
use util::str::{DOMString, LengthOrPercentageOrAuto};
// TODO: Update focus state when the top-level browsing context gains or loses system focus,
diff --git a/components/script/dom/eventtarget.rs b/components/script/dom/eventtarget.rs
index 1ac0313d3c5..91afac1bf1c 100644
--- a/components/script/dom/eventtarget.rs
+++ b/components/script/dom/eventtarget.rs
@@ -21,6 +21,7 @@ use dom::eventdispatcher::dispatch_event;
use dom::virtualmethods::VirtualMethods;
use dom::window::Window;
use fnv::FnvHasher;
+use heapsize::HeapSizeOf;
use js::jsapi::{CompileFunction, JS_GetFunctionObject, RootedValue};
use js::jsapi::{HandleObject, JSContext, RootedFunction};
use js::jsapi::{JSAutoCompartment, JSAutoRequest};
@@ -35,7 +36,6 @@ use std::rc::Rc;
use std::{intrinsics, ptr};
use string_cache::Atom;
use url::Url;
-use util::mem::HeapSizeOf;
use util::str::DOMString;
#[derive(PartialEq, Clone, JSTraceable)]
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 9c4e52b495d..a50aad1a78e 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -9,7 +9,6 @@ use core::nonzero::NonZero;
use devtools_traits::NodeInfo;
use document_loader::DocumentLoader;
use dom::attr::Attr;
-use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
use dom::bindings::codegen::Bindings::CharacterDataBinding::CharacterDataMethods;
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
@@ -47,6 +46,7 @@ use dom::text::Text;
use dom::virtualmethods::{VirtualMethods, vtable_for};
use dom::window::Window;
use euclid::rect::Rect;
+use heapsize::{HeapSizeOf, heap_size_of};
use js::jsapi::{JSContext, JSObject, JSRuntime};
use layout_interface::{LayoutChan, Msg};
use libc::{self, c_void, uintptr_t};
@@ -57,7 +57,7 @@ use selectors::matching::matches;
use selectors::parser::Selector;
use selectors::parser::parse_author_origin_selector_list_from_str;
use std::borrow::ToOwned;
-use std::cell::Cell;
+use std::cell::{Cell, UnsafeCell};
use std::cmp::max;
use std::default::Default;
use std::iter::{self, FilterMap, Peekable};
@@ -120,7 +120,7 @@ pub struct Node {
/// node is finalized.
style_and_layout_data: Cell<Option<OpaqueStyleAndLayoutData>>,
- unique_id: DOMRefCell<Option<Box<Uuid>>>,
+ unique_id: UniqueId,
}
bitflags! {
@@ -755,11 +755,7 @@ impl Node {
}
pub fn get_unique_id(&self) -> String {
- if self.unique_id.borrow().is_none() {
- 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()
+ self.unique_id.borrow().to_simple_string()
}
pub fn summarize(&self) -> NodeInfo {
@@ -1266,7 +1262,7 @@ impl Node {
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
}
}
+
+/// 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()
+ }
+ }
+}
diff --git a/components/script/dom/range.rs b/components/script/dom/range.rs
index 03db51ba0d8..6807a7a2d3c 100644
--- a/components/script/dom/range.rs
+++ b/components/script/dom/range.rs
@@ -23,10 +23,10 @@ use dom::document::Document;
use dom::documentfragment::DocumentFragment;
use dom::node::{Node, UnbindContext};
use dom::text::Text;
+use heapsize::HeapSizeOf;
use js::jsapi::JSTracer;
use std::cell::{Cell, UnsafeCell};
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
-use util::mem::HeapSizeOf;
use util::str::DOMString;
#[dom_struct]
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index e6b7374ef39..59feddfcc22 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -62,7 +62,6 @@ use string_cache::Atom;
use time;
use timers::{ScheduledCallback, TimerHandle};
use url::Url;
-use util::mem::HeapSizeOf;
use util::str::DOMString;
pub type SendParam = BlobOrStringOrURLSearchParams;
@@ -127,11 +126,13 @@ pub struct XMLHttpRequest {
response_xml: MutNullableHeap<JS<Document>>,
#[ignore_heap_size_of = "Defined in hyper"]
response_headers: DOMRefCell<Headers>,
+ #[ignore_heap_size_of = "Defined in hyper"]
override_mime_type: DOMRefCell<Option<Mime>>,
#[ignore_heap_size_of = "Defined in rust-encoding"]
override_charset: DOMRefCell<Option<EncodingRef>>,
// Associated concepts
+ #[ignore_heap_size_of = "Defined in hyper"]
request_method: DOMRefCell<Method>,
request_url: DOMRefCell<Option<Url>>,
#[ignore_heap_size_of = "Defined in hyper"]
diff --git a/components/script/lib.rs b/components/script/lib.rs
index d9bdd742559..dfd11938075 100644
--- a/components/script/lib.rs
+++ b/components/script/lib.rs
@@ -25,6 +25,7 @@
#![doc = "The script crate contains all matters DOM."]
+#![plugin(heapsize_plugin)]
#![plugin(plugins)]
extern crate angle;
@@ -41,6 +42,7 @@ extern crate encoding;
extern crate euclid;
extern crate fnv;
extern crate gfx_traits;
+extern crate heapsize;
extern crate html5ever;
extern crate hyper;
extern crate image;
diff --git a/components/script/mem.rs b/components/script/mem.rs
index 113f03b8396..e276b1a5c3d 100644
--- a/components/script/mem.rs
+++ b/components/script/mem.rs
@@ -6,8 +6,8 @@
use dom::bindings::conversions::get_dom_class;
use dom::bindings::reflector::Reflectable;
+use heapsize::{HeapSizeOf, heap_size_of};
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
// associated box in order to stash their pointers in a reserved slot of their
diff --git a/components/script/textinput.rs b/components/script/textinput.rs
index 5d533f0e419..02fb79e04a8 100644
--- a/components/script/textinput.rs
+++ b/components/script/textinput.rs
@@ -12,7 +12,6 @@ use std::borrow::ToOwned;
use std::cmp::{max, min};
use std::default::Default;
use std::usize;
-use util::mem::HeapSizeOf;
use util::str::DOMString;
#[derive(Copy, Clone, PartialEq)]
diff --git a/components/script/timers.rs b/components/script/timers.rs
index 7f608f98f46..1c1157d30ae 100644
--- a/components/script/timers.rs
+++ b/components/script/timers.rs
@@ -9,6 +9,7 @@ use dom::bindings::reflector::Reflectable;
use dom::bindings::trace::JSTraceable;
use dom::window::ScriptHelpers;
use euclid::length::Length;
+use heapsize::HeapSizeOf;
use ipc_channel::ipc::IpcSender;
use js::jsapi::{HandleValue, Heap, RootedValue};
use js::jsval::{JSVal, UndefinedValue};
@@ -19,7 +20,6 @@ use std::cell::Cell;
use std::cmp::{self, Ord, Ordering};
use std::default::Default;
use std::rc::Rc;
-use util::mem::HeapSizeOf;
use util::str::DOMString;
#[derive(JSTraceable, PartialEq, Eq, Copy, Clone, HeapSizeOf, Hash, PartialOrd, Ord, Debug)]
diff --git a/components/script_traits/Cargo.toml b/components/script_traits/Cargo.toml
index c64b5d8fd1c..8644762b7db 100644
--- a/components/script_traits/Cargo.toml
+++ b/components/script_traits/Cargo.toml
@@ -41,10 +41,12 @@ path = "../devtools_traits"
git = "https://github.com/servo/ipc-channel"
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
+app_units = {version = "0.2", features = ["plugins"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
+heapsize = "0.2.5"
+heapsize_plugin = "0.1.2"
libc = "0.2"
-euclid = {version = "0.4", features = ["plugins"]}
serde = "0.6"
serde_macros = "0.6"
time = "0.1.12"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 9229c626ab6..83761f20090 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -7,7 +7,7 @@
//! to depend on script.
#![feature(custom_derive, plugin)]
-#![plugin(plugins, serde_macros)]
+#![plugin(heapsize_plugin, plugins, serde_macros)]
#![deny(missing_docs)]
extern crate app_units;
@@ -15,6 +15,7 @@ extern crate canvas_traits;
extern crate devtools_traits;
extern crate euclid;
extern crate gfx_traits;
+extern crate heapsize;
extern crate ipc_channel;
extern crate libc;
extern crate msg;
@@ -50,7 +51,6 @@ use profile_traits::mem;
use std::any::Any;
use url::Url;
use util::ipc::OptionalOpaqueIpcSender;
-use util::mem::HeapSizeOf;
pub use script_msg::{LayoutMsg, ScriptMsg};
diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock
index 556bc7d7530..f78d15b3b1b 100644
--- a/components/servo/Cargo.lock
+++ b/components/servo/Cargo.lock
@@ -6,11 +6,12 @@ dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
+ "compiletest_helper 0.0.1",
"compositing 0.0.1",
"devtools 0.0.1",
"devtools_traits 0.0.1",
"env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gfx_tests 0.0.1",
@@ -18,7 +19,7 @@ dependencies = [
"glutin_app 0.0.1",
"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)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"layout 0.0.1",
"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)",
@@ -28,6 +29,7 @@ dependencies = [
"net_traits 0.0.1",
"net_traits_tests 0.0.1",
"offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
+ "plugin_compiletest 0.0.1",
"plugin_tests 0.0.1",
"profile 0.0.1",
"profile_traits 0.0.1",
@@ -74,10 +76,12 @@ dependencies = [
[[package]]
name = "app_units"
-version = "0.1.4"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "euclid 0.4.0 (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)",
"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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -90,22 +94,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "azure"
-version = "0.2.1"
-source = "git+https://github.com/servo/rust-azure#7662f94f0b8c368134a04edac936328d603c7ad8"
+version = "0.4.0"
+source = "git+https://github.com/servo/rust-azure#818581a03542c79d65cc37da984eb6b1a83222a5"
dependencies = [
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (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.4.0 (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)",
- "heapsize 0.2.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)",
"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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -144,13 +148,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "canvas"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"canvas_traits 0.0.1",
- "euclid 0.4.0 (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",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"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)",
"offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
@@ -162,12 +166,14 @@ dependencies = [
name = "canvas_traits"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "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)",
"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)",
- "layers 0.2.0 (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)",
"plugins 0.0.1",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -191,7 +197,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cgl"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -237,25 +243,40 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "compiletest_helper"
+version = "0.0.1"
+dependencies = [
+ "compiletest_rs 0.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
+name = "compiletest_rs"
+version = "0.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "compositing"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
"clipboard 0.1.0 (git+https://github.com/aweinstock314/rust-clipboard)",
"core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
"gleam 0.2.3 (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)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"layout_traits 0.0.1",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@@ -328,10 +349,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cssparser"
-version = "0.5.0"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -372,6 +395,8 @@ name = "devtools_traits"
version = "0.0.1"
dependencies = [
"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)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1",
@@ -518,14 +543,13 @@ dependencies = [
[[package]]
name = "euclid"
-version = "0.4.0"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "heapsize 0.2.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)",
"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)",
- "rand 0.3.12 (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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -584,7 +608,7 @@ dependencies = [
[[package]]
name = "gaol"
version = "0.0.1"
-source = "git+https://github.com/servo/gaol#491dba122d6741ea4e56c754505a69f6319d41e3"
+source = "git+https://github.com/servo/gaol#f1da35779bd3f9d4c0da7dad9c24c22dbf600c48"
dependencies = [
"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)",
@@ -617,20 +641,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "gfx"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (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.4.0 (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)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gfx_traits 0.0.1",
"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)",
- "layers 0.2.0 (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)",
"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)",
@@ -644,10 +670,10 @@ dependencies = [
"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)",
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.3 (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)",
"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",
"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)",
@@ -668,9 +694,11 @@ dependencies = [
name = "gfx_traits"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "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)",
"msg 0.0.1",
"plugins 0.0.1",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -716,16 +744,16 @@ name = "glutin_app"
version = "0.0.1"
dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"compositing 0.0.1",
- "euclid 0.4.0 (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)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"msg 0.0.1",
"net_traits 0.0.1",
"script_traits 0.0.1",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-glutin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-glutin 0.4.9 (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",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -779,7 +807,7 @@ dependencies = [
[[package]]
name = "heapsize"
-version = "0.2.0"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -800,15 +828,17 @@ dependencies = [
[[package]]
name = "html5ever"
-version = "0.4.0"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
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)",
"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_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)",
- "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)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -869,13 +899,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "io-surface"
-version = "0.1.2"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (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)",
+ "leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -899,7 +930,7 @@ name = "js"
version = "0.1.1"
source = "git+https://github.com/servo/rust-mozjs#b96675b217534c7742cbfda8150ea0536aedbdfb"
dependencies = [
- "heapsize 0.2.0 (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)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
@@ -928,21 +959,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "layers"
-version = "0.2.0"
-source = "git+https://github.com/servo/rust-layers#79903a0b38c9684f5f74622532023d4ac51b4f7f"
+version = "0.2.1"
+source = "git+https://github.com/servo/rust-layers#b59247811dd221dcceabef597278eece77996c91"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (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)",
"glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 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)",
+ "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)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -950,16 +983,18 @@ dependencies = [
name = "layout"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 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)",
"layout_traits 0.0.1",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -976,7 +1011,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -1007,6 +1042,19 @@ version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "leak"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "leaky-cow"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "leak 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "libc"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1133,11 +1181,13 @@ name = "msg"
version = "0.0.1"
dependencies = [
"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)",
- "euclid 0.4.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)",
+ "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)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"plugins 0.0.1",
"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)",
@@ -1205,6 +1255,8 @@ dependencies = [
name = "net_traits"
version = "0.0.1"
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)",
"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)",
@@ -1275,11 +1327,11 @@ dependencies = [
[[package]]
name = "offscreen_gl_context"
version = "0.1.0"
-source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#0677179502384f07fced16744dbe5882d9a71dfa"
+source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#aa899f18860c1bdc503350a67cd89fd9e339d392"
dependencies = [
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1368,6 +1420,14 @@ version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "plugin_compiletest"
+version = "0.0.1"
+dependencies = [
+ "compiletest_helper 0.0.1",
+ "plugins 0.0.1",
+]
+
+[[package]]
name = "plugin_tests"
version = "0.0.1"
dependencies = [
@@ -1502,18 +1562,20 @@ name = "script"
version = "0.0.1"
dependencies = [
"angle 0.1.0 (git+https://github.com/ecoal95/angle?branch=servo)",
- "app_units 0.1.4 (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)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
"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",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (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)",
"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)",
"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)",
@@ -1533,7 +1595,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -1557,11 +1619,13 @@ dependencies = [
name = "script_traits"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"devtools_traits 0.0.1",
- "euclid 0.4.0 (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",
+ "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)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@@ -1583,12 +1647,14 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "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)",
"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)",
- "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]]
@@ -1640,12 +1706,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-fontconfig-sys 2.11.2-really.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig-sys 2.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "servo-fontconfig-sys"
-version = "2.11.2-really.1"
+version = "2.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"expat-sys 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1663,11 +1729,11 @@ dependencies = [
[[package]]
name = "servo-glutin"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"android_glue 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1692,20 +1758,20 @@ dependencies = [
[[package]]
name = "servo-skia"
-version = "0.20130412.3"
+version = "0.20130412.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"expat-sys 2.1.2 (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)",
- "io-surface 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)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-glutin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-glutin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1756,10 +1822,12 @@ dependencies = [
[[package]]
name = "string_cache"
-version = "0.2.5"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -1770,12 +1838,14 @@ dependencies = [
name = "style"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (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)",
- "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)",
- "euclid 0.4.0 (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)",
+ "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)",
"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)",
@@ -1786,7 +1856,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -1797,13 +1867,13 @@ dependencies = [
name = "style_tests"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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.2 (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",
"plugins 0.0.1",
"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_traits 0.0.1",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1814,8 +1884,10 @@ dependencies = [
name = "style_traits"
version = "0.0.1"
dependencies = [
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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)",
+ "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)",
"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)",
@@ -1930,6 +2002,8 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -1959,18 +2033,20 @@ dependencies = [
name = "util"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"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)",
- "euclid 0.4.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)",
"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)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"js 0.1.1 (git+https://github.com/servo/rust-mozjs)",
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.0 (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)",
"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)",
@@ -1983,7 +2059,7 @@ dependencies = [
"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)",
"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)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1992,8 +2068,8 @@ dependencies = [
name = "util_tests"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "app_units 0.2.0 (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)",
"plugins 0.0.1",
"util 0.0.1",
@@ -2167,7 +2243,7 @@ dependencies = [
"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)",
"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)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml
index 6bc74146cbc..1b0a92ff94e 100644
--- a/components/servo/Cargo.toml
+++ b/components/servo/Cargo.toml
@@ -41,6 +41,12 @@ path = "../../tests/unit/style"
[dev-dependencies.util_tests]
path = "../../tests/unit/util"
+[dev-dependencies.compiletest_helper]
+path = "../../tests/compiletest/helper"
+
+[dev-dependencies.plugin_compiletest]
+path = "../../tests/compiletest/plugin"
+
[[test]]
name = "reftest"
path = "../../tests/reftest.rs"
@@ -157,8 +163,8 @@ version = "0.2"
git = "https://github.com/ecoal95/rust-offscreen-rendering-context"
[dependencies]
-env_logger = "0.3"
bitflags = "0.3"
+env_logger = "0.3"
+euclid = {version = "0.6.1", features = ["plugins"]}
libc = "0.2"
-url = {version = "0.5.4", features = ["serde_serialization", "query_encoding"]}
-euclid = {version = "0.4", features = ["plugins"]}
+url = {version = "0.5.4", features = ["heap_size", "serde_serialization", "query_encoding"]}
diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml
index 1eeabf4ddc7..85a300d17d6 100644
--- a/components/style/Cargo.toml
+++ b/components/style/Cargo.toml
@@ -19,22 +19,24 @@ path = "../util"
path = "../style_traits"
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
-cssparser = { version = "0.5", features = [ "serde-serialization" ] }
+app_units = {version = "0.2", features = ["plugins"]}
+cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
log = "0.3"
encoding = "0.2"
fnv = "1.0"
+heapsize = "0.2.5"
+heapsize_plugin = "0.1.2"
rustc-serialize = "0.3"
matches = "0.1"
bitflags = "0.3"
num = "0.1.24"
lazy_static = "0.1.10"
-selectors = { version = "0.4.1", features = ["unstable"] }
+selectors = {version = "0.4.1", features = ["heap_size", "unstable"]}
smallvec = "0.1"
-string_cache = "0.2"
-euclid = {version = "0.4", features = ["plugins"]}
+string_cache = {version = "0.2.7", features = ["heap_size"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
serde = "0.6"
serde_macros = "0.6"
time = "0.1"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs
index af9a2c4e7da..26fc794afb3 100644
--- a/components/style/custom_properties.rs
+++ b/components/style/custom_properties.rs
@@ -10,7 +10,6 @@ use std::collections::{HashMap, HashSet};
use std::fmt;
use std::sync::Arc;
use string_cache::Atom;
-use util::mem::HeapSizeOf;
// Does not include the `--` prefix
pub type Name = Atom;
diff --git a/components/style/font_face.rs b/components/style/font_face.rs
index d42e0feb3e9..0810afac5a8 100644
--- a/components/style/font_face.rs
+++ b/components/style/font_face.rs
@@ -8,7 +8,6 @@ use parser::{ParserContext, log_css_error};
use properties::longhands::font_family::parse_one_family;
use std::ascii::AsciiExt;
use url::Url;
-use util::mem::HeapSizeOf;
#[derive(Clone, Debug, HeapSizeOf, PartialEq, Eq, Deserialize, Serialize)]
pub enum Source {
diff --git a/components/style/lib.rs b/components/style/lib.rs
index dee1d51efc6..6dbb7250ffc 100644
--- a/components/style/lib.rs
+++ b/components/style/lib.rs
@@ -11,9 +11,9 @@
#![feature(custom_derive)]
#![feature(plugin)]
-#![plugin(serde_macros)]
-#![plugin(serde_macros)]
+#![plugin(heapsize_plugin)]
#![plugin(plugins)]
+#![plugin(serde_macros)]
#![recursion_limit = "500"] // For match_ignore_ascii_case in PropertyDeclaration::parse
@@ -26,6 +26,7 @@ extern crate cssparser;
extern crate encoding;
extern crate euclid;
extern crate fnv;
+extern crate heapsize;
#[macro_use]
extern crate lazy_static;
#[macro_use]
diff --git a/components/style/media_queries.rs b/components/style/media_queries.rs
index 82b02cc9701..b19b4d81c7e 100644
--- a/components/style/media_queries.rs
+++ b/components/style/media_queries.rs
@@ -8,7 +8,6 @@ use euclid::size::{Size2D, TypedSize2D};
use properties::longhands;
use std::ascii::AsciiExt;
use util::geometry::ViewportPx;
-use util::mem::HeapSizeOf;
use values::specified;
diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs
index ac6722b6321..46d121c4fb3 100644
--- a/components/style/properties.mako.rs
+++ b/components/style/properties.mako.rs
@@ -6958,6 +6958,12 @@ pub fn modify_style_for_text(style: &mut Arc<ComputedValues>) {
padding.padding_bottom = computed::LengthOrPercentage::Length(Au(0));
padding.padding_left = computed::LengthOrPercentage::Length(Au(0));
}
+
+ if style.effects.opacity != 1.0 {
+ let mut style = Arc::make_mut(style);
+ let mut effects = Arc::make_mut(&mut style.effects);
+ effects.opacity = 1.0;
+ }
}
/// Adjusts the `margin` property as necessary to account for the text of an `input` element.
diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs
index ce21cf68522..bc4008040c2 100644
--- a/components/style/stylesheets.rs
+++ b/components/style/stylesheets.rs
@@ -19,7 +19,6 @@ use std::iter::Iterator;
use std::slice;
use string_cache::{Atom, Namespace};
use url::Url;
-use util::mem::HeapSizeOf;
use viewport::ViewportRule;
diff --git a/components/style/traversal.rs b/components/style/traversal.rs
index d39da40f03e..781c99f619e 100644
--- a/components/style/traversal.rs
+++ b/components/style/traversal.rs
@@ -2,13 +2,11 @@
* 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 context::{LocalStyleContext, SharedStyleContext, StyleContext};
+use context::{SharedStyleContext, StyleContext};
use dom::{OpaqueNode, TNode, TRestyleDamage, UnsafeNode};
use matching::{ApplicableDeclarations, ElementMatchMethods, MatchMethods, StyleSharingResult};
use selectors::bloom::BloomFilter;
use std::cell::RefCell;
-use std::mem;
-use std::rc::Rc;
use util::opts;
use util::tid::tid;
@@ -115,47 +113,6 @@ pub trait DomTraversalContext<'ln, N: TNode<'ln>> {
fn process_postorder(&self, node: N);
}
-pub struct StandaloneStyleContext<'a> {
- pub shared: &'a SharedStyleContext,
- cached_local_style_context: Rc<LocalStyleContext>,
-}
-
-impl<'a> StandaloneStyleContext<'a> {
- pub fn new(_: &'a SharedStyleContext) -> Self { panic!("Not implemented") }
-}
-
-impl<'a> StyleContext<'a> for StandaloneStyleContext<'a> {
- fn shared_context(&self) -> &'a SharedStyleContext {
- &self.shared
- }
-
- fn local_context(&self) -> &LocalStyleContext {
- &self.cached_local_style_context
- }
-}
-
-pub struct RecalcStyleOnly<'lc> {
- context: StandaloneStyleContext<'lc>,
- root: OpaqueNode,
-}
-
-impl<'lc, 'ln, N: TNode<'ln>> DomTraversalContext<'ln, N> for RecalcStyleOnly<'lc> {
- type SharedContext = SharedStyleContext;
- #[allow(unsafe_code)]
- fn new<'a>(shared: &'a Self::SharedContext, root: OpaqueNode) -> Self {
- // See the comment in RecalcStyleAndConstructFlows::new for an explanation of why this is
- // necessary.
- let shared_lc: &'lc SharedStyleContext = unsafe { mem::transmute(shared) };
- RecalcStyleOnly {
- context: StandaloneStyleContext::new(shared_lc),
- root: root,
- }
- }
-
- fn process_preorder(&self, node: N) { recalc_style_at(&self.context, self.root, node); }
- fn process_postorder(&self, _: N) {}
-}
-
/// The recalc-style-for-node traversal, which styles each node and must run before
/// layout computation. This computes the styles applied to each node.
#[inline]
diff --git a/components/style/viewport.rs b/components/style/viewport.rs
index e46d22c19b1..f50a2a5fb2b 100644
--- a/components/style/viewport.rs
+++ b/components/style/viewport.rs
@@ -18,7 +18,6 @@ use std::str::Chars;
use style_traits::viewport::{Orientation, UserZoom, ViewportConstraints, Zoom};
use stylesheets::Origin;
use util::geometry::ViewportPx;
-use util::mem::HeapSizeOf;
use values::computed::{Context, ToComputedValue};
use values::specified::{Length, LengthOrPercentageOrAuto, ViewportPercentageLength};
diff --git a/components/style_traits/Cargo.toml b/components/style_traits/Cargo.toml
index 35cc6eb6ed5..4d4ce440488 100644
--- a/components/style_traits/Cargo.toml
+++ b/components/style_traits/Cargo.toml
@@ -14,14 +14,15 @@ path = "../util"
path = "../plugins"
[dependencies]
-cssparser = { version = "0.5", features = [ "serde-serialization" ] }
-euclid = {version = "0.4", features = ["plugins"]}
-log = "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"
lazy_static = "0.1.10"
+log = "0.3"
num = "0.1.24"
rustc-serialize = "0.3"
-selectors = "0.4.1"
+selectors = {version = "0.4.1", features = ["heap_size"]}
serde = "0.6"
serde_macros = "0.6"
-url = "0.5.4"
-
+url = {version = "0.5.4", features = ["heap_size"]}
diff --git a/components/style_traits/lib.rs b/components/style_traits/lib.rs
index 5a56874514d..9e65308207e 100644
--- a/components/style_traits/lib.rs
+++ b/components/style_traits/lib.rs
@@ -10,6 +10,7 @@
#![crate_type = "rlib"]
#![feature(custom_derive)]
#![feature(plugin)]
+#![plugin(heapsize_plugin)]
#![plugin(serde_macros)]
#![plugin(plugins)]
#![deny(unsafe_code)]
@@ -17,6 +18,7 @@
#[macro_use]
extern crate cssparser;
extern crate euclid;
+extern crate heapsize;
extern crate rustc_serialize;
extern crate serde;
extern crate util;
diff --git a/components/util/Cargo.toml b/components/util/Cargo.toml
index a84378f48d2..6d5ef0714a8 100644
--- a/components/util/Cargo.toml
+++ b/components/util/Cargo.toml
@@ -45,26 +45,28 @@ optional = true
git = "https://github.com/servo/ipc-channel"
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
-cssparser = { version = "0.5", features = [ "serde-serialization" ] }
-log = "0.3"
+app_units = {version = "0.2", features = ["plugins"]}
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"
+log = "0.3"
+num = "0.1.24"
+num_cpus = "0.2.2"
rand = "0.3"
rustc-serialize = "0.3"
-smallvec = "0.1"
-num_cpus = "0.2.2"
-num = "0.1.24"
-euclid = {version = "0.4", features = ["plugins"]}
-selectors = "0.4.1"
+selectors = {version = "0.4.1", features = ["heap_size"]}
serde = "0.6"
serde_macros = "0.6"
-string_cache = "0.2"
-lazy_static = "0.1"
-getopts = "0.2.11"
-hyper = { version = "0.7", optional = true }
-url = {version = "0.5.4", features = ["serde_serialization"]}
+smallvec = "0.1"
+string_cache = {version = "0.2.7", features = ["heap_size"]}
+url = {version = "0.5.4", features = ["heap_size", "serde_serialization"]}
uuid = "0.1.17"
[target.x86_64-pc-windows-gnu.dependencies]
diff --git a/components/util/cursor.rs b/components/util/cursor.rs
index fa7ceb413c6..7f139fd498e 100644
--- a/components/util/cursor.rs
+++ b/components/util/cursor.rs
@@ -9,7 +9,7 @@ use std::ascii::AsciiExt;
macro_rules! define_cursor {
($( $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)]
pub enum Cursor {
$( $variant = $value ),+
diff --git a/components/util/geometry.rs b/components/util/geometry.rs
index 4af85d703c9..813cad3aa3d 100644
--- a/components/util/geometry.rs
+++ b/components/util/geometry.rs
@@ -23,7 +23,7 @@ use std::i32;
///
/// The ratio between ScreenPx and DevicePixel for a given display be found by calling
/// `servo::windowing::WindowMethods::hidpi_factor`.
-#[derive(Debug, Copy, Clone)]
+#[derive(Clone, Copy, Debug, HeapSizeOf)]
pub enum ScreenPx {}
/// 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
/// 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 {}
/// 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
/// viewport zoom is not equal to 1.0, then the layout viewport is no longer the same physical size
/// as the viewable area.
-#[derive(RustcEncodable, Debug, Copy, Clone)]
+#[derive(Clone, Copy, Debug, HeapSizeOf)]
pub enum PagePx {}
// In summary, the hierarchy of pixel units and the factors to convert from one to the next:
diff --git a/components/util/lib.rs b/components/util/lib.rs
index 01e46727238..34e8883d02b 100644
--- a/components/util/lib.rs
+++ b/components/util/lib.rs
@@ -17,7 +17,7 @@
#![feature(step_trait)]
#![feature(zero_one)]
-#![plugin(plugins, serde_macros)]
+#![plugin(heapsize_plugin, plugins, serde_macros)]
extern crate alloc;
extern crate app_units;
@@ -29,6 +29,7 @@ extern crate bitflags;
extern crate cssparser;
extern crate euclid;
extern crate getopts;
+extern crate heapsize;
#[cfg(feature = "non-geckolib")]
extern crate html5ever;
#[cfg(feature = "non-geckolib")]
@@ -65,7 +66,6 @@ pub mod geometry;
pub mod ipc;
pub mod linked_list;
pub mod logical_geometry;
-#[macro_use] pub mod mem;
#[cfg(feature = "non-geckolib")]
pub mod non_geckolib;
pub mod opts;
diff --git a/components/util/logical_geometry.rs b/components/util/logical_geometry.rs
index 0c4372ce7f2..661ef0c6a65 100644
--- a/components/util/logical_geometry.rs
+++ b/components/util/logical_geometry.rs
@@ -11,7 +11,7 @@ use std::fmt::{self, Debug, Error, Formatter};
use std::ops::{Add, Sub};
bitflags!(
- #[derive(RustcEncodable)]
+ #[derive(HeapSizeOf, RustcEncodable)]
flags WritingMode: u8 {
const FLAG_RTL = 1 << 0,
const FLAG_VERTICAL = 1 << 1,
diff --git a/components/util/mem.rs b/components/util/mem.rs
deleted file mode 100644
index b5654b24123..00000000000
--- a/components/util/mem.rs
+++ /dev/null
@@ -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);
diff --git a/components/util/non_geckolib.rs b/components/util/non_geckolib.rs
index cb047a0ec18..ff09ca5c983 100644
--- a/components/util/non_geckolib.rs
+++ b/components/util/non_geckolib.rs
@@ -4,20 +4,10 @@
///! Miscellaneous Code which depends on large libraries that we don't
/// 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::jsapi::{JSContext, JSString, HandleValue, Heap, MutableHandleValue};
+use js::jsapi::{JSContext, JSString, HandleValue, MutableHandleValue};
use js::jsapi::{JS_GetTwoByteStringCharsAndLength, JS_StringHasLatin1Chars};
-use js::jsval::JSVal;
-use js::rust::{GCMethods, ToString};
-use layers::geometry::DevicePixel;
-use mem::HeapSizeOf;
+use js::rust::ToString;
use opts;
use std::char;
use std::ptr;
@@ -99,73 +89,3 @@ pub unsafe fn jsstring_to_str(cx: *mut JSContext, s: *mut JSString) -> DOMString
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);
diff --git a/components/util/range.rs b/components/util/range.rs
index 07e66b28a6f..8149a1f424c 100644
--- a/components/util/range.rs
+++ b/components/util/range.rs
@@ -136,7 +136,7 @@ macro_rules! int_range_index {
}
/// A range of indices
-#[derive(Clone, RustcEncodable, Copy, Deserialize, Serialize)]
+#[derive(Clone, Copy, Deserialize, HeapSizeOf, RustcEncodable, Serialize)]
pub struct Range<I> {
begin: I,
length: I,
diff --git a/components/util/str.rs b/components/util/str.rs
index dc3b8df1762..8ffcf67b0e9 100644
--- a/components/util/str.rs
+++ b/components/util/str.rs
@@ -16,7 +16,7 @@ use std::iter::{Filter, Peekable};
use std::ops::{Deref, DerefMut};
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);
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 {
Auto,
Percentage(f32),
diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml
index d489479bc61..20e4ff5c7a4 100644
--- a/components/webdriver_server/Cargo.toml
+++ b/components/webdriver_server/Cargo.toml
@@ -31,5 +31,5 @@ log = "0.3"
hyper = "0.7"
rustc-serialize = "0.3.4"
regex = "0.1.33"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
uuid = "0.1"
diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock
index 992e42a942e..796fcb6d639 100644
--- a/ports/cef/Cargo.lock
+++ b/ports/cef/Cargo.lock
@@ -2,20 +2,20 @@
name = "embedding"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cocoa 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"compositing 0.0.1",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools 0.0.1",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glutin_app 0.0.1",
"js 0.1.1 (git+https://github.com/servo/rust-mozjs)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"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)",
"msg 0.0.1",
@@ -64,10 +64,12 @@ dependencies = [
[[package]]
name = "app_units"
-version = "0.1.4"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "euclid 0.4.0 (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)",
"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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -80,22 +82,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "azure"
-version = "0.2.1"
-source = "git+https://github.com/servo/rust-azure#7662f94f0b8c368134a04edac936328d603c7ad8"
+version = "0.4.0"
+source = "git+https://github.com/servo/rust-azure#818581a03542c79d65cc37da984eb6b1a83222a5"
dependencies = [
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (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.4.0 (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)",
- "heapsize 0.2.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)",
"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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -134,13 +136,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "canvas"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"canvas_traits 0.0.1",
- "euclid 0.4.0 (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",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"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)",
"offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
@@ -152,12 +154,14 @@ dependencies = [
name = "canvas_traits"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "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)",
"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)",
- "layers 0.2.0 (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)",
"plugins 0.0.1",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -181,7 +185,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cgl"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -212,17 +216,6 @@ dependencies = [
[[package]]
name = "cocoa"
-version = "0.1.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "objc 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "cocoa"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
@@ -241,22 +234,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "compositing"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
"clipboard 0.1.0 (git+https://github.com/aweinstock314/rust-clipboard)",
"core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
"gleam 0.2.3 (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)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"layout_traits 0.0.1",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@@ -329,10 +322,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cssparser"
-version = "0.5.0"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -373,6 +368,8 @@ name = "devtools_traits"
version = "0.0.1"
dependencies = [
"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)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1",
@@ -486,14 +483,13 @@ dependencies = [
[[package]]
name = "euclid"
-version = "0.4.0"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "heapsize 0.2.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)",
"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)",
- "rand 0.3.12 (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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -552,7 +548,7 @@ dependencies = [
[[package]]
name = "gaol"
version = "0.0.1"
-source = "git+https://github.com/servo/gaol#491dba122d6741ea4e56c754505a69f6319d41e3"
+source = "git+https://github.com/servo/gaol#f1da35779bd3f9d4c0da7dad9c24c22dbf600c48"
dependencies = [
"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)",
@@ -585,20 +581,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "gfx"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (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.4.0 (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)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gfx_traits 0.0.1",
"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)",
- "layers 0.2.0 (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)",
"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)",
@@ -612,10 +610,10 @@ dependencies = [
"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)",
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.3 (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)",
"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",
"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)",
@@ -627,9 +625,11 @@ dependencies = [
name = "gfx_traits"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "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)",
"msg 0.0.1",
"plugins 0.0.1",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -675,16 +675,16 @@ name = "glutin_app"
version = "0.0.1"
dependencies = [
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"compositing 0.0.1",
- "euclid 0.4.0 (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)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"msg 0.0.1",
"net_traits 0.0.1",
"script_traits 0.0.1",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-glutin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-glutin 0.4.9 (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",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -738,7 +738,7 @@ dependencies = [
[[package]]
name = "heapsize"
-version = "0.2.0"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -759,15 +759,17 @@ dependencies = [
[[package]]
name = "html5ever"
-version = "0.4.0"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
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)",
"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_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)",
- "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)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -828,13 +830,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "io-surface"
-version = "0.1.2"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (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)",
+ "leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -858,7 +861,7 @@ name = "js"
version = "0.1.1"
source = "git+https://github.com/servo/rust-mozjs#b96675b217534c7742cbfda8150ea0536aedbdfb"
dependencies = [
- "heapsize 0.2.0 (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)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
@@ -887,21 +890,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "layers"
-version = "0.2.0"
-source = "git+https://github.com/servo/rust-layers#79903a0b38c9684f5f74622532023d4ac51b4f7f"
+version = "0.2.1"
+source = "git+https://github.com/servo/rust-layers#b59247811dd221dcceabef597278eece77996c91"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (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)",
"glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 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)",
+ "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)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -909,16 +914,18 @@ dependencies = [
name = "layout"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 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)",
"layout_traits 0.0.1",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -935,7 +942,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -966,6 +973,19 @@ version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "leak"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "leaky-cow"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "leak 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "libc"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1092,11 +1112,13 @@ name = "msg"
version = "0.0.1"
dependencies = [
"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)",
- "euclid 0.4.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)",
+ "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)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"plugins 0.0.1",
"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)",
@@ -1146,6 +1168,8 @@ dependencies = [
name = "net_traits"
version = "0.0.1"
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)",
"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)",
@@ -1209,11 +1233,11 @@ dependencies = [
[[package]]
name = "offscreen_gl_context"
version = "0.1.0"
-source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#0677179502384f07fced16744dbe5882d9a71dfa"
+source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#aa899f18860c1bdc503350a67cd89fd9e339d392"
dependencies = [
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1426,18 +1450,20 @@ name = "script"
version = "0.0.1"
dependencies = [
"angle 0.1.0 (git+https://github.com/ecoal95/angle?branch=servo)",
- "app_units 0.1.4 (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)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
"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",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (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)",
"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)",
"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)",
@@ -1457,7 +1483,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -1472,11 +1498,13 @@ dependencies = [
name = "script_traits"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"devtools_traits 0.0.1",
- "euclid 0.4.0 (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",
+ "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)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@@ -1498,12 +1526,14 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "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)",
"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)",
- "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]]
@@ -1552,13 +1582,13 @@ dependencies = [
"devtools 0.0.1",
"devtools_traits 0.0.1",
"env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"glutin_app 0.0.1",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"layout 0.0.1",
"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)",
@@ -1590,12 +1620,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-fontconfig-sys 2.11.2-really.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig-sys 2.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "servo-fontconfig-sys"
-version = "2.11.2-really.1"
+version = "2.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"expat-sys 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1613,11 +1643,11 @@ dependencies = [
[[package]]
name = "servo-glutin"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"android_glue 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1642,20 +1672,20 @@ dependencies = [
[[package]]
name = "servo-skia"
-version = "0.20130412.3"
+version = "0.20130412.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"expat-sys 2.1.2 (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)",
- "io-surface 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)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-glutin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-glutin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1706,10 +1736,12 @@ dependencies = [
[[package]]
name = "string_cache"
-version = "0.2.5"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -1720,12 +1752,14 @@ dependencies = [
name = "style"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (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)",
- "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)",
- "euclid 0.4.0 (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)",
+ "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)",
"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)",
@@ -1736,7 +1770,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -1747,8 +1781,10 @@ dependencies = [
name = "style_traits"
version = "0.0.1"
dependencies = [
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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)",
+ "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)",
"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)",
@@ -1863,6 +1899,8 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -1892,18 +1930,20 @@ dependencies = [
name = "util"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"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)",
- "euclid 0.4.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)",
"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)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"js 0.1.1 (git+https://github.com/servo/rust-mozjs)",
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.0 (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)",
"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)",
@@ -1916,7 +1956,7 @@ dependencies = [
"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)",
"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)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2089,7 +2129,7 @@ dependencies = [
"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)",
"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)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
diff --git a/ports/cef/Cargo.toml b/ports/cef/Cargo.toml
index 8ab630ba0ab..a47bfe10e21 100644
--- a/ports/cef/Cargo.toml
+++ b/ports/cef/Cargo.toml
@@ -9,12 +9,12 @@ path = "lib.rs"
crate-type = ["dylib"]
[dependencies]
-euclid = {version = "0.4", features = ["plugins"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
gleam = "0.2"
libc = "0.2"
log = "0.3"
stb_image = "0.2"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
[dependencies.servo]
path = "../../components/servo"
@@ -66,7 +66,7 @@ features = ["plugins"]
[target.x86_64-apple-darwin.dependencies]
objc = "0.1"
-cocoa = "0.1"
+cocoa = "0.2"
core-foundation = "0.2"
core-graphics = "0.2"
core-text = "1.0"
diff --git a/ports/geckolib/Cargo.lock b/ports/geckolib/Cargo.lock
index 4bf142732e7..723c8b24092 100644
--- a/ports/geckolib/Cargo.lock
+++ b/ports/geckolib/Cargo.lock
@@ -2,16 +2,16 @@
name = "geckoservo"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (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)",
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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)",
"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)",
"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)",
"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",
"url 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1",
@@ -28,10 +28,12 @@ dependencies = [
[[package]]
name = "app_units"
-version = "0.1.4"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "euclid 0.4.0 (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)",
"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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -65,10 +67,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cssparser"
-version = "0.5.0"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -141,14 +145,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "euclid"
-version = "0.4.0"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "heapsize 0.2.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)",
"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)",
- "rand 0.3.12 (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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -166,7 +169,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "heapsize"
-version = "0.2.0"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -316,12 +319,14 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "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)",
"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)",
- "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]]
@@ -357,10 +362,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "string_cache"
-version = "0.2.5"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -371,12 +378,14 @@ dependencies = [
name = "style"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (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)",
- "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)",
- "euclid 0.4.0 (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)",
+ "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)",
"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)",
@@ -387,7 +396,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -398,8 +407,10 @@ dependencies = [
name = "style_traits"
version = "0.0.1"
dependencies = [
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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)",
+ "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)",
"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)",
@@ -453,6 +464,8 @@ name = "url"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
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)",
"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)",
@@ -465,11 +478,13 @@ dependencies = [
name = "util"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (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)",
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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)",
"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)",
"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)",
@@ -484,7 +499,7 @@ dependencies = [
"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)",
"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)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
diff --git a/ports/geckolib/Cargo.toml b/ports/geckolib/Cargo.toml
index c25ac6bfba9..5a511a004c0 100644
--- a/ports/geckolib/Cargo.toml
+++ b/ports/geckolib/Cargo.toml
@@ -9,17 +9,17 @@ path = "lib.rs"
crate-type = ["staticlib"]
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
+app_units = {version = "0.2", features = ["plugins"]}
bitflags = "0.3"
-cssparser = { version = "0.5", features = [ "serde-serialization" ] }
-euclid = {version = "0.4", features = ["plugins"]}
+cssparser = {version = "0.5.2", features = ["heap_size", "serde-serialization"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
libc = "0.2"
log = "0.3"
num_cpus = "0.2.2"
-selectors = "0.4.1"
+selectors = {version = "0.4.1", features = ["heap_size"]}
smallvec = "0.1"
-string_cache = "0.2"
-url = "0.5.4"
+string_cache = {version = "0.2.7", features = ["heap_size"]}
+url = {version = "0.5.4", features = ["heap_size"]}
[dependencies.util]
path = "../../components/util"
diff --git a/ports/geckolib/bindings.rs b/ports/geckolib/bindings.rs
index 96a5cb40705..845cca32e13 100644
--- a/ports/geckolib/bindings.rs
+++ b/ports/geckolib/bindings.rs
@@ -28,19 +28,22 @@ pub type intptr_t = int64_t;
pub type uintptr_t = uint64_t;
pub type intmax_t = ::libc::c_long;
pub type uintmax_t = ::libc::c_ulong;
-pub type Enum_NodeType = ::libc::c_uint;
-pub const ELEMENT_NODE: ::libc::c_uint = 1;
-pub const ATTRIBUTE_NODE: ::libc::c_uint = 2;
-pub const TEXT_NODE: ::libc::c_uint = 3;
-pub const CDATA_SECTION_NODE: ::libc::c_uint = 4;
-pub const ENTITY_REFERENCE_NODE: ::libc::c_uint = 5;
-pub const ENTITY_NODE: ::libc::c_uint = 6;
-pub const PROCESSING_INSTRUCTION_NODE: ::libc::c_uint = 7;
-pub const COMMENT_NODE: ::libc::c_uint = 8;
-pub const DOCUMENT_NODE: ::libc::c_uint = 9;
-pub const DOCUMENT_TYPE_NODE: ::libc::c_uint = 10;
-pub const DOCUMENT_FRAGMENT_NODE: ::libc::c_uint = 11;
-pub const NOTATION_NODE: ::libc::c_uint = 12;
+#[derive(Clone, Copy)]
+#[repr(u32)]
+pub enum Enum_NodeType {
+ ELEMENT_NODE = 1,
+ ATTRIBUTE_NODE = 2,
+ TEXT_NODE = 3,
+ CDATA_SECTION_NODE = 4,
+ ENTITY_REFERENCE_NODE = 5,
+ ENTITY_NODE = 6,
+ PROCESSING_INSTRUCTION_NODE = 7,
+ COMMENT_NODE = 8,
+ DOCUMENT_NODE = 9,
+ DOCUMENT_TYPE_NODE = 10,
+ DOCUMENT_FRAGMENT_NODE = 11,
+ NOTATION_NODE = 12,
+}
pub enum Struct_RawGeckoNode { }
pub type RawGeckoNode = Struct_RawGeckoNode;
pub enum Struct_RawGeckoElement { }
@@ -49,10 +52,15 @@ pub enum Struct_RawGeckoDocument { }
pub type RawGeckoDocument = Struct_RawGeckoDocument;
pub enum Struct_ServoNodeData { }
pub type ServoNodeData = Struct_ServoNodeData;
+pub enum Struct_ServoArcStyleSheet { }
+pub type ServoArcStyleSheet = Struct_ServoArcStyleSheet;
+pub enum Struct_ServoStyleSetData { }
+pub type ServoStyleSetData = Struct_ServoStyleSetData;
extern "C" {
pub fn Gecko_ElementState(element: *mut RawGeckoElement) -> uint8_t;
- pub fn Gecko_GetAttrAsUTF8(element: *mut RawGeckoElement, ns: *const uint8_t,
- name: *const uint8_t, length: *mut uint32_t)
+ pub fn Gecko_GetAttrAsUTF8(element: *mut RawGeckoElement,
+ ns: *const uint8_t, name: *const uint8_t,
+ length: *mut uint32_t)
-> *const ::libc::c_char;
pub fn Gecko_ChildrenCount(node: *mut RawGeckoNode) -> uint32_t;
pub fn Gecko_GetDocumentElement(document: *mut RawGeckoDocument)
@@ -61,21 +69,50 @@ extern "C" {
pub fn Gecko_GetLastChild(node: *mut RawGeckoNode) -> *mut RawGeckoNode;
pub fn Gecko_GetPrevSibling(node: *mut RawGeckoNode) -> *mut RawGeckoNode;
pub fn Gecko_GetNextSibling(node: *mut RawGeckoNode) -> *mut RawGeckoNode;
+ pub fn Gecko_GetParentElement(element: *mut RawGeckoElement)
+ -> *mut RawGeckoElement;
+ pub fn Gecko_GetFirstChildElement(element: *mut RawGeckoElement)
+ -> *mut RawGeckoElement;
+ pub fn Gecko_GetLastChildElement(element: *mut RawGeckoElement)
+ -> *mut RawGeckoElement;
+ pub fn Gecko_GetPrevSiblingElement(element: *mut RawGeckoElement)
+ -> *mut RawGeckoElement;
+ pub fn Gecko_GetNextSiblingElement(element: *mut RawGeckoElement)
+ -> *mut RawGeckoElement;
pub fn Gecko_GetNodeData(node: *mut RawGeckoNode) -> *mut ServoNodeData;
pub fn Gecko_GetParentNode(node: *mut RawGeckoNode) -> *mut RawGeckoNode;
- pub fn Gecko_LocalName(element: *mut RawGeckoElement, length: *mut uint32_t)
- -> *const uint16_t;
+ pub fn Gecko_LocalName(element: *mut RawGeckoElement,
+ length: *mut uint32_t) -> *const uint16_t;
pub fn Gecko_IsHTMLElementInHTMLDocument(element: *mut RawGeckoElement)
-> ::libc::c_int;
pub fn Gecko_IsLink(element: *mut RawGeckoElement) -> ::libc::c_int;
pub fn Gecko_IsTextNode(node: *mut RawGeckoNode) -> ::libc::c_int;
- pub fn Gecko_IsVisitedLink(element: *mut RawGeckoElement) -> ::libc::c_int;
- pub fn Gecko_IsUnvisitedLink(element: *mut RawGeckoElement) -> ::libc::c_int;
- pub fn Gecko_Namespace(element: *mut RawGeckoElement, length: *mut uint32_t)
- -> *const uint16_t;
+ pub fn Gecko_IsVisitedLink(element: *mut RawGeckoElement)
+ -> ::libc::c_int;
+ pub fn Gecko_IsUnvisitedLink(element: *mut RawGeckoElement)
+ -> ::libc::c_int;
+ pub fn Gecko_IsRootElement(element: *mut RawGeckoElement)
+ -> ::libc::c_int;
+ pub fn Gecko_Namespace(element: *mut RawGeckoElement,
+ length: *mut uint32_t) -> *const uint16_t;
pub fn Gecko_NodeIsElement(node: *mut RawGeckoNode) -> ::libc::c_int;
pub fn Gecko_SetNodeData(node: *mut RawGeckoNode,
- data: *mut ServoNodeData) -> ();
- pub fn Servo_RestyleDocument(aDoc: *mut RawGeckoDocument) -> ();
- pub fn Servo_DropNodeData(data: *mut ServoNodeData) -> ();
+ data: *mut ServoNodeData);
+ pub fn Servo_RestyleDocument(doc: *mut RawGeckoDocument,
+ data: *mut ServoStyleSetData);
+ pub fn Servo_DropNodeData(data: *mut ServoNodeData);
+ pub fn Servo_StylesheetFromUTF8Bytes(bytes: *const uint8_t,
+ length: uint32_t)
+ -> *mut ServoArcStyleSheet;
+ pub fn Servo_AppendStyleSheet(sheet: *mut ServoArcStyleSheet,
+ data: *mut ServoStyleSetData);
+ pub fn Servo_PrependStyleSheet(sheet: *mut ServoArcStyleSheet,
+ data: *mut ServoStyleSetData);
+ pub fn Servo_RemoveStyleSheet(sheet: *mut ServoArcStyleSheet,
+ data: *mut ServoStyleSetData);
+ pub fn Servo_StyleSheetHasRules(sheet: *mut ServoArcStyleSheet)
+ -> ::libc::c_int;
+ pub fn Servo_DropStylesheet(sheet: *mut ServoArcStyleSheet);
+ pub fn Servo_InitStyleSetData() -> *mut ServoStyleSetData;
+ pub fn Servo_DropStyleSetData(data: *mut ServoStyleSetData);
}
diff --git a/ports/geckolib/data.rs b/ports/geckolib/data.rs
new file mode 100644
index 00000000000..3e78c6c87ae
--- /dev/null
+++ b/ports/geckolib/data.rs
@@ -0,0 +1,75 @@
+/* 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 bindings::ServoStyleSetData;
+use euclid::Size2D;
+use euclid::size::TypedSize2D;
+use num_cpus;
+use std::cmp;
+use std::collections::HashMap;
+use std::sync::mpsc::{channel, Receiver, Sender};
+use std::sync::{Arc, RwLock};
+use style::animation::Animation;
+use style::context::SharedStyleContext;
+use style::dom::OpaqueNode;
+use style::media_queries::{Device, MediaType};
+use style::parallel::WorkQueueData;
+use style::selector_matching::Stylist;
+use style::stylesheets::Stylesheet;
+use util::geometry::ViewportPx;
+use util::thread_state;
+use util::workqueue::WorkQueue;
+
+pub struct PerDocumentStyleData {
+
+ /// Rule processor.
+ pub stylist: Stylist,
+
+ /// List of stylesheets, mirrored from Gecko.
+ pub stylesheets: Vec<Arc<Stylesheet>>,
+
+ /// Whether the stylesheets list above has changed since the last restyle.
+ pub stylesheets_changed: bool,
+
+ // FIXME(bholley): Hook these up to something.
+ pub new_animations_sender: Sender<Animation>,
+ pub new_animations_receiver: Receiver<Animation>,
+ pub running_animations: Arc<RwLock<HashMap<OpaqueNode, Vec<Animation>>>>,
+ pub expired_animations: Arc<RwLock<HashMap<OpaqueNode, Vec<Animation>>>>,
+
+ // FIXME(bholley): This shouldn't be per-document.
+ pub work_queue: WorkQueue<SharedStyleContext, WorkQueueData>,
+}
+
+impl PerDocumentStyleData {
+ pub fn new() -> PerDocumentStyleData {
+ // FIXME(bholley): Real window size.
+ let window_size: TypedSize2D<ViewportPx, f32> = Size2D::typed(800.0, 600.0);
+ let device = Device::new(MediaType::Screen, window_size);
+
+ let (new_anims_sender, new_anims_receiver) = channel();
+ let num_threads = cmp::max(num_cpus::get() * 3 / 4, 1);
+
+ PerDocumentStyleData {
+ stylist: Stylist::new(device),
+ stylesheets: Vec::new(),
+ stylesheets_changed: true,
+ new_animations_sender: new_anims_sender,
+ new_animations_receiver: new_anims_receiver,
+ running_animations: Arc::new(RwLock::new(HashMap::new())),
+ expired_animations: Arc::new(RwLock::new(HashMap::new())),
+ work_queue: WorkQueue::new("StyleWorker", thread_state::LAYOUT, num_threads),
+ }
+ }
+
+ pub fn borrow_mut_from_raw<'a>(data: *mut ServoStyleSetData) -> &'a mut Self {
+ unsafe { &mut *(data as *mut PerDocumentStyleData) }
+ }
+}
+
+impl Drop for PerDocumentStyleData {
+ fn drop(&mut self) {
+ self.work_queue.shutdown();
+ }
+}
diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs
index bb1d6bcae3e..9ad4c99577a 100644
--- a/ports/geckolib/glue.rs
+++ b/ports/geckolib/glue.rs
@@ -6,27 +6,22 @@
use app_units::Au;
use bindings::RawGeckoDocument;
-use bindings::ServoNodeData;
+use bindings::{ServoArcStyleSheet, ServoNodeData, ServoStyleSetData, uint8_t, uint32_t};
+use data::PerDocumentStyleData;
use euclid::Size2D;
-use euclid::size::TypedSize2D;
-use num_cpus;
-use std::cmp;
-use std::collections::HashMap;
-use std::sync::mpsc::{channel, Sender};
-use std::sync::{Arc, Mutex, RwLock};
-use style::animation::Animation;
+use std::mem::{forget, transmute};
+use std::slice;
+use std::str::from_utf8_unchecked;
+use std::sync::{Arc, Mutex};
use style::context::{ReflowGoal, SharedStyleContext, StylistWrapper};
use style::dom::{TDocument, TNode};
use style::error_reporting::StdoutErrorReporter;
-use style::media_queries::{Device, MediaType};
-use style::parallel::{self, WorkQueueData};
-use style::selector_matching::Stylist;
-use style::stylesheets::Stylesheet;
-use style::traversal::RecalcStyleOnly;
-use util::geometry::ViewportPx;
+use style::parallel;
+use style::stylesheets::{Origin, Stylesheet};
+use traversal::RecalcStyleOnly;
+use url::Url;
+use util::arc_ptr_eq;
use util::resource_files::set_resources_path;
-use util::thread_state;
-use util::workqueue::WorkQueue;
use wrapper::{GeckoDocument, GeckoNode, NonOpaqueStyleData};
/*
@@ -38,50 +33,36 @@ use wrapper::{GeckoDocument, GeckoNode, NonOpaqueStyleData};
*/
#[no_mangle]
-pub extern "C" fn Servo_RestyleDocument(doc: *mut RawGeckoDocument) -> () {
+pub extern "C" fn Servo_RestyleDocument(doc: *mut RawGeckoDocument, raw_data: *mut ServoStyleSetData) -> () {
let document = unsafe { GeckoDocument::from_raw(doc) };
let node = match document.root_node() {
Some(x) => x,
None => return,
};
+ let data = unsafe { &mut *(raw_data as *mut PerDocumentStyleData) };
// FIXME(bholley): Don't hardcode resources path. We may want to use Gecko's UA stylesheets
// anyway.
set_resources_path(Some("/files/mozilla/stylo/servo/resources/".to_owned()));
- // FIXME(bholley): Real window size.
- let window_size: TypedSize2D<ViewportPx, f32> = Size2D::typed(800.0, 600.0);
- let device = Device::new(MediaType::Screen, window_size);
-
- // FIXME(bholley): Real stylist and stylesheets.
- let stylesheets: Vec<Arc<Stylesheet>> = Vec::new();
- let mut stylist = Box::new(Stylist::new(device));
- let _needs_dirtying = stylist.update(&stylesheets, false);
-
- // FIXME(bholley): Hook this up to something.
- let new_animations_sender: Sender<Animation> = channel().0;
+ let _needs_dirtying = data.stylist.update(&data.stylesheets, data.stylesheets_changed);
+ data.stylesheets_changed = false;
let shared_style_context = SharedStyleContext {
viewport_size: Size2D::new(Au(0), Au(0)),
screen_size_changed: false,
generation: 0,
goal: ReflowGoal::ForScriptQuery,
- stylist: StylistWrapper(&*stylist),
- new_animations_sender: Mutex::new(new_animations_sender),
- running_animations: Arc::new(RwLock::new(HashMap::new())),
- expired_animations: Arc::new(RwLock::new(HashMap::new())),
+ stylist: StylistWrapper(&data.stylist),
+ new_animations_sender: Mutex::new(data.new_animations_sender.clone()),
+ running_animations: data.running_animations.clone(),
+ expired_animations: data.expired_animations.clone(),
error_reporter: Box::new(StdoutErrorReporter),
};
- let num_threads = cmp::max(num_cpus::get() * 3 / 4, 1);
- let mut parallel_traversal: WorkQueue<SharedStyleContext, WorkQueueData> =
- WorkQueue::new("StyleWorker", thread_state::LAYOUT, num_threads);
-
if node.is_dirty() || node.has_dirty_descendants() {
- parallel::traverse_dom::<GeckoNode, RecalcStyleOnly>(node, &shared_style_context, &mut parallel_traversal);
+ parallel::traverse_dom::<GeckoNode, RecalcStyleOnly>(node, &shared_style_context, &mut data.work_queue);
}
-
- parallel_traversal.shutdown();
}
#[no_mangle]
@@ -90,3 +71,88 @@ pub extern "C" fn Servo_DropNodeData(data: *mut ServoNodeData) -> () {
let _ = Box::<NonOpaqueStyleData>::from_raw(data as *mut NonOpaqueStyleData);
}
}
+
+#[no_mangle]
+pub extern "C" fn Servo_StylesheetFromUTF8Bytes(bytes: *const uint8_t,
+ length: uint32_t) -> *mut ServoArcStyleSheet {
+
+ let input = unsafe { from_utf8_unchecked(slice::from_raw_parts(bytes, length as usize)) };
+
+ // FIXME(heycam): Pass in the real base URL and sheet origin to use.
+ let url = Url::parse("about:none").unwrap();
+ let sheet = Arc::new(Stylesheet::from_str(input, url, Origin::Author, Box::new(StdoutErrorReporter)));
+ unsafe {
+ transmute(sheet)
+ }
+}
+
+fn with_arc_stylesheet<F, Output>(raw: *mut ServoArcStyleSheet, cb: F) -> Output
+ where F: FnOnce(&Arc<Stylesheet>) -> Output {
+ let owned = unsafe { consume_arc_stylesheet(raw) };
+ let result = cb(&owned);
+ forget(owned);
+ result
+}
+
+unsafe fn consume_arc_stylesheet(raw: *mut ServoArcStyleSheet) -> Arc<Stylesheet> {
+ transmute(raw)
+}
+
+#[no_mangle]
+pub extern "C" fn Servo_AppendStyleSheet(raw_sheet: *mut ServoArcStyleSheet,
+ raw_data: *mut ServoStyleSetData) {
+ let data = PerDocumentStyleData::borrow_mut_from_raw(raw_data);
+ with_arc_stylesheet(raw_sheet, |sheet| {
+ data.stylesheets.retain(|x| !arc_ptr_eq(x, sheet));
+ data.stylesheets.push(sheet.clone());
+ data.stylesheets_changed = true;
+ });
+}
+
+#[no_mangle]
+pub extern "C" fn Servo_PrependStyleSheet(raw_sheet: *mut ServoArcStyleSheet,
+ raw_data: *mut ServoStyleSetData) {
+ let data = PerDocumentStyleData::borrow_mut_from_raw(raw_data);
+ with_arc_stylesheet(raw_sheet, |sheet| {
+ data.stylesheets.retain(|x| !arc_ptr_eq(x, sheet));
+ data.stylesheets.insert(0, sheet.clone());
+ data.stylesheets_changed = true;
+ })
+}
+
+#[no_mangle]
+pub extern "C" fn Servo_RemoveStyleSheet(raw_sheet: *mut ServoArcStyleSheet,
+ raw_data: *mut ServoStyleSetData) {
+ let data = PerDocumentStyleData::borrow_mut_from_raw(raw_data);
+ with_arc_stylesheet(raw_sheet, |sheet| {
+ data.stylesheets.retain(|x| !arc_ptr_eq(x, sheet));
+ data.stylesheets_changed = true;
+ });
+}
+
+#[no_mangle]
+pub extern "C" fn Servo_StyleSheetHasRules(raw_sheet: *mut ServoArcStyleSheet) -> ::libc::c_int {
+ with_arc_stylesheet(raw_sheet, |sheet| if sheet.rules.is_empty() { 0 } else { 1 })
+}
+
+
+#[no_mangle]
+pub extern "C" fn Servo_DropStylesheet(sheet: *mut ServoArcStyleSheet) -> () {
+ unsafe {
+ let _ = consume_arc_stylesheet(sheet);
+ }
+}
+
+#[no_mangle]
+pub extern "C" fn Servo_InitStyleSetData() -> *mut ServoStyleSetData {
+ let data = Box::new(PerDocumentStyleData::new());
+ Box::into_raw(data) as *mut ServoStyleSetData
+}
+
+
+#[no_mangle]
+pub extern "C" fn Servo_DropStyleSetData(data: *mut ServoStyleSetData) -> () {
+ unsafe {
+ let _ = Box::<PerDocumentStyleData>::from_raw(data as *mut PerDocumentStyleData);
+ }
+}
diff --git a/ports/geckolib/lib.rs b/ports/geckolib/lib.rs
index d1548b7fd94..e47d757b127 100644
--- a/ports/geckolib/lib.rs
+++ b/ports/geckolib/lib.rs
@@ -23,6 +23,8 @@ extern crate util;
#[allow(dead_code, non_camel_case_types)]
mod bindings;
+mod data;
#[allow(non_snake_case)]
pub mod glue;
+mod traversal;
mod wrapper;
diff --git a/ports/geckolib/traversal.rs b/ports/geckolib/traversal.rs
new file mode 100644
index 00000000000..217035f5a52
--- /dev/null
+++ b/ports/geckolib/traversal.rs
@@ -0,0 +1,82 @@
+/* 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 std::cell::RefCell;
+use std::mem;
+use std::rc::Rc;
+use style::context::{LocalStyleContext, SharedStyleContext, StyleContext};
+use style::dom::{OpaqueNode, TNode};
+use style::matching::{ApplicableDeclarationsCache, StyleSharingCandidateCache};
+use style::traversal::{DomTraversalContext, recalc_style_at};
+
+thread_local!(static LOCAL_CONTEXT_KEY: RefCell<Option<Rc<LocalStyleContext>>> = RefCell::new(None));
+
+// Keep this implementation in sync with the one in components/layout/context.rs.
+fn create_or_get_local_context(shared: &SharedStyleContext)
+ -> Rc<LocalStyleContext> {
+ LOCAL_CONTEXT_KEY.with(|r| {
+ let mut r = r.borrow_mut();
+ if let Some(context) = r.clone() {
+ if shared.screen_size_changed {
+ context.applicable_declarations_cache.borrow_mut().evict_all();
+ }
+ context
+ } else {
+ let context = Rc::new(LocalStyleContext {
+ applicable_declarations_cache: RefCell::new(ApplicableDeclarationsCache::new()),
+ style_sharing_candidate_cache: RefCell::new(StyleSharingCandidateCache::new()),
+ });
+ *r = Some(context.clone());
+ context
+ }
+ })
+}
+
+pub struct StandaloneStyleContext<'a> {
+ pub shared: &'a SharedStyleContext,
+ cached_local_context: Rc<LocalStyleContext>,
+}
+
+impl<'a> StandaloneStyleContext<'a> {
+ pub fn new(shared: &'a SharedStyleContext) -> Self {
+ let local_context = create_or_get_local_context(shared);
+ StandaloneStyleContext {
+ shared: shared,
+ cached_local_context: local_context,
+ }
+ }
+}
+
+impl<'a> StyleContext<'a> for StandaloneStyleContext<'a> {
+ fn shared_context(&self) -> &'a SharedStyleContext {
+ &self.shared
+ }
+
+ fn local_context(&self) -> &LocalStyleContext {
+ &self.cached_local_context
+ }
+}
+
+pub struct RecalcStyleOnly<'lc> {
+ context: StandaloneStyleContext<'lc>,
+ root: OpaqueNode,
+}
+
+impl<'lc, 'ln, N: TNode<'ln>> DomTraversalContext<'ln, N> for RecalcStyleOnly<'lc> {
+ type SharedContext = SharedStyleContext;
+ #[allow(unsafe_code)]
+ fn new<'a>(shared: &'a Self::SharedContext, root: OpaqueNode) -> Self {
+ // See the comment in RecalcStyleAndConstructFlows::new for an explanation of why this is
+ // necessary.
+ let shared_lc: &'lc SharedStyleContext = unsafe { mem::transmute(shared) };
+ RecalcStyleOnly {
+ context: StandaloneStyleContext::new(shared_lc),
+ root: root,
+ }
+ }
+
+ fn process_preorder(&self, node: N) { recalc_style_at(&self.context, self.root, node); }
+ fn process_postorder(&self, _: N) {}
+}
+
diff --git a/ports/geckolib/wrapper.rs b/ports/geckolib/wrapper.rs
index 41b2b3ab1bc..03c436f7d28 100644
--- a/ports/geckolib/wrapper.rs
+++ b/ports/geckolib/wrapper.rs
@@ -6,9 +6,13 @@
use bindings::{Gecko_ChildrenCount};
use bindings::{Gecko_ElementState, Gecko_GetAttrAsUTF8, Gecko_GetDocumentElement};
-use bindings::{Gecko_GetFirstChild, Gecko_GetLastChild, Gecko_GetNodeData};
-use bindings::{Gecko_GetParentNode, Gecko_GetPrevSibling, Gecko_GetNextSibling};
-use bindings::{Gecko_IsHTMLElementInHTMLDocument, Gecko_IsLink, Gecko_IsTextNode};
+use bindings::{Gecko_GetFirstChild, Gecko_GetFirstChildElement};
+use bindings::{Gecko_GetLastChild, Gecko_GetLastChildElement};
+use bindings::{Gecko_GetNextSibling, Gecko_GetNextSiblingElement};
+use bindings::{Gecko_GetNodeData};
+use bindings::{Gecko_GetParentElement, Gecko_GetParentNode};
+use bindings::{Gecko_GetPrevSibling, Gecko_GetPrevSiblingElement};
+use bindings::{Gecko_IsHTMLElementInHTMLDocument, Gecko_IsLink, Gecko_IsRootElement, Gecko_IsTextNode};
use bindings::{Gecko_IsUnvisitedLink, Gecko_IsVisitedLink};
#[allow(unused_imports)] // Used in commented-out code.
use bindings::{Gecko_LocalName, Gecko_Namespace, Gecko_NodeIsElement, Gecko_SetNodeData};
@@ -334,7 +338,7 @@ impl<'le> TElement<'le> for GeckoElement<'le> {
fn synthesize_presentational_hints_for_legacy_attributes<V>(&self, _hints: &mut V)
where V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>
{
- unimplemented!()
+ // FIXME(bholley) - Need to implement this.
}
#[inline]
@@ -356,27 +360,39 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
type Impl = ServoSelectorImpl;
fn parent_element(&self) -> Option<Self> {
- unimplemented!()
+ unsafe {
+ Gecko_GetParentElement(self.element).as_ref().map(|el| GeckoElement::from_ref(el))
+ }
}
fn first_child_element(&self) -> Option<Self> {
- unimplemented!()
+ unsafe {
+ Gecko_GetFirstChildElement(self.element).as_ref().map(|el| GeckoElement::from_ref(el))
+ }
}
fn last_child_element(&self) -> Option<Self> {
- unimplemented!()
+ unsafe {
+ Gecko_GetLastChildElement(self.element).as_ref().map(|el| GeckoElement::from_ref(el))
+ }
}
fn prev_sibling_element(&self) -> Option<Self> {
- unimplemented!()
+ unsafe {
+ Gecko_GetPrevSiblingElement(self.element).as_ref().map(|el| GeckoElement::from_ref(el))
+ }
}
fn next_sibling_element(&self) -> Option<Self> {
- unimplemented!()
+ unsafe {
+ Gecko_GetNextSiblingElement(self.element).as_ref().map(|el| GeckoElement::from_ref(el))
+ }
}
fn is_root(&self) -> bool {
- unimplemented!()
+ unsafe {
+ Gecko_IsRootElement(self.element) != 0
+ }
}
fn is_empty(&self) -> bool {
diff --git a/ports/glutin/Cargo.toml b/ports/glutin/Cargo.toml
index 7b6e41cec8a..c0713022b14 100644
--- a/ports/glutin/Cargo.toml
+++ b/ports/glutin/Cargo.toml
@@ -13,9 +13,9 @@ headless = ["servo-glutin/headless"]
[dependencies]
bitflags = "0.3"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
gleam = "0.2"
-euclid = {version = "0.4", features = ["plugins"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
servo-glutin = "0.4"
[dependencies.compositing]
diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock
index 90904b61527..09893b87e30 100644
--- a/ports/gonk/Cargo.lock
+++ b/ports/gonk/Cargo.lock
@@ -6,10 +6,10 @@ dependencies = [
"devtools 0.0.1",
"env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"errno 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 0.0.1",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"layout 0.0.1",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@@ -56,10 +56,12 @@ dependencies = [
[[package]]
name = "app_units"
-version = "0.1.4"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "euclid 0.4.0 (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)",
"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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -72,22 +74,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "azure"
-version = "0.2.1"
-source = "git+https://github.com/servo/rust-azure#7662f94f0b8c368134a04edac936328d603c7ad8"
+version = "0.4.0"
+source = "git+https://github.com/servo/rust-azure#818581a03542c79d65cc37da984eb6b1a83222a5"
dependencies = [
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (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.4.0 (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)",
- "heapsize 0.2.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)",
"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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -126,13 +128,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "canvas"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
"canvas_traits 0.0.1",
- "euclid 0.4.0 (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",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"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)",
"offscreen_gl_context 0.1.0 (git+https://github.com/ecoal95/rust-offscreen-rendering-context)",
@@ -144,12 +146,14 @@ dependencies = [
name = "canvas_traits"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "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)",
"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)",
- "layers 0.2.0 (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)",
"plugins 0.0.1",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -173,7 +177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cgl"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -222,22 +226,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "compositing"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
"clipboard 0.1.0 (git+https://github.com/aweinstock314/rust-clipboard)",
"core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"core-text 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"devtools_traits 0.0.1",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gfx_traits 0.0.1",
"gleam 0.2.3 (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)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"layout_traits 0.0.1",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@@ -310,10 +314,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cssparser"
-version = "0.5.0"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -354,6 +360,8 @@ name = "devtools_traits"
version = "0.0.1"
dependencies = [
"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)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"msg 0.0.1",
@@ -477,14 +485,13 @@ dependencies = [
[[package]]
name = "euclid"
-version = "0.4.0"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "heapsize 0.2.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)",
"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)",
- "rand 0.3.12 (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_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -543,7 +550,7 @@ dependencies = [
[[package]]
name = "gaol"
version = "0.0.1"
-source = "git+https://github.com/servo/gaol#491dba122d6741ea4e56c754505a69f6319d41e3"
+source = "git+https://github.com/servo/gaol#f1da35779bd3f9d4c0da7dad9c24c22dbf600c48"
dependencies = [
"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)",
@@ -576,20 +583,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "gfx"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (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.4.0 (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)",
"freetype 0.1.0 (git+https://github.com/servo/rust-freetype)",
"gfx_traits 0.0.1",
"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)",
- "layers 0.2.0 (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)",
"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)",
@@ -603,10 +612,10 @@ dependencies = [
"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)",
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.3 (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)",
"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",
"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)",
@@ -618,9 +627,11 @@ dependencies = [
name = "gfx_traits"
version = "0.0.1"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "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)",
"msg 0.0.1",
"plugins 0.0.1",
"serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -709,7 +720,7 @@ dependencies = [
[[package]]
name = "heapsize"
-version = "0.2.0"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -730,15 +741,17 @@ dependencies = [
[[package]]
name = "html5ever"
-version = "0.4.0"
+version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
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)",
"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_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)",
- "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)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -799,13 +812,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "io-surface"
-version = "0.1.2"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (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)",
+ "leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -829,7 +843,7 @@ name = "js"
version = "0.1.1"
source = "git+https://github.com/servo/rust-mozjs#b96675b217534c7742cbfda8150ea0536aedbdfb"
dependencies = [
- "heapsize 0.2.0 (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)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
@@ -858,21 +872,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "layers"
-version = "0.2.0"
-source = "git+https://github.com/servo/rust-layers#79903a0b38c9684f5f74622532023d4ac51b4f7f"
+version = "0.2.1"
+source = "git+https://github.com/servo/rust-layers#b59247811dd221dcceabef597278eece77996c91"
dependencies = [
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "azure 0.4.0 (git+https://github.com/servo/rust-azure)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (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)",
"glx 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "io-surface 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)",
+ "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)",
"log 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-skia 0.20130412.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-skia 0.20130412.6 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -880,16 +896,18 @@ dependencies = [
name = "layout"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"bitflags 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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)",
"fnv 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx 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)",
"layout_traits 0.0.1",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -906,7 +924,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -937,6 +955,19 @@ version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
+name = "leak"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "leaky-cow"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "leak 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
+[[package]]
name = "libc"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1063,11 +1094,13 @@ name = "msg"
version = "0.0.1"
dependencies = [
"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)",
- "euclid 0.4.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)",
+ "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)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"plugins 0.0.1",
"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)",
@@ -1117,6 +1150,8 @@ dependencies = [
name = "net_traits"
version = "0.0.1"
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)",
"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)",
@@ -1180,11 +1215,11 @@ dependencies = [
[[package]]
name = "offscreen_gl_context"
version = "0.1.0"
-source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#0677179502384f07fced16744dbe5882d9a71dfa"
+source = "git+https://github.com/ecoal95/rust-offscreen-rendering-context#aa899f18860c1bdc503350a67cd89fd9e339d392"
dependencies = [
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gl_generator 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"khronos_api 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1397,18 +1432,20 @@ name = "script"
version = "0.0.1"
dependencies = [
"angle 0.1.0 (git+https://github.com/ecoal95/angle?branch=servo)",
- "app_units 0.1.4 (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)",
"canvas 0.0.1",
"canvas_traits 0.0.1",
"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",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (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)",
"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)",
"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)",
@@ -1428,7 +1465,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -1443,11 +1480,13 @@ dependencies = [
name = "script_traits"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "app_units 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"canvas_traits 0.0.1",
"devtools_traits 0.0.1",
- "euclid 0.4.0 (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",
+ "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)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1",
@@ -1469,12 +1508,14 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
+ "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)",
"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)",
- "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]]
@@ -1523,12 +1564,12 @@ dependencies = [
"devtools 0.0.1",
"devtools_traits 0.0.1",
"env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
"gfx 0.0.1",
"gleam 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
- "layers 0.2.0 (git+https://github.com/servo/rust-layers)",
+ "layers 0.2.1 (git+https://github.com/servo/rust-layers)",
"layout 0.0.1",
"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)",
@@ -1559,12 +1600,12 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-fontconfig-sys 2.11.2-really.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-fontconfig-sys 2.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "servo-fontconfig-sys"
-version = "2.11.2-really.1"
+version = "2.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"expat-sys 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1582,11 +1623,11 @@ dependencies = [
[[package]]
name = "servo-glutin"
-version = "0.4.8"
+version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"android_glue 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cocoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1611,20 +1652,20 @@ dependencies = [
[[package]]
name = "servo-skia"
-version = "0.20130412.3"
+version = "0.20130412.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "cgl 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cgl 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "euclid 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"expat-sys 2.1.2 (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)",
- "io-surface 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)",
"libc 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-egl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-fontconfig 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"servo-freetype-sys 2.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "servo-glutin 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "servo-glutin 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
"x11 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -1675,10 +1716,12 @@ dependencies = [
[[package]]
name = "string_cache"
-version = "0.2.5"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -1689,12 +1732,14 @@ dependencies = [
name = "style"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (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)",
- "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)",
- "euclid 0.4.0 (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)",
+ "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)",
"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)",
@@ -1705,7 +1750,7 @@ dependencies = [
"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)",
"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",
"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)",
@@ -1716,8 +1761,10 @@ dependencies = [
name = "style_traits"
version = "0.0.1"
dependencies = [
- "cssparser 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
- "euclid 0.4.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)",
+ "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)",
"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)",
@@ -1832,6 +1879,8 @@ version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
@@ -1861,18 +1910,20 @@ dependencies = [
name = "util"
version = "0.0.1"
dependencies = [
- "app_units 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "azure 0.2.1 (git+https://github.com/servo/rust-azure)",
+ "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)",
"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)",
- "euclid 0.4.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)",
"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)",
"ipc-channel 0.2.0 (git+https://github.com/servo/ipc-channel)",
"js 0.1.1 (git+https://github.com/servo/rust-mozjs)",
"kernel32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "layers 0.2.0 (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)",
"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)",
@@ -1885,7 +1936,7 @@ dependencies = [
"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)",
"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)",
"uuid 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2027,7 +2078,7 @@ dependencies = [
"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)",
"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)",
"time 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
]
diff --git a/ports/gonk/Cargo.toml b/ports/gonk/Cargo.toml
index dd8466929e4..b153f530ab7 100644
--- a/ports/gonk/Cargo.toml
+++ b/ports/gonk/Cargo.toml
@@ -46,10 +46,10 @@ features = ["non-geckolib"]
[dependencies]
env_logger = "0.3"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
time = "0.1.17"
errno = "0.1"
libc = "0.2"
-euclid = {version = "0.4", features = ["plugins"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
gleam = "0.2"
servo-egl = "0.2"
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 142a59e766f..d9d26366d20 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -109,7 +109,10 @@ class MachCommands(CommandBase):
"include_arg": "include"}),
("unit", {"kwargs": {},
"paths": [path.abspath(path.join("tests", "unit"))],
- "include_arg": "test_name"})
+ "include_arg": "test_name"}),
+ ("compiletest", {"kwargs": {"release": release},
+ "paths": [path.abspath(path.join("tests", "compiletest"))],
+ "include_arg": "test_name"})
])
suites_by_prefix = {path: k for k, v in suites.iteritems() if "paths" in v for path in v["paths"]}
@@ -207,6 +210,65 @@ class MachCommands(CommandBase):
if result != 0:
return result
+ @Command('test-compiletest',
+ description='Run compiletests',
+ category='testing')
+ @CommandArgument('--package', '-p', default=None, help="Specific package to test")
+ @CommandArgument('test_name', nargs=argparse.REMAINDER,
+ help="Only run tests that match this pattern or file path")
+ @CommandArgument('--release', default=False, action="store_true",
+ help="Run with a release build of servo")
+ def test_compiletest(self, test_name=None, package=None, release=False):
+ if test_name is None:
+ test_name = []
+
+ self.ensure_bootstrapped()
+
+ if package:
+ packages = {package}
+ else:
+ packages = set()
+
+ test_patterns = []
+ for test in test_name:
+ # add package if 'tests/compiletest/<package>'
+ match = re.search("tests/compiletest/(\\w+)/?$", test)
+ if match:
+ packages.add(match.group(1))
+ # add package & test if '<package>/<test>', 'tests/compiletest/<package>/<test>.rs', or similar
+ elif re.search("\\w/\\w", test):
+ tokens = test.split("/")
+ packages.add(tokens[-2])
+ test_prefix = tokens[-1]
+ if test_prefix.endswith(".rs"):
+ test_prefix = test_prefix[:-3]
+ test_prefix += "::"
+ test_patterns.append(test_prefix)
+ # add test as-is otherwise
+ else:
+ test_patterns.append(test)
+
+ if not packages:
+ packages = set(os.listdir(path.join(self.context.topdir, "tests", "compiletest")))
+
+ packages.remove("helper")
+
+ args = ["cargo", "test"]
+ for crate in packages:
+ args += ["-p", "%s_compiletest" % crate]
+ args += test_patterns
+
+ env = self.build_env()
+ if release:
+ env["BUILD_MODE"] = "release"
+ args += ["--release"]
+ else:
+ env["BUILD_MODE"] = "debug"
+
+ result = call(args, env=env, cwd=self.servo_crate())
+ if result != 0:
+ return result
+
@Command('test-ref',
description='Run the reference tests',
category='testing')
diff --git a/python/tidy.py b/python/tidy.py
index c474c601954..2e160a5703a 100644
--- a/python/tidy.py
+++ b/python/tidy.py
@@ -168,7 +168,7 @@ def check_lock(file_name, contents):
raise StopIteration
# package names to be neglected (as named by cargo)
- exceptions = ["cocoa"]
+ exceptions = []
import toml
content = toml.loads(contents)
diff --git a/tests/compiletest/helper/Cargo.toml b/tests/compiletest/helper/Cargo.toml
new file mode 100644
index 00000000000..a5c3028d53c
--- /dev/null
+++ b/tests/compiletest/helper/Cargo.toml
@@ -0,0 +1,12 @@
+[package]
+name = "compiletest_helper"
+version = "0.0.1"
+authors = ["The Servo Project Developers"]
+
+[lib]
+name = "compiletest_helper"
+path = "lib.rs"
+doctest = false
+
+[dependencies.compiletest_rs]
+compiletest_rs = "0.11"
diff --git a/tests/compiletest/helper/lib.rs b/tests/compiletest/helper/lib.rs
new file mode 100644
index 00000000000..2ec43d3f522
--- /dev/null
+++ b/tests/compiletest/helper/lib.rs
@@ -0,0 +1,29 @@
+/* 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/. */
+
+extern crate compiletest_rs as compiletest;
+
+use std::env;
+use std::path::PathBuf;
+
+pub fn run_mode(mode: &'static str) {
+
+ let mut config = compiletest::default_config();
+ let cfg_mode = mode.parse().ok().expect("Invalid mode");
+
+ config.mode = cfg_mode;
+ config.src_base = PathBuf::from(format!("{}", mode));
+
+ let mut base_path = env::current_dir().expect("Current directory is invalid");
+ base_path.pop();
+ base_path.pop();
+ base_path.pop();
+
+ let mode = env::var("BUILD_MODE").expect("BUILD_MODE environment variable must be set");
+ let debug_path = base_path.join(PathBuf::from(format!("target/{}", mode)));
+ let deps_path = base_path.join(PathBuf::from(format!("target/{}/deps", mode)));
+
+ config.target_rustcflags = Some(format!("-L {} -L {}", debug_path.display(), deps_path.display()));
+ compiletest::run_tests(&config);
+}
diff --git a/tests/compiletest/plugin/Cargo.toml b/tests/compiletest/plugin/Cargo.toml
new file mode 100644
index 00000000000..6ba2a22f198
--- /dev/null
+++ b/tests/compiletest/plugin/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "plugin_compiletest"
+version = "0.0.1"
+authors = ["The Servo Project Developers"]
+
+[lib]
+name = "plugin_compiletest"
+path = "lib.rs"
+doctest = false
+
+[dependencies.compiletest_helper]
+path = "../helper"
+
+[dependencies.plugins]
+path = "../../../components/plugins"
diff --git a/tests/compiletest/plugin/compile-fail/ban.rs b/tests/compiletest/plugin/compile-fail/ban.rs
new file mode 100644
index 00000000000..b789597d59d
--- /dev/null
+++ b/tests/compiletest/plugin/compile-fail/ban.rs
@@ -0,0 +1,18 @@
+/* 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/. */
+
+#![feature(plugin)]
+#![plugin(plugins)]
+
+extern crate js;
+
+use js::jsval::JSVal;
+use std::cell::Cell;
+
+struct Foo {
+ bar: Cell<JSVal>
+ //~^ ERROR Banned type Cell<JSVal> detected. Use MutHeap<JSVal> instead,
+}
+
+fn main() {}
diff --git a/tests/compiletest/plugin/compile-fail/privatize.rs b/tests/compiletest/plugin/compile-fail/privatize.rs
new file mode 100644
index 00000000000..a6f2ffdbe62
--- /dev/null
+++ b/tests/compiletest/plugin/compile-fail/privatize.rs
@@ -0,0 +1,16 @@
+/* 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/. */
+
+#![feature(plugin, custom_attribute)]
+#![plugin(plugins)]
+#![allow(dead_code)]
+
+#[privatize]
+struct Foo {
+ pub v1: i32,
+ //~^ ERROR Field v1 is public where only private fields are allowed
+ v2: i32
+}
+
+fn main() {}
diff --git a/tests/compiletest/plugin/compile-fail/str_to_string.rs b/tests/compiletest/plugin/compile-fail/str_to_string.rs
new file mode 100644
index 00000000000..ee45ee39b96
--- /dev/null
+++ b/tests/compiletest/plugin/compile-fail/str_to_string.rs
@@ -0,0 +1,16 @@
+/* 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/. */
+
+#![feature(plugin)]
+#![plugin(plugins)]
+
+
+fn main() {
+ let x = "foo".to_string();
+ //~^ ERROR str.to_owned() is more efficient than str.to_string()
+
+ let x = &x[..];
+ x.to_string();
+ //~^ ERROR str.to_owned() is more efficient than str.to_string()
+}
diff --git a/tests/compiletest/plugin/compile-fail/transmute_type.rs b/tests/compiletest/plugin/compile-fail/transmute_type.rs
new file mode 100644
index 00000000000..42bdd8c8c0f
--- /dev/null
+++ b/tests/compiletest/plugin/compile-fail/transmute_type.rs
@@ -0,0 +1,19 @@
+/* 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/. */
+
+#![feature(plugin)]
+#![plugin(plugins)]
+#![allow(dead_code)]
+#![deny(transmute_type_lint)]
+
+use std::mem::{self, transmute};
+
+
+fn main() {
+ let _: &[u8] = unsafe { transmute("Rust") };
+ //~^ ERROR Transmute to &[u8] from &'static str detected
+
+ let _: &[u8] = unsafe { mem::transmute("Rust") };
+ //~^ ERROR Transmute to &[u8] from &'static str detected
+}
diff --git a/tests/compiletest/plugin/compile-fail/unrooted_must_root.rs b/tests/compiletest/plugin/compile-fail/unrooted_must_root.rs
new file mode 100644
index 00000000000..f9b6d29dbee
--- /dev/null
+++ b/tests/compiletest/plugin/compile-fail/unrooted_must_root.rs
@@ -0,0 +1,27 @@
+/* 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/. */
+
+#![feature(plugin)]
+#![plugin(plugins)]
+#![allow(dead_code)]
+
+#[must_root]
+struct Foo {
+ v: i32
+}
+
+struct Bar {
+ f: Foo
+ //~^ ERROR Type must be rooted, use #[must_root] on the struct definition to propagate
+}
+
+fn foo1(_: Foo) {} //~ ERROR Type must be rooted
+
+
+fn foo2() -> Foo { //~ ERROR Type must be rooted
+ Foo { v: 10 }
+}
+
+
+fn main() {}
diff --git a/tests/compiletest/plugin/lib.rs b/tests/compiletest/plugin/lib.rs
new file mode 100644
index 00000000000..d3466c57b9b
--- /dev/null
+++ b/tests/compiletest/plugin/lib.rs
@@ -0,0 +1,10 @@
+/* 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/. */
+
+extern crate compiletest_helper;
+
+#[test]
+fn compile_test() {
+ compiletest_helper::run_mode("compile-fail");
+}
diff --git a/tests/unit/net/Cargo.toml b/tests/unit/net/Cargo.toml
index bc1d49dade6..eb585685388 100644
--- a/tests/unit/net/Cargo.toml
+++ b/tests/unit/net/Cargo.toml
@@ -32,6 +32,6 @@ git = "https://github.com/servo/ipc-channel"
[dependencies]
cookie = "0.2"
hyper = "0.7"
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
time = "0.1"
flate2 = "0.2.0"
diff --git a/tests/unit/plugin/Cargo.toml b/tests/unit/plugin/Cargo.toml
index 286b918c476..19466cd7516 100644
--- a/tests/unit/plugin/Cargo.toml
+++ b/tests/unit/plugin/Cargo.toml
@@ -12,4 +12,4 @@ doctest = false
path = "../../../components/plugins"
[dependencies]
-url = "0.5.4"
+url = {version = "0.5.4", features = ["heap_size"]}
diff --git a/tests/unit/script/size_of.rs b/tests/unit/script/size_of.rs
index b89ca9dd837..f760d610862 100644
--- a/tests/unit/script/size_of.rs
+++ b/tests/unit/script/size_of.rs
@@ -38,10 +38,10 @@ macro_rules! sizeof_checker (
// Update the sizes here
sizeof_checker!(size_event_target, EventTarget, 40);
-sizeof_checker!(size_node, Node, 168);
-sizeof_checker!(size_element, Element, 312);
-sizeof_checker!(size_htmlelement, HTMLElement, 328);
-sizeof_checker!(size_div, HTMLDivElement, 328);
-sizeof_checker!(size_span, HTMLSpanElement, 328);
-sizeof_checker!(size_text, Text, 200);
-sizeof_checker!(size_characterdata, CharacterData, 200);
+sizeof_checker!(size_node, Node, 160);
+sizeof_checker!(size_element, Element, 304);
+sizeof_checker!(size_htmlelement, HTMLElement, 320);
+sizeof_checker!(size_div, HTMLDivElement, 320);
+sizeof_checker!(size_span, HTMLSpanElement, 320);
+sizeof_checker!(size_text, Text, 192);
+sizeof_checker!(size_characterdata, CharacterData, 192);
diff --git a/tests/unit/style/Cargo.toml b/tests/unit/style/Cargo.toml
index 2db777a20bd..0365fe27b94 100644
--- a/tests/unit/style/Cargo.toml
+++ b/tests/unit/style/Cargo.toml
@@ -24,9 +24,9 @@ path = "../../../components/style_traits"
path = "../../../components/util"
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
-url = "0.5.4"
-cssparser = "0.5"
-selectors = "0.4.1"
-string_cache = "0.2"
-euclid = {version = "0.4", features = ["plugins"]}
+app_units = {version = "0.2", features = ["plugins"]}
+url = {version = "0.5.4", features = ["heap_size"]}
+cssparser = {version = "0.5.2", features = ["heap_size"]}
+selectors = {version = "0.4.1", features = ["heap_size"]}
+string_cache = {version = "0.2.7", features = ["heap_size"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
diff --git a/tests/unit/util/Cargo.toml b/tests/unit/util/Cargo.toml
index 84f65cde523..52ec2be61a2 100644
--- a/tests/unit/util/Cargo.toml
+++ b/tests/unit/util/Cargo.toml
@@ -16,7 +16,7 @@ path = "../../../components/util"
path = "../../../components/plugins"
[dependencies]
-app_units = {version = "0.1", features = ["plugins"]}
+app_units = {version = "0.2", features = ["plugins"]}
libc = "0.2"
-euclid = {version = "0.4", features = ["plugins"]}
+euclid = {version = "0.6.1", features = ["plugins"]}
diff --git a/tests/unit/util/lib.rs b/tests/unit/util/lib.rs
index b42b58ddd7b..72ca23df7ca 100644
--- a/tests/unit/util/lib.rs
+++ b/tests/unit/util/lib.rs
@@ -16,6 +16,5 @@ extern crate util;
#[cfg(test)] mod logical_geometry;
#[cfg(test)] mod thread;
#[cfg(test)] mod vec;
-#[cfg(test)] mod mem;
#[cfg(test)] mod str;
#[cfg(test)] mod opts;
diff --git a/tests/unit/util/mem.rs b/tests/unit/util/mem.rs
deleted file mode 100644
index 9b9ac4729e1..00000000000
--- a/tests/unit/util/mem.rs
+++ /dev/null
@@ -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);
-}
diff --git a/tests/wpt/harness/README.rst b/tests/wpt/harness/README.rst
index 6e3b5fa2546..63f18aca613 100644
--- a/tests/wpt/harness/README.rst
+++ b/tests/wpt/harness/README.rst
@@ -29,7 +29,7 @@ following are most significant:
The path to a binary file for the product (browser) to test against.
``--webdriver-binary`` (required if product is `chrome`)
- The path to a `*driver` binary; e.g., a `chromedriver` binary.
+ The path to a `driver` binary; e.g., a `chromedriver` binary.
``--certutil-binary`` (required if product is `firefox` [#]_)
The path to a `certutil` binary (for tests that must be run over https).
@@ -43,13 +43,18 @@ following are most significant:
``--prefs-root`` (required only when testing a Firefox binary)
The path to a directory containing Firefox test-harness preferences. [#]_
+``--config`` (should default to `wptrunner.default.ini`)
+ The path to the config (ini) file.
+
.. [#] The ``--certutil-binary`` option is required when the product is
``firefox`` unless ``--ssl-type=none`` is specified.
.. [#] The ``--metadata`` path is to a directory that contains:
- * a ``MANIFEST.json`` file (the web-platform-tests documentation has
- instructions on generating this file); and
+ * a ``MANIFEST.json`` file (instructions on generating this file are
+ available in the `detailed documentation
+ <http://wptrunner.readthedocs.org/en/latest/usage.html#installing-wptrunner>`_);
+ and
* (optionally) any expectation files (see below)
.. [#] Example ``--prefs-root`` value: ``~/mozilla-central/testing/profiles``.
@@ -125,7 +130,7 @@ input to the `wptupdate` tool.
Expectation File Format
~~~~~~~~~~~~~~~~~~~~~~~
-Metadat about tests, notably including their expected results, is
+Metadata about tests, notably including their expected results, is
stored in a modified ini-like format that is designed to be human
editable, but also to be machine updatable.
diff --git a/tests/wpt/harness/docs/usage.rst b/tests/wpt/harness/docs/usage.rst
index 279f4f2c590..8e74a4320c8 100644
--- a/tests/wpt/harness/docs/usage.rst
+++ b/tests/wpt/harness/docs/usage.rst
@@ -28,19 +28,19 @@ environment created as above::
pip install -e ./
In addition to the dependencies installed by pip, wptrunner requires
-a copy of the web-platform-tests repository. That can be located
-anywhere on the filesystem, but the easiest option is to put it within
-the wptrunner checkout directory, as a subdirectory named ``tests``::
+a copy of the web-platform-tests repository. This can be located
+anywhere on the filesystem, but the easiest option is to put it
+under the same parent directory as the wptrunner checkout::
- git clone https://github.com/w3c/web-platform-tests.git tests
+ git clone https://github.com/w3c/web-platform-tests.git
It is also necessary to generate a web-platform-tests ``MANIFEST.json``
-file. It's recommended to put that within the wptrunner
-checkout directory, in a subdirectory named ``meta``::
+file. It's recommended to also put that under the same parent directory as
+the wptrunner checkout, in a directory named ``meta``::
mkdir meta
- cd tests
- python tools/scripts/manifest.py ../meta/MANIFEST.json
+ cd web-platform-tests
+ python manifest --path ../meta/MANIFEST.json
The ``MANIFEST.json`` file needs to be regenerated each time the
web-platform-tests checkout is updated. To aid with the update process
@@ -74,6 +74,9 @@ takes multiple options, of which the following are most significant:
``--prefs-root`` (required only when testing a Firefox binary)
The path to a directory containing Firefox test-harness preferences. [#]_
+``--config`` (should default to `wptrunner.default.ini`)
+ The path to the config (ini) file.
+
.. [#] The ``--certutil-binary`` option is required when the product is
``firefox`` unless ``--ssl-type=none`` is specified.
@@ -94,10 +97,17 @@ The following examples show how to start wptrunner with various options.
Starting wptrunner
------------------
+The examples below assume the following directory layout,
+though no specific folder structure is required::
+
+ ~/testtwf/wptrunner # wptrunner checkout
+ ~/testtwf/web-platform-tests # web-platform-tests checkout
+ ~/testtwf/meta # metadata
+
To test a Firefox Nightly build in an OS X environment, you might start
wptrunner using something similar to the following example::
- wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
+ wptrunner --metadata=~/testtwf/meta/ --tests=~/testtwf/web-platform-tests/ \
--binary=~/mozilla-central/obj-x86_64-apple-darwin14.3.0/dist/Nightly.app/Contents/MacOS/firefox \
--certutil-binary=~/mozilla-central/obj-x86_64-apple-darwin14.3.0/security/nss/cmd/certutil/certutil \
--prefs-root=~/mozilla-central/testing/profiles
@@ -106,7 +116,7 @@ wptrunner using something similar to the following example::
And to test a Chromium build in an OS X environment, you might start
wptrunner using something similar to the following example::
- wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
+ wptrunner --metadata=~/testtwf/meta/ --tests=~/testtwf/web-platform-tests/ \
--binary=~/chromium/src/out/Release/Chromium.app/Contents/MacOS/Chromium \
--webdriver-binary=/usr/local/bin/chromedriver --product=chrome
@@ -118,7 +128,7 @@ To restrict a test run just to tests in a particular web-platform-tests
subdirectory, specify the directory name in the positional arguments after
the options; for example, run just the tests in the `dom` subdirectory::
- wptrunner --metadata=~/web-platform-tests/ --tests=~/web-platform-tests/ \
+ wptrunner --metadata=~/testtwf/meta --tests=~/testtwf/web-platform-tests/ \
--binary=/path/to/firefox --certutil-binary=/path/to/certutil \
--prefs-root=/path/to/testing/profiles \
dom
@@ -180,7 +190,7 @@ Configuration File
wptrunner uses a ``.ini`` file to control some configuration
sections. The file has three sections; ``[products]``,
-``[paths]`` and ``[web-platform-tests]``.
+``[manifest:default]`` and ``[web-platform-tests]``.
``[products]`` is used to
define the set of available products. By default this section is empty
@@ -195,12 +205,12 @@ e.g.::
chrome =
netscape4 = path/to/netscape.py
-``[paths]`` specifies the default paths for the tests and metadata,
+``[manifest:default]`` specifies the default paths for the tests and metadata,
relative to the config file. For example::
- [paths]
- tests = checkouts/web-platform-tests
- metadata = /home/example/wpt/metadata
+ [manifest:default]
+ tests = ~/testtwf/web-platform-tests
+ metadata = ~/testtwf/meta
``[web-platform-tests]`` is used to set the properties of the upstream
diff --git a/tests/wpt/harness/wptrunner/browsers/b2g.py b/tests/wpt/harness/wptrunner/browsers/b2g.py
index 5f00feae1af..bedb00a4943 100644
--- a/tests/wpt/harness/wptrunner/browsers/b2g.py
+++ b/tests/wpt/harness/wptrunner/browsers/b2g.py
@@ -192,7 +192,7 @@ class B2GExecutorBrowser(ExecutorBrowser):
import sys, subprocess
- self.device = mozdevice.ADBDevice()
+ self.device = mozdevice.ADBB2G()
self.device.forward("tcp:%s" % self.marionette_port,
"tcp:2828")
self.executor = None
diff --git a/tests/wpt/harness/wptrunner/browsers/firefox.py b/tests/wpt/harness/wptrunner/browsers/firefox.py
index d3698c22ecf..e0ac5833118 100644
--- a/tests/wpt/harness/wptrunner/browsers/firefox.py
+++ b/tests/wpt/harness/wptrunner/browsers/firefox.py
@@ -28,7 +28,8 @@ __wptrunner__ = {"product": "firefox",
"browser_kwargs": "browser_kwargs",
"executor_kwargs": "executor_kwargs",
"env_options": "env_options",
- "run_info_extras": "run_info_extras"}
+ "run_info_extras": "run_info_extras",
+ "update_properties": "update_properties"}
def check_args(**kwargs):
@@ -54,7 +55,7 @@ def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
cache_manager, **kwargs)
executor_kwargs["close_after_done"] = True
if kwargs["timeout_multiplier"] is None:
- if kwargs["gecko_e10s"] and test_type == "reftest":
+ if test_type == "reftest":
if run_info_data["debug"]:
executor_kwargs["timeout_multiplier"] = 4
else:
@@ -71,9 +72,14 @@ def env_options():
"certificate_domain": "web-platform.test",
"supports_debugger": True}
+
def run_info_extras(**kwargs):
return {"e10s": kwargs["gecko_e10s"]}
+
+def update_properties():
+ return ["debug", "e10s", "os", "version", "processor", "bits"], {"debug", "e10s"}
+
class FirefoxBrowser(Browser):
used_ports = set()
diff --git a/tests/wpt/harness/wptrunner/browsers/servo.py b/tests/wpt/harness/wptrunner/browsers/servo.py
index dce012d1a54..0f6e11f6779 100644
--- a/tests/wpt/harness/wptrunner/browsers/servo.py
+++ b/tests/wpt/harness/wptrunner/browsers/servo.py
@@ -17,7 +17,9 @@ __wptrunner__ = {"product": "servo",
"reftest": "ServoRefTestExecutor"},
"browser_kwargs": "browser_kwargs",
"executor_kwargs": "executor_kwargs",
- "env_options": "env_options"}
+ "env_options": "env_options",
+ "run_info_extras": "run_info_extras",
+ "update_properties": "update_properties"}
def check_args(**kwargs):
@@ -47,8 +49,16 @@ def env_options():
"supports_debugger": True}
+def run_info_extras(**kwargs):
+ return {"backend": kwargs["servo_backend"]}
+
+
+def update_properties():
+ return ["debug", "os", "version", "processor", "bits", "backend"], None
+
+
def render_arg(render_backend):
- return {"cpu": "--cpu"}[render_backend]
+ return {"cpu": "--cpu", "webrender": "--webrender"}[render_backend]
class ServoBrowser(NullBrowser):
diff --git a/tests/wpt/harness/wptrunner/browsers/servodriver.py b/tests/wpt/harness/wptrunner/browsers/servodriver.py
index c257eb32fb1..2c05a4dd505 100644
--- a/tests/wpt/harness/wptrunner/browsers/servodriver.py
+++ b/tests/wpt/harness/wptrunner/browsers/servodriver.py
@@ -23,7 +23,9 @@ __wptrunner__ = {"product": "servodriver",
"reftest": "ServoWebDriverRefTestExecutor"},
"browser_kwargs": "browser_kwargs",
"executor_kwargs": "executor_kwargs",
- "env_options": "env_options"}
+ "env_options": "env_options",
+ "run_info_extras": "run_info_extras",
+ "update_properties": "update_properties"}
hosts_text = """127.0.0.1 web-platform.test
127.0.0.1 www.web-platform.test
@@ -59,6 +61,14 @@ def env_options():
"supports_debugger": True}
+def run_info_extras(**kwargs):
+ return {"backend": kwargs["servo_backend"]}
+
+
+def update_properties():
+ return ["debug", "os", "version", "processor", "bits", "backend"], None
+
+
def make_hosts_file():
hosts_fd, hosts_path = tempfile.mkstemp()
with os.fdopen(hosts_fd, "w") as f:
@@ -88,6 +98,7 @@ class ServoWebDriverBrowser(Browser):
env = os.environ.copy()
env["HOST_FILE"] = self.hosts_path
+ env["RUST_BACKTRACE"] = "1"
debug_args, command = browser_command(self.binary,
[render_arg(self.render_backend), "--hard-fail",
diff --git a/tests/wpt/harness/wptrunner/executors/executormarionette.py b/tests/wpt/harness/wptrunner/executors/executormarionette.py
index c502b425da2..c50bcf87f87 100644
--- a/tests/wpt/harness/wptrunner/executors/executormarionette.py
+++ b/tests/wpt/harness/wptrunner/executors/executormarionette.py
@@ -107,12 +107,6 @@ class MarionetteProtocol(Protocol):
return True
def after_connect(self):
- # Turn off debug-level logging by default since this is so verbose
- with self.marionette.using_context("chrome"):
- self.marionette.execute_script("""
- Components.utils.import("resource://gre/modules/Log.jsm");
- Log.repository.getLogger("Marionette").level = Log.Level.Info;
- """)
self.load_runner("http")
def load_runner(self, protocol):
diff --git a/tests/wpt/harness/wptrunner/executors/executorservo.py b/tests/wpt/harness/wptrunner/executors/executorservo.py
index 8189e9ac7b8..0e73f1bd9ec 100644
--- a/tests/wpt/harness/wptrunner/executors/executorservo.py
+++ b/tests/wpt/harness/wptrunner/executors/executorservo.py
@@ -87,7 +87,7 @@ class ServoTestharnessExecutor(ProcessTestExecutor):
env = os.environ.copy()
env["HOST_FILE"] = self.hosts_path
-
+ env["RUST_BACKTRACE"] = "1"
if not self.interactive:
@@ -223,6 +223,7 @@ class ServoRefTestExecutor(ProcessTestExecutor):
env = os.environ.copy()
env["HOST_FILE"] = self.hosts_path
+ env["RUST_BACKTRACE"] = "1"
if not self.interactive:
self.proc = ProcessHandler(self.command,
diff --git a/tests/wpt/harness/wptrunner/manifestinclude.py b/tests/wpt/harness/wptrunner/manifestinclude.py
index 6fba05128de..d9b4ee455a6 100644
--- a/tests/wpt/harness/wptrunner/manifestinclude.py
+++ b/tests/wpt/harness/wptrunner/manifestinclude.py
@@ -8,6 +8,7 @@ The manifest is represented by a tree of IncludeManifest objects, the root
representing the file and each subnode representing a subdirectory that should
be included or excluded.
"""
+import glob
import os
import urlparse
@@ -90,29 +91,36 @@ class IncludeManifest(ManifestItem):
variant += "?" + query
maybe_path = os.path.join(rest, last)
-
- if os.path.exists(maybe_path):
- for manifest, data in test_manifests.iteritems():
- rel_path = os.path.relpath(maybe_path, data["tests_path"])
- if ".." not in rel_path.split(os.sep):
- url = data["url_base"] + rel_path.replace(os.path.sep, "/") + variant
- break
+ paths = glob.glob(maybe_path)
+
+ if paths:
+ urls = []
+ for path in paths:
+ for manifest, data in test_manifests.iteritems():
+ rel_path = os.path.relpath(path, data["tests_path"])
+ if ".." not in rel_path.split(os.sep):
+ urls.append(data["url_base"] + rel_path.replace(os.path.sep, "/") + variant)
+ break
+ else:
+ urls = [url]
assert direction in ("include", "exclude")
- components = self._get_components(url)
- node = self
- while components:
- component = components.pop()
- if component not in node.child_map:
- new_node = IncludeManifest(DataNode(component))
- node.append(new_node)
- new_node.set("skip", node.get("skip", {}))
+ for url in urls:
+ components = self._get_components(url)
+
+ node = self
+ while components:
+ component = components.pop()
+ if component not in node.child_map:
+ new_node = IncludeManifest(DataNode(component))
+ node.append(new_node)
+ new_node.set("skip", node.get("skip", {}))
- node = node.child_map[component]
+ node = node.child_map[component]
- skip = False if direction == "include" else True
- node.set("skip", str(skip))
+ skip = False if direction == "include" else True
+ node.set("skip", str(skip))
def add_include(self, test_manifests, url_prefix):
"""Add a rule indicating that tests under a url path
diff --git a/tests/wpt/harness/wptrunner/manifestupdate.py b/tests/wpt/harness/wptrunner/manifestupdate.py
index 0a5d46c0995..6affbdbb59f 100644
--- a/tests/wpt/harness/wptrunner/manifestupdate.py
+++ b/tests/wpt/harness/wptrunner/manifestupdate.py
@@ -49,13 +49,18 @@ def data_cls_getter(output_node, visited_node):
class ExpectedManifest(ManifestItem):
- def __init__(self, node, test_path=None, url_base=None):
+ def __init__(self, node, test_path=None, url_base=None, property_order=None,
+ boolean_properties=None):
"""Object representing all the tests in a particular manifest
:param node: AST Node associated with this object. If this is None,
a new AST is created to associate with this manifest.
:param test_path: Path of the test file associated with this manifest.
- :param url_base: Base url for serving the tests in this manifest
+ :param url_base: Base url for serving the tests in this manifest.
+ :param property_order: List of properties to use in expectation metadata
+ from most to least significant.
+ :param boolean_properties: Set of properties in property_order that should
+ be treated as boolean.
"""
if node is None:
node = DataNode(None)
@@ -65,6 +70,8 @@ class ExpectedManifest(ManifestItem):
self.url_base = url_base
assert self.url_base is not None
self.modified = False
+ self.boolean_properties = boolean_properties
+ self.property_order = property_order
def append(self, child):
ManifestItem.append(self, child)
@@ -229,7 +236,10 @@ class TestNode(ManifestItem):
self.set("expected", status, condition=None)
final_conditionals.append(self._data["expected"][-1])
else:
- for conditional_node, status in group_conditionals(self.new_expected):
+ for conditional_node, status in group_conditionals(
+ self.new_expected,
+ property_order=self.root.property_order,
+ boolean_properties=self.root.boolean_properties):
if status != unconditional_status:
self.set("expected", status, condition=conditional_node.children[0])
final_conditionals.append(self._data["expected"][-1])
@@ -308,18 +318,30 @@ class SubtestNode(TestNode):
return True
-def group_conditionals(values):
+def group_conditionals(values, property_order=None, boolean_properties=None):
"""Given a list of Result objects, return a list of
(conditional_node, status) pairs representing the conditional
expressions that are required to match each status
- :param values: List of Results"""
+ :param values: List of Results
+ :param property_order: List of properties to use in expectation metadata
+ from most to least significant.
+ :param boolean_properties: Set of properties in property_order that should
+ be treated as boolean."""
by_property = defaultdict(set)
for run_info, status in values:
for prop_name, prop_value in run_info.iteritems():
by_property[(prop_name, prop_value)].add(status)
+ if property_order is None:
+ property_order = ["debug", "os", "version", "processor", "bits"]
+
+ if boolean_properties is None:
+ boolean_properties = set(["debug"])
+ else:
+ boolean_properties = set(boolean_properties)
+
# If we have more than one value, remove any properties that are common
# for all the values
if len(values) > 1:
@@ -328,11 +350,9 @@ def group_conditionals(values):
del by_property[key]
properties = set(item[0] for item in by_property.iterkeys())
-
- prop_order = ["debug", "e10s", "os", "version", "processor", "bits"]
include_props = []
- for prop in prop_order:
+ for prop in property_order:
if prop in properties:
include_props.append(prop)
@@ -343,28 +363,33 @@ def group_conditionals(values):
if prop_set in conditions:
continue
- expr = make_expr(prop_set, status)
+ expr = make_expr(prop_set, status, boolean_properties=boolean_properties)
conditions[prop_set] = (expr, status)
return conditions.values()
-def make_expr(prop_set, status):
+def make_expr(prop_set, status, boolean_properties=None):
"""Create an AST that returns the value ``status`` given all the
- properties in prop_set match."""
+ properties in prop_set match.
+
+ :param prop_set: tuple of (property name, value) pairs for each
+ property in this expression and the value it must match
+ :param status: Status on RHS when all the given properties match
+ :param boolean_properties: Set of properties in property_order that should
+ be treated as boolean.
+ """
root = ConditionalNode()
assert len(prop_set) > 0
- no_value_props = set(["debug", "e10s"])
-
expressions = []
for prop, value in prop_set:
number_types = (int, float, long)
value_cls = (NumberNode
if type(value) in number_types
else StringNode)
- if prop not in no_value_props:
+ if prop not in boolean_properties:
expressions.append(
BinaryExpressionNode(
BinaryOperatorNode("=="),
@@ -397,24 +422,32 @@ def make_expr(prop_set, status):
return root
-def get_manifest(metadata_root, test_path, url_base):
+def get_manifest(metadata_root, test_path, url_base, property_order=None,
+ boolean_properties=None):
"""Get the ExpectedManifest for a particular test path, or None if there is no
metadata stored for that test path.
:param metadata_root: Absolute path to the root of the metadata directory
:param test_path: Path to the test(s) relative to the test root
:param url_base: Base url for serving the tests in this manifest
- """
+ :param property_order: List of properties to use in expectation metadata
+ from most to least significant.
+ :param boolean_properties: Set of properties in property_order that should
+ be treated as boolean."""
manifest_path = expected.expected_path(metadata_root, test_path)
try:
with open(manifest_path) as f:
- return compile(f, test_path, url_base)
+ return compile(f, test_path, url_base, property_order=property_order,
+ boolean_properties=boolean_properties)
except IOError:
return None
-def compile(manifest_file, test_path, url_base):
+def compile(manifest_file, test_path, url_base, property_order=None,
+ boolean_properties=None):
return conditional.compile(manifest_file,
data_cls_getter=data_cls_getter,
test_path=test_path,
- url_base=url_base)
+ url_base=url_base,
+ property_order=property_order,
+ boolean_properties=boolean_properties)
diff --git a/tests/wpt/harness/wptrunner/metadata.py b/tests/wpt/harness/wptrunner/metadata.py
index 7f0303491dc..1a25898a9e0 100644
--- a/tests/wpt/harness/wptrunner/metadata.py
+++ b/tests/wpt/harness/wptrunner/metadata.py
@@ -32,7 +32,7 @@ def load_test_manifests(serve_root, test_paths):
def update_expected(test_paths, serve_root, log_file_names,
rev_old=None, rev_new="HEAD", ignore_existing=False,
- sync_root=None):
+ sync_root=None, property_order=None, boolean_properties=None):
"""Update the metadata files for web-platform-tests based on
the results obtained in a previous run"""
@@ -51,7 +51,9 @@ def update_expected(test_paths, serve_root, log_file_names,
expected_map_by_manifest = update_from_logs(manifests,
*log_file_names,
- ignore_existing=ignore_existing)
+ ignore_existing=ignore_existing,
+ property_order=property_order,
+ boolean_properties=boolean_properties)
for test_manifest, expected_map in expected_map_by_manifest.iteritems():
url_base = manifests[test_manifest]["url_base"]
@@ -127,14 +129,19 @@ def unexpected_changes(manifests, change_data, files_changed):
def update_from_logs(manifests, *log_filenames, **kwargs):
- ignore_existing = kwargs.pop("ignore_existing", False)
+ ignore_existing = kwargs.get("ignore_existing", False)
+ property_order = kwargs.get("property_order")
+ boolean_properties = kwargs.get("boolean_properties")
expected_map = {}
id_test_map = {}
for test_manifest, paths in manifests.iteritems():
- expected_map_manifest, id_path_map_manifest = create_test_tree(paths["metadata_path"],
- test_manifest)
+ expected_map_manifest, id_path_map_manifest = create_test_tree(
+ paths["metadata_path"],
+ test_manifest,
+ property_order=property_order,
+ boolean_properties=boolean_properties)
expected_map[test_manifest] = expected_map_manifest
id_test_map.update(id_path_map_manifest)
@@ -284,15 +291,22 @@ class ExpectedUpdater(object):
del self.test_cache[test_id]
-def create_test_tree(metadata_path, test_manifest):
+def create_test_tree(metadata_path, test_manifest, property_order=None,
+ boolean_properties=None):
expected_map = {}
id_test_map = {}
exclude_types = frozenset(["stub", "helper", "manual"])
include_types = set(manifest.item_types) - exclude_types
for test_path, tests in test_manifest.itertypes(*include_types):
- expected_data = load_expected(test_manifest, metadata_path, test_path, tests)
+ expected_data = load_expected(test_manifest, metadata_path, test_path, tests,
+ property_order=property_order,
+ boolean_properties=boolean_properties)
if expected_data is None:
- expected_data = create_expected(test_manifest, test_path, tests)
+ expected_data = create_expected(test_manifest,
+ test_path,
+ tests,
+ property_order=property_order,
+ boolean_properties=boolean_properties)
for test in tests:
id_test_map[test.id] = (test_manifest, test)
@@ -301,17 +315,23 @@ def create_test_tree(metadata_path, test_manifest):
return expected_map, id_test_map
-def create_expected(test_manifest, test_path, tests):
- expected = manifestupdate.ExpectedManifest(None, test_path, test_manifest.url_base)
+def create_expected(test_manifest, test_path, tests, property_order=None,
+ boolean_properties=None):
+ expected = manifestupdate.ExpectedManifest(None, test_path, test_manifest.url_base,
+ property_order=property_order,
+ boolean_properties=boolean_properties)
for test in tests:
expected.append(manifestupdate.TestNode.create(test.item_type, test.id))
return expected
-def load_expected(test_manifest, metadata_path, test_path, tests):
+def load_expected(test_manifest, metadata_path, test_path, tests, property_order=None,
+ boolean_properties=None):
expected_manifest = manifestupdate.get_manifest(metadata_path,
test_path,
- test_manifest.url_base)
+ test_manifest.url_base,
+ property_order=property_order,
+ boolean_properties=boolean_properties)
if expected_manifest is None:
return
diff --git a/tests/wpt/harness/wptrunner/products.py b/tests/wpt/harness/wptrunner/products.py
index f67a51cf300..25fc7a49d6a 100644
--- a/tests/wpt/harness/wptrunner/products.py
+++ b/tests/wpt/harness/wptrunner/products.py
@@ -55,3 +55,18 @@ def load_product(config, product):
browser_cls, browser_kwargs,
executor_classes, executor_kwargs,
env_options, run_info_extras)
+
+
+def load_product_update(config, product):
+ """Return tuple of (property_order, boolean_properties) indicating the
+ run_info properties to use when constructing the expectation data for
+ this product. None for either key indicates that the default keys
+ appropriate for distinguishing based on platform will be used."""
+
+ module = product_module(config, product)
+ data = module.__wptrunner__
+
+ update_properties = (getattr(module, data["update_properties"])()
+ if "update_properties" in data else (None, None))
+
+ return update_properties
diff --git a/tests/wpt/harness/wptrunner/update/metadata.py b/tests/wpt/harness/wptrunner/update/metadata.py
index dbcc9f99951..c62dfec465e 100644
--- a/tests/wpt/harness/wptrunner/update/metadata.py
+++ b/tests/wpt/harness/wptrunner/update/metadata.py
@@ -4,10 +4,21 @@
import os
-from .. import metadata
+from .. import metadata, products
from base import Step, StepRunner
+class GetUpdatePropertyList(Step):
+ provides = ["property_order", "boolean_properties"]
+
+
+ def create(self, state):
+ property_order, boolean_properties = products.load_product_update(
+ state.config, state.product)
+ state.property_order = property_order
+ state.boolean_properties = boolean_properties
+
+
class UpdateExpected(Step):
"""Do the metadata update on the local checkout"""
@@ -24,7 +35,9 @@ class UpdateExpected(Step):
state.run_log,
rev_old=None,
ignore_existing=state.ignore_existing,
- sync_root=sync_root)
+ sync_root=sync_root,
+ property_order=state.property_order,
+ boolean_properties=state.boolean_properties)
class CreateMetadataPatch(Step):
@@ -57,5 +70,6 @@ class CreateMetadataPatch(Step):
class MetadataUpdateRunner(StepRunner):
"""(Sub)Runner for updating metadata"""
- steps = [UpdateExpected,
+ steps = [GetUpdatePropertyList,
+ UpdateExpected,
CreateMetadataPatch]
diff --git a/tests/wpt/harness/wptrunner/update/update.py b/tests/wpt/harness/wptrunner/update/update.py
index 2fb9443349e..213622c2a1a 100644
--- a/tests/wpt/harness/wptrunner/update/update.py
+++ b/tests/wpt/harness/wptrunner/update/update.py
@@ -91,6 +91,8 @@ class UpdateMetadata(Step):
state.ignore_existing = kwargs["ignore_existing"]
state.no_patch = kwargs["no_patch"]
state.suite_name = kwargs["suite_name"]
+ state.product = kwargs["product"]
+ state.config = kwargs["config"]
runner = MetadataUpdateRunner(self.logger, state)
runner.run()
diff --git a/tests/wpt/harness/wptrunner/wptcommandline.py b/tests/wpt/harness/wptrunner/wptcommandline.py
index d0c97b92bce..96b69060767 100644
--- a/tests/wpt/harness/wptrunner/wptcommandline.py
+++ b/tests/wpt/harness/wptrunner/wptcommandline.py
@@ -155,7 +155,7 @@ def create_parser(product_choices=None):
gecko_group.add_argument("--prefs-root", dest="prefs_root", action="store", type=abs_path,
help="Path to the folder containing browser prefs")
gecko_group.add_argument("--e10s", dest="gecko_e10s", action="store_true",
- help="Path to the folder containing browser prefs")
+ help="Run tests with electrolysis preferences")
b2g_group = parser.add_argument_group("B2G-specific")
b2g_group.add_argument("--b2g-no-backup", action="store_true", default=False,
@@ -338,12 +338,25 @@ def check_args(kwargs):
return kwargs
+def check_args_update(kwargs):
+ set_from_config(kwargs)
+
+ if kwargs["product"] is None:
+ kwargs["product"] = "firefox"
-def create_parser_update():
+def create_parser_update(product_choices=None):
from mozlog.structured import commandline
+ import products
+
+ if product_choices is None:
+ config_data = config.load()
+ product_choices = products.products_enabled(config_data)
+
parser = argparse.ArgumentParser("web-platform-tests-update",
description="Update script for web-platform-tests tests.")
+ parser.add_argument("--product", action="store", choices=product_choices,
+ default=None, help="Browser for which metadata is being updated")
parser.add_argument("--config", action="store", type=abs_path, help="Path to config file")
parser.add_argument("--metadata", action="store", type=abs_path, dest="metadata_root",
help="Path to the folder containing test metadata"),
@@ -386,7 +399,7 @@ def parse_args():
def parse_args_update():
parser = create_parser_update()
rv = vars(parser.parse_args())
- set_from_config(rv)
+ check_args_update(rv)
return rv
diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/perspective-translateZ-positive.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/perspective-translateZ-positive.htm.ini
new file mode 100644
index 00000000000..21a94049f86
--- /dev/null
+++ b/tests/wpt/metadata-css/css-transforms-1_dev/html/perspective-translateZ-positive.htm.ini
@@ -0,0 +1,3 @@
+[perspective-translateZ-positive.htm]
+ type: reftest
+ disabled: https://github.com/servo/servo/issues/9163
diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-stacking-003.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-stacking-003.htm.ini
new file mode 100644
index 00000000000..4c6d5b6268e
--- /dev/null
+++ b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-stacking-003.htm.ini
@@ -0,0 +1,3 @@
+[transform-stacking-003.htm]
+ type: reftest
+ disabled: https://github.com/servo/servo/issues/9303
diff --git a/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-stacking-004.htm.ini b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-stacking-004.htm.ini
new file mode 100644
index 00000000000..a2120be469c
--- /dev/null
+++ b/tests/wpt/metadata-css/css-transforms-1_dev/html/transform-stacking-004.htm.ini
@@ -0,0 +1,3 @@
+[transform-stacking-004.htm]
+ type: reftest
+ disabled: https://github.com/servo/servo/issues/9448
diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json
index 3926a713fc3..92a73d95a49 100644
--- a/tests/wpt/mozilla/meta/MANIFEST.json
+++ b/tests/wpt/mozilla/meta/MANIFEST.json
@@ -4608,6 +4608,18 @@
"url": "/_mozilla/css/text_justify_none_a.html"
}
],
+ "css/text_node_opacity.html": [
+ {
+ "path": "css/text_node_opacity.html",
+ "references": [
+ [
+ "/_mozilla/css/text_node_opacity_ref.html",
+ "=="
+ ]
+ ],
+ "url": "/_mozilla/css/text_node_opacity.html"
+ }
+ ],
"css/text_overflow_a.html": [
{
"path": "css/text_overflow_a.html",
@@ -10724,6 +10736,18 @@
"url": "/_mozilla/css/text_justify_none_a.html"
}
],
+ "css/text_node_opacity.html": [
+ {
+ "path": "css/text_node_opacity.html",
+ "references": [
+ [
+ "/_mozilla/css/text_node_opacity_ref.html",
+ "=="
+ ]
+ ],
+ "url": "/_mozilla/css/text_node_opacity.html"
+ }
+ ],
"css/text_overflow_a.html": [
{
"path": "css/text_overflow_a.html",
diff --git a/tests/wpt/mozilla/meta/css/position_fixed_a.html.ini b/tests/wpt/mozilla/meta/css/position_fixed_a.html.ini
new file mode 100644
index 00000000000..d632a59e874
--- /dev/null
+++ b/tests/wpt/mozilla/meta/css/position_fixed_a.html.ini
@@ -0,0 +1,3 @@
+[position_fixed_a.html]
+ type: reftest
+ disabled: https://github.com/servo/servo/issues/9106
diff --git a/tests/wpt/mozilla/tests/css/text_node_opacity.html b/tests/wpt/mozilla/tests/css/text_node_opacity.html
new file mode 100644
index 00000000000..6bb8d9c091c
--- /dev/null
+++ b/tests/wpt/mozilla/tests/css/text_node_opacity.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <link rel='match' href='text_node_opacity_ref.html'>
+ <link rel="stylesheet" type="text/css" href="css/ahem.css">
+ <style type="text/css">
+ html, body {
+ margin: 0;
+ font-size: 100px;
+ line-height: 1;
+ }
+ div {
+ opacity: 0.5;
+ color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div>A</div>
+ </body>
+</html>
diff --git a/tests/wpt/mozilla/tests/css/text_node_opacity_ref.html b/tests/wpt/mozilla/tests/css/text_node_opacity_ref.html
new file mode 100644
index 00000000000..0d1bfeaca47
--- /dev/null
+++ b/tests/wpt/mozilla/tests/css/text_node_opacity_ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ html, body {
+ margin: 0;
+ }
+ div {
+ position: absolute;
+ width: 100px;
+ height: 100px;
+ opacity: 0.5;
+ background-color: green;
+ }
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>