diff options
51 files changed, 226 insertions, 196 deletions
diff --git a/Cargo.lock b/Cargo.lock index e04ebaa0b67..4d77cee7d6b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ dependencies = [ "msg 0.0.1", "net 0.0.1", "script 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -17,7 +17,7 @@ name = "alert" version = "0.1.0" source = "git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e" dependencies = [ - "cocoa 0.1.0 (git+https://github.com/servo/rust-cocoa#cfbf6d9d5a68d3c8f424d678aa22096c49136e25)", + "cocoa 0.1.0 (git+https://github.com/servo/rust-cocoa#acb9b4efc70c3f285057c2aee774f38f81a1b98d)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", ] @@ -50,7 +50,7 @@ dependencies = [ [[package]] name = "cocoa" version = "0.1.0" -source = "git+https://github.com/servo/rust-cocoa#cfbf6d9d5a68d3c8f424d678aa22096c49136e25" +source = "git+https://github.com/servo/rust-cocoa#acb9b4efc70c3f285057c2aee774f38f81a1b98d" [[package]] name = "compositing" @@ -73,7 +73,7 @@ dependencies = [ "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)", "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "script_traits 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -102,9 +102,9 @@ dependencies = [ [[package]] name = "cssparser" version = "0.1.0" -source = "git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407" +source = "git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6" dependencies = [ - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", ] [[package]] @@ -130,7 +130,7 @@ source = "git+https://github.com/servo/rust-egl#88f2a13812ddbce2bf2317221663a61c [[package]] name = "encoding" version = "0.1.0" -source = "git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79" +source = "git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265" [[package]] name = "expat-sys" @@ -188,7 +188,7 @@ dependencies = [ "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)", "style 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -222,10 +222,10 @@ source = "git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99 [[package]] name = "http" version = "0.1.0-pre" -source = "git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7" +source = "git+https://github.com/servo/rust-http?ref=servo#92019011b0cdf1bffc8c584830de1bf330d79d0d" dependencies = [ "openssl 0.0.0 (git+https://github.com/sfackler/rust-openssl.git#a495465b75ffb18ff2303c5a11a103e00a15a13d)", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", ] [[package]] @@ -279,7 +279,7 @@ dependencies = [ name = "layout" version = "0.0.1" dependencies = [ - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "gfx 0.0.1", "layout_traits 0.0.1", @@ -288,7 +288,7 @@ dependencies = [ "script 0.0.1", "script_traits 0.0.1", "style 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -322,7 +322,7 @@ dependencies = [ "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#7038341220bd7e86e21118fac2cbc6bd50890e47)", "layers 0.1.0 (git+https://github.com/servo/rust-layers#ed570335738913fb41fc62a024389dfa415962e8)", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -331,10 +331,10 @@ name = "net" version = "0.0.1" dependencies = [ "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", - "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7)", + "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#92019011b0cdf1bffc8c584830de1bf330d79d0d)", "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -385,12 +385,12 @@ name = "script" version = "0.0.1" dependencies = [ "canvas 0.0.1", - "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407)", + "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6)", "devtools_traits 0.0.1", - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "gfx 0.0.1", - "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7)", + "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#92019011b0cdf1bffc8c584830de1bf330d79d0d)", "hubbub 0.1.0 (git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)", "msg 0.0.1", @@ -398,8 +398,9 @@ dependencies = [ "plugins 0.0.1", "script_traits 0.0.1", "style 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", + "uuid 0.0.1 (git+https://github.com/rust-lang/uuid#c3041068f413a5e46d795d21a346072794593839)", ] [[package]] @@ -410,7 +411,7 @@ dependencies = [ "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "msg 0.0.1", "net 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", ] [[package]] @@ -454,12 +455,12 @@ dependencies = [ name = "style" version = "0.0.1" dependencies = [ - "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407)", - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "lazy_static 0.1.0 (git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360)", "plugins 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -470,9 +471,9 @@ version = "0.0.1" [[package]] name = "url" version = "0.1.0" -source = "git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379" +source = "git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243" dependencies = [ - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", ] [[package]] @@ -483,10 +484,15 @@ dependencies = [ "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)", "task_info 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", ] [[package]] +name = "uuid" +version = "0.0.1" +source = "git+https://github.com/rust-lang/uuid#c3041068f413a5e46d795d21a346072794593839" + +[[package]] name = "xlib" version = "0.1.0" source = "git+https://github.com/servo/rust-xlib#581d4faddec5188d3c3ae5307dbea28aab90644c" diff --git a/components/devtools/actor.rs b/components/devtools/actor.rs index 8a2d0be8c12..99222d3e11a 100644 --- a/components/devtools/actor.rs +++ b/components/devtools/actor.rs @@ -19,7 +19,7 @@ pub trait Actor: Any { fn handle_message(&self, registry: &ActorRegistry, msg_type: &String, - msg: &json::Object, + msg: &json::JsonObject, stream: &mut TcpStream) -> bool; fn name(&self) -> String; } @@ -150,7 +150,7 @@ impl ActorRegistry { /// Attempt to process a message as directed by its `to` property. If the actor is not /// found or does not indicate that it knew how to process the message, ignore the failure. - pub fn handle_message(&mut self, msg: &json::Object, stream: &mut TcpStream) { + pub fn handle_message(&mut self, msg: &json::JsonObject, stream: &mut TcpStream) { let to = msg.find(&"to".to_string()).unwrap().as_string().unwrap(); match self.actors.find(&to.to_string()) { None => println!("message received for unknown actor \"{:s}\"", to), diff --git a/components/devtools/actors/console.rs b/components/devtools/actors/console.rs index c58d7f6373f..a4be9967527 100644 --- a/components/devtools/actors/console.rs +++ b/components/devtools/actors/console.rs @@ -70,7 +70,7 @@ enum ConsoleMessageType { #[deriving(Encodable)] struct GetCachedMessagesReply { from: String, - messages: Vec<json::Object>, + messages: Vec<json::JsonObject>, } #[deriving(Encodable)] @@ -111,7 +111,7 @@ impl Actor for ConsoleActor { fn handle_message(&self, _registry: &ActorRegistry, msg_type: &String, - msg: &json::Object, + msg: &json::JsonObject, stream: &mut TcpStream) -> bool { match msg_type.as_slice() { "getCachedMessages" => { diff --git a/components/devtools/actors/inspector.rs b/components/devtools/actors/inspector.rs index 67e480c61de..89ef092a137 100644 --- a/components/devtools/actors/inspector.rs +++ b/components/devtools/actors/inspector.rs @@ -59,7 +59,7 @@ impl Actor for HighlighterActor { fn handle_message(&self, _registry: &ActorRegistry, msg_type: &String, - _msg: &json::Object, + _msg: &json::JsonObject, stream: &mut TcpStream) -> bool { match msg_type.as_slice() { "showBoxModel" => { @@ -217,7 +217,7 @@ impl Actor for WalkerActor { fn handle_message(&self, registry: &ActorRegistry, msg_type: &String, - msg: &json::Object, + msg: &json::JsonObject, stream: &mut TcpStream) -> bool { match msg_type.as_slice() { "querySelector" => { @@ -362,7 +362,7 @@ impl Actor for PageStyleActor { fn handle_message(&self, registry: &ActorRegistry, msg_type: &String, - msg: &json::Object, + msg: &json::JsonObject, stream: &mut TcpStream) -> bool { match msg_type.as_slice() { "getApplied" => { @@ -433,7 +433,7 @@ impl Actor for InspectorActor { fn handle_message(&self, registry: &ActorRegistry, msg_type: &String, - _msg: &json::Object, + _msg: &json::JsonObject, stream: &mut TcpStream) -> bool { match msg_type.as_slice() { "getWalker" => { diff --git a/components/devtools/actors/root.rs b/components/devtools/actors/root.rs index 8ebd79e4016..8968749f2c5 100644 --- a/components/devtools/actors/root.rs +++ b/components/devtools/actors/root.rs @@ -53,7 +53,7 @@ impl Actor for RootActor { fn handle_message(&self, registry: &ActorRegistry, msg_type: &String, - _msg: &json::Object, + _msg: &json::JsonObject, stream: &mut TcpStream) -> bool { match msg_type.as_slice() { "listAddons" => { diff --git a/components/devtools/actors/tab.rs b/components/devtools/actors/tab.rs index c9cc3481264..2e5cb6d10b0 100644 --- a/components/devtools/actors/tab.rs +++ b/components/devtools/actors/tab.rs @@ -76,7 +76,7 @@ impl Actor for TabActor { fn handle_message(&self, _registry: &ActorRegistry, msg_type: &String, - _msg: &json::Object, + _msg: &json::JsonObject, stream: &mut TcpStream) -> bool { match msg_type.as_slice() { "reconfigure" => { diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs index 674e5f7bcec..7640aa9e0c6 100644 --- a/components/gfx/text/shaping/harfbuzz.rs +++ b/components/gfx/text/shaping/harfbuzz.rs @@ -258,7 +258,7 @@ impl Shaper { // loc refers to a *byte* offset within the utf8 string. let loc = glyph_data.byte_offset_of_glyph(i); if loc < byte_max { - assert!(*byte_to_glyph.get(loc as uint) != CONTINUATION_BYTE); + assert!(byte_to_glyph[loc as uint] != CONTINUATION_BYTE); *byte_to_glyph.get_mut(loc as uint) = i as i32; } else { debug!("ERROR: tried to set out of range byte_to_glyph: idx={}, glyph idx={}", diff --git a/components/layout/inline.rs b/components/layout/inline.rs index d67bbe5e0d6..f3d34d45f40 100644 --- a/components/layout/inline.rs +++ b/components/layout/inline.rs @@ -680,7 +680,7 @@ impl InlineFragments { /// Merges another set of inline fragments with this one. pub fn push_all(&mut self, fragments: InlineFragments) { - self.fragments.push_all_move(fragments.fragments); + self.fragments.extend(fragments.fragments.into_iter()); } /// A convenience function to return the fragment at a given index. diff --git a/components/plugins/lib.rs b/components/plugins/lib.rs index 741a82ee045..221de13d289 100644 --- a/components/plugins/lib.rs +++ b/components/plugins/lib.rs @@ -15,7 +15,7 @@ extern crate sync; use rustc::lint::LintPassObject; use rustc::plugin::Registry; -use syntax::ext::base::ItemDecorator; +use syntax::ext::base::Decorator; use syntax::parse::token::intern; @@ -27,6 +27,6 @@ mod jstraceable; pub fn plugin_registrar(reg: &mut Registry) { reg.register_lint_pass(box lints::TransmutePass as LintPassObject); reg.register_lint_pass(box lints::UnrootedPass as LintPassObject); - reg.register_syntax_extension(intern("jstraceable"), ItemDecorator(box jstraceable::expand_jstraceable)) + reg.register_syntax_extension(intern("jstraceable"), Decorator(box jstraceable::expand_jstraceable)) } diff --git a/components/plugins/lints.rs b/components/plugins/lints.rs index 3d77b90a92f..605240d74e9 100644 --- a/components/plugins/lints.rs +++ b/components/plugins/lints.rs @@ -54,7 +54,7 @@ fn lint_unrooted_ty(cx: &Context, ty: &ast::Ty, warning: &str) { ast::TyPtr(ast::MutTy { ty: ref t, ..}) | ast::TyRptr(_, ast::MutTy { ty: ref t, ..}) => lint_unrooted_ty(cx, &**t, warning), ast::TyPath(_, _, id) => { match cx.tcx.def_map.borrow().get_copy(&id) { - def::DefTy(def_id) => { + def::DefTy(def_id, _) => { if ty::has_attr(cx.tcx, def_id, "must_root") { cx.span_lint(UNROOTED_MUST_ROOT, ty.span, warning); } diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index cfd3c3d8e44..b5587cc8ee3 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -57,3 +57,6 @@ git = "https://github.com/servo/rust-mozjs" [dependencies.url] git = "https://github.com/servo/rust-url" + +[dependencies.uuid] +git = "https://github.com/rust-lang/uuid" diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index eaab5263507..cc5ebbe96a5 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -5,7 +5,7 @@ use dom::bindings::codegen::Bindings::AttrBinding; use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; use dom::bindings::codegen::InheritTypes::NodeCast; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, Temporary}; use dom::bindings::trace::Traceable; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; @@ -112,7 +112,7 @@ impl Attr { name: Atom, namespace: Namespace, prefix: Option<DOMString>, owner: JSRef<Element>) -> Temporary<Attr> { reflect_dom_object(box Attr::new_inherited(local_name, value, name, namespace, prefix, owner), - &Window(window), AttrBinding::Wrap) + &global::Window(window), AttrBinding::Wrap) } } diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs index 8ce5b55e9d3..2afd91fd08b 100644 --- a/components/script/dom/bindings/conversions.rs +++ b/components/script/dom/bindings/conversions.rs @@ -23,7 +23,7 @@ use js::jsval::{UndefinedValue, NullValue, BooleanValue, Int32Value, UInt32Value use js::jsval::{StringValue, ObjectValue, ObjectOrNullValue}; use js::glue::RUST_JS_NumberValue; use libc; -use std::default::Default; +use std::default; use std::slice; use dom::bindings::codegen::PrototypeList; @@ -67,10 +67,10 @@ impl ToJSValConvertible for JSVal { } } -unsafe fn convert_from_jsval<T: Default>( +unsafe fn convert_from_jsval<T: default::Default>( cx: *mut JSContext, value: JSVal, convert_fn: unsafe extern "C" fn(*mut JSContext, JSVal, *mut T) -> JSBool) -> Result<T, ()> { - let mut ret = Default::default(); + let mut ret = default::Default::default(); if convert_fn(cx, value, &mut ret) == 0 { Err(()) } else { @@ -246,7 +246,7 @@ pub enum StringificationBehavior { Empty, } -impl Default for StringificationBehavior { +impl default::Default for StringificationBehavior { fn default() -> StringificationBehavior { Default } @@ -355,12 +355,12 @@ impl<T: ToJSValConvertible> ToJSValConvertible for Option<T> { } } -impl<X: Default, T: FromJSValConvertible<X>> FromJSValConvertible<()> for Option<T> { +impl<X: default::Default, T: FromJSValConvertible<X>> FromJSValConvertible<()> for Option<T> { fn from_jsval(cx: *mut JSContext, value: JSVal, _: ()) -> Result<Option<T>, ()> { if value.is_null_or_undefined() { Ok(None) } else { - let option: X = Default::default(); + let option: X = default::Default::default(); let result: Result<T, ()> = FromJSValConvertible::from_jsval(cx, value, option); result.map(Some) } diff --git a/components/script/dom/bindings/global.rs b/components/script/dom/bindings/global.rs index 2a6252d4f1e..291f22426cb 100644 --- a/components/script/dom/bindings/global.rs +++ b/components/script/dom/bindings/global.rs @@ -11,7 +11,7 @@ use dom::bindings::conversions::FromJSValConvertible; use dom::bindings::js::{JS, JSRef, Root}; use dom::bindings::utils::{Reflectable, Reflector}; use dom::workerglobalscope::WorkerGlobalScope; -use dom::window::Window; +use dom::window; use script_task::ScriptChan; use servo_net::resource_task::ResourceTask; @@ -27,13 +27,13 @@ use std::ptr; /// A freely-copyable reference to a rooted global object. pub enum GlobalRef<'a> { - Window(JSRef<'a, Window>), + Window(JSRef<'a, window::Window>), Worker(JSRef<'a, WorkerGlobalScope>), } /// A stack-based rooted reference to a global object. pub enum GlobalRoot<'a, 'b> { - WindowRoot(Root<'a, 'b, Window>), + WindowRoot(Root<'a, 'b, window::Window>), WorkerRoot(Root<'a, 'b, WorkerGlobalScope>), } @@ -42,7 +42,7 @@ pub enum GlobalRoot<'a, 'b> { #[jstraceable] #[must_root] pub enum GlobalField { - WindowField(JS<Window>), + WindowField(JS<window::Window>), WorkerField(JS<WorkerGlobalScope>), } @@ -58,7 +58,7 @@ impl<'a> GlobalRef<'a> { /// Extract a `Window`, causing task failure if the global object is not /// a `Window`. - pub fn as_window<'b>(&'b self) -> JSRef<'b, Window> { + pub fn as_window<'b>(&'b self) -> JSRef<'b, window::Window> { match *self { Window(window) => window, Worker(_) => fail!("expected a Window scope"), diff --git a/components/script/dom/dedicatedworkerglobalscope.rs b/components/script/dom/dedicatedworkerglobalscope.rs index 11156bdf1e6..d043bde2b62 100644 --- a/components/script/dom/dedicatedworkerglobalscope.rs +++ b/components/script/dom/dedicatedworkerglobalscope.rs @@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding::Dedicat use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull; use dom::bindings::codegen::InheritTypes::DedicatedWorkerGlobalScopeDerived; use dom::bindings::codegen::InheritTypes::{EventTargetCast, WorkerGlobalScopeCast}; -use dom::bindings::global::Worker; +use dom::bindings::global; use dom::bindings::js::{JSRef, Temporary, RootCollection}; use dom::bindings::trace::Untraceable; use dom::bindings::utils::{Reflectable, Reflector}; @@ -130,7 +130,7 @@ impl DedicatedWorkerGlobalScope { ptr::null(), ptr::null_mut()) != 0); } - MessageEvent::dispatch_jsval(target, &Worker(scope), message); + MessageEvent::dispatch_jsval(target, &global::Worker(scope), message); global.delayed_release_worker(); }, Ok(XHRProgressMsg(addr, progress)) => { diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index 41837aa5130..63f205206fa 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -19,7 +19,8 @@ use dom::bindings::codegen::InheritTypes::{HTMLFormElementDerived, HTMLImageElem use dom::bindings::codegen::InheritTypes::{HTMLScriptElementDerived}; use dom::bindings::error::{ErrorResult, Fallible, NotSupported, InvalidCharacter}; use dom::bindings::error::{HierarchyRequest, NamespaceError}; -use dom::bindings::global::{GlobalRef, Window}; +use dom::bindings::global::GlobalRef; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, Temporary, OptionalSettable, TemporaryPushable}; use dom::bindings::js::OptionalRootable; use dom::bindings::trace::{Traceable, Untraceable}; @@ -322,7 +323,7 @@ impl Document { pub fn new(window: JSRef<Window>, url: Option<Url>, doctype: IsHTMLDocument, content_type: Option<DOMString>) -> Temporary<Document> { let document = reflect_dom_object(box Document::new_inherited(window, url, doctype, content_type), - &Window(window), + &global::Window(window), DocumentBinding::Wrap).root(); let node: JSRef<Node> = NodeCast::from_ref(*document); @@ -584,10 +585,14 @@ impl<'a> DocumentMethods for JSRef<'a, Document> { let window = self.window.root(); match interface.as_slice().to_ascii_lower().as_slice() { - "uievents" | "uievent" => Ok(EventCast::from_temporary(UIEvent::new_uninitialized(*window))), - "mouseevents" | "mouseevent" => Ok(EventCast::from_temporary(MouseEvent::new_uninitialized(*window))), - "customevent" => Ok(EventCast::from_temporary(CustomEvent::new_uninitialized(&Window(*window)))), - "htmlevents" | "events" | "event" => Ok(Event::new_uninitialized(&Window(*window))), + "uievents" | "uievent" => Ok(EventCast::from_temporary( + UIEvent::new_uninitialized(*window))), + "mouseevents" | "mouseevent" => Ok(EventCast::from_temporary( + MouseEvent::new_uninitialized(*window))), + "customevent" => Ok(EventCast::from_temporary( + CustomEvent::new_uninitialized(&global::Window(*window)))), + "htmlevents" | "events" | "event" => Ok(Event::new_uninitialized( + &global::Window(*window))), _ => Err(NotSupported) } } diff --git a/components/script/dom/domparser.rs b/components/script/dom/domparser.rs index 3f9e3bbb827..315a3851bb1 100644 --- a/components/script/dom/domparser.rs +++ b/components/script/dom/domparser.rs @@ -6,7 +6,8 @@ use dom::bindings::codegen::Bindings::DOMParserBinding; use dom::bindings::codegen::Bindings::DOMParserBinding::DOMParserMethods; use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedTypeValues::{Text_html, Text_xml}; use dom::bindings::error::{Fallible, FailureUnknown}; -use dom::bindings::global::{GlobalRef, Window}; +use dom::bindings::global::GlobalRef; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, Temporary}; use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object}; use dom::document::{Document, HTMLDocument, NonHTMLDocument}; @@ -29,7 +30,7 @@ impl DOMParser { } pub fn new(window: JSRef<Window>) -> Temporary<DOMParser> { - reflect_dom_object(box DOMParser::new_inherited(window), &Window(window), + reflect_dom_object(box DOMParser::new_inherited(window), &global::Window(window), DOMParserBinding::Wrap) } diff --git a/components/script/dom/domrect.rs b/components/script/dom/domrect.rs index 2075f64a377..3c79479edab 100644 --- a/components/script/dom/domrect.rs +++ b/components/script/dom/domrect.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::DOMRectBinding; use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::window::Window; @@ -36,7 +36,7 @@ impl DOMRect { top: Au, bottom: Au, left: Au, right: Au) -> Temporary<DOMRect> { reflect_dom_object(box DOMRect::new_inherited(top, bottom, left, right), - &Window(window), DOMRectBinding::Wrap) + &global::Window(window), DOMRectBinding::Wrap) } } diff --git a/components/script/dom/domrectlist.rs b/components/script/dom/domrectlist.rs index b85ef800deb..8be9ab9cbf6 100644 --- a/components/script/dom/domrectlist.rs +++ b/components/script/dom/domrectlist.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::DOMRectListBinding; use dom::bindings::codegen::Bindings::DOMRectListBinding::DOMRectListMethods; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::domrect::DOMRect; @@ -32,7 +32,7 @@ impl DOMRectList { pub fn new(window: JSRef<Window>, rects: Vec<JSRef<DOMRect>>) -> Temporary<DOMRectList> { reflect_dom_object(box DOMRectList::new_inherited(window, rects), - &Window(window), DOMRectListBinding::Wrap) + &global::Window(window), DOMRectListBinding::Wrap) } } diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 7852f7aae0a..a4ae4734ffc 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -142,7 +142,7 @@ pub enum ElementTypeId { HTMLVideoElementTypeId, HTMLUnknownElementTypeId, - ElementTypeId, + ElementTypeId_, } // @@ -164,7 +164,7 @@ impl Element { } pub fn new(local_name: DOMString, namespace: Namespace, prefix: Option<DOMString>, document: JSRef<Document>) -> Temporary<Element> { - Node::reflect_node(box Element::new_inherited(ElementTypeId, local_name, namespace, prefix, document), + Node::reflect_node(box Element::new_inherited(ElementTypeId_, local_name, namespace, prefix, document), document, ElementBinding::Wrap) } } diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index 857dbb2ef5d..1d9613c6259 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -5,7 +5,7 @@ use dom::bindings::codegen::Bindings::HTMLCollectionBinding; use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods; use dom::bindings::codegen::InheritTypes::{ElementCast, NodeCast}; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, Temporary}; use dom::bindings::trace::JSTraceable; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; @@ -46,7 +46,7 @@ impl HTMLCollection { pub fn new(window: JSRef<Window>, collection: CollectionTypeId) -> Temporary<HTMLCollection> { reflect_dom_object(box HTMLCollection::new_inherited(collection), - &Window(window), HTMLCollectionBinding::Wrap) + &global::Window(window), HTMLCollectionBinding::Wrap) } } @@ -191,8 +191,10 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { root.deref().traverse_preorder() .filter_map(|node| { let elem: Option<JSRef<Element>> = ElementCast::to_ref(node); - elem.filtered(|&elem| filter.filter(elem, *root)) - .map(|elem| elem.clone()) + match elem { + Some(ref elem) if filter.filter(*elem, *root) => Some(elem.clone()), + _ => None + } }) .nth(index as uint) .clone() @@ -221,8 +223,10 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { root.deref().traverse_preorder() .filter_map(|node| { let elem: Option<JSRef<Element>> = ElementCast::to_ref(node); - elem.filtered(|&elem| filter.filter(elem, *root)) - .map(|elem| elem.clone()) + match elem { + Some(ref elem) if filter.filter(*elem, *root) => Some(elem.clone()), + _ => None + } }) .find(|elem| { elem.get_string_attribute("name") == key || diff --git a/components/script/dom/htmlelement.rs b/components/script/dom/htmlelement.rs index c8831eab573..e0d0d213d83 100644 --- a/components/script/dom/htmlelement.rs +++ b/components/script/dom/htmlelement.rs @@ -12,7 +12,7 @@ use dom::bindings::codegen::InheritTypes::{HTMLElementDerived, HTMLBodyElementDe use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector}; use dom::document::Document; -use dom::element::{Element, ElementTypeId, HTMLElementTypeId}; +use dom::element::{Element, ElementTypeId, ElementTypeId_, HTMLElementTypeId}; use dom::eventtarget::{EventTarget, EventTargetHelpers, NodeTargetTypeId}; use dom::node::{Node, ElementNodeTypeId, window_from_node}; use dom::virtualmethods::VirtualMethods; @@ -30,7 +30,7 @@ pub struct HTMLElement { impl HTMLElementDerived for EventTarget { fn is_htmlelement(&self) -> bool { match self.type_id { - NodeTargetTypeId(ElementNodeTypeId(ElementTypeId)) => false, + NodeTargetTypeId(ElementNodeTypeId(ElementTypeId_)) => false, NodeTargetTypeId(ElementNodeTypeId(_)) => true, _ => false } diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs index e29010ec2ec..08511ba87d3 100644 --- a/components/script/dom/htmlscriptelement.rs +++ b/components/script/dom/htmlscriptelement.rs @@ -94,7 +94,7 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> { }, Some(ref s) => { debug!("script language={:s}", *s); - SCRIPT_JS_MIMES.contains(&"text/".to_string().append(s.as_slice()).as_slice()) + SCRIPT_JS_MIMES.contains(&format!("text/{}", s).as_slice()) }, None => { debug!("no script type or language, inferring js"); diff --git a/components/script/dom/location.rs b/components/script/dom/location.rs index 36f7c47cca6..baa57fba1c6 100644 --- a/components/script/dom/location.rs +++ b/components/script/dom/location.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::LocationBinding; use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::urlhelper::UrlHelper; @@ -32,7 +32,7 @@ impl Location { pub fn new(window: JSRef<Window>, page: Rc<Page>) -> Temporary<Location> { reflect_dom_object(box Location::new_inherited(page), - &Window(window), + &global::Window(window), LocationBinding::Wrap) } } diff --git a/components/script/dom/mouseevent.rs b/components/script/dom/mouseevent.rs index c0df0bb9752..9efc5a97d3e 100644 --- a/components/script/dom/mouseevent.rs +++ b/components/script/dom/mouseevent.rs @@ -7,7 +7,8 @@ use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods; use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods; use dom::bindings::codegen::InheritTypes::{UIEventCast, MouseEventDerived}; use dom::bindings::error::Fallible; -use dom::bindings::global::{GlobalRef, Window}; +use dom::bindings::global::GlobalRef; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, RootedReference, Temporary, OptionalSettable}; use dom::bindings::trace::Traceable; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; @@ -59,7 +60,7 @@ impl MouseEvent { pub fn new_uninitialized(window: JSRef<Window>) -> Temporary<MouseEvent> { reflect_dom_object(box MouseEvent::new_inherited(), - &Window(window), + &global::Window(window), MouseEventBinding::Wrap) } diff --git a/components/script/dom/namednodemap.rs b/components/script/dom/namednodemap.rs index 5f0e4355e7e..3762ec2ad6b 100644 --- a/components/script/dom/namednodemap.rs +++ b/components/script/dom/namednodemap.rs @@ -5,7 +5,7 @@ use dom::attr::Attr; use dom::bindings::codegen::Bindings::NamedNodeMapBinding; use dom::bindings::codegen::Bindings::NamedNodeMapBinding::NamedNodeMapMethods; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::element::Element; @@ -28,7 +28,7 @@ impl NamedNodeMap { pub fn new(window: JSRef<Window>, elem: JSRef<Element>) -> Temporary<NamedNodeMap> { reflect_dom_object(box NamedNodeMap::new_inherited(elem), - &Window(window), NamedNodeMapBinding::Wrap) + &global::Window(window), NamedNodeMapBinding::Wrap) } } diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs index 6850fc10b25..9810c67a877 100644 --- a/components/script/dom/navigator.rs +++ b/components/script/dom/navigator.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::NavigatorBinding; use dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::navigatorinfo::NavigatorInfo; @@ -26,7 +26,7 @@ impl Navigator { pub fn new(window: JSRef<Window>) -> Temporary<Navigator> { reflect_dom_object(box Navigator::new_inherited(), - &Window(window), + &global::Window(window), NavigatorBinding::Wrap) } } diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index 7e402090e31..b62225314e2 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -20,7 +20,8 @@ use dom::bindings::codegen::InheritTypes::{ProcessingInstructionCast, EventTarge use dom::bindings::codegen::InheritTypes::{HTMLLegendElementDerived, HTMLFieldSetElementDerived}; use dom::bindings::codegen::InheritTypes::HTMLOptGroupElementDerived; use dom::bindings::error::{Fallible, NotFound, HierarchyRequest, Syntax}; -use dom::bindings::global::{GlobalRef, Window}; +use dom::bindings::global::GlobalRef; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, RootedReference, Temporary, Root, OptionalUnrootable}; use dom::bindings::js::{OptionalSettable, TemporaryPushable, OptionalRootedRootable}; use dom::bindings::js::{ResultRootable, OptionalRootable}; @@ -203,9 +204,9 @@ impl LayoutDataRef { /// Take the chan out of the layout data if it is present. pub fn take_chan(&self) -> Option<LayoutChan> { let mut layout_data = self.data_cell.borrow_mut(); - match *layout_data { - None => None, - Some(..) => Some(layout_data.get_mut_ref().chan.take_unwrap()), + match &mut *layout_data { + &None => None, + &Some(ref mut layout_data) => Some(layout_data.chan.take().unwrap()), } } @@ -697,7 +698,7 @@ impl<'m, 'n> NodeHelpers<'m, 'n> for JSRef<'n, Node> { fn summarize(&self) -> NodeInfo { if self.unique_id.borrow().is_empty() { let mut unique_id = self.unique_id.borrow_mut(); - *unique_id = uuid::Uuid::new_v4().to_simple_str(); + *unique_id = uuid::Uuid::new_v4().to_simple_string(); } NodeInfo { @@ -1008,7 +1009,7 @@ impl Node { wrap_fn: extern "Rust" fn(*mut JSContext, &GlobalRef, Box<N>) -> Temporary<N>) -> Temporary<N> { let window = document.window.root(); - reflect_dom_object(node, &Window(*window), wrap_fn) + reflect_dom_object(node, &global::Window(*window), wrap_fn) } pub fn new_inherited(type_id: NodeTypeId, doc: JSRef<Document>) -> Node { diff --git a/components/script/dom/nodelist.rs b/components/script/dom/nodelist.rs index 716e0dc9be1..802cc76f78d 100644 --- a/components/script/dom/nodelist.rs +++ b/components/script/dom/nodelist.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::NodeListBinding; use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::node::{Node, NodeHelpers}; @@ -35,7 +35,7 @@ impl NodeList { pub fn new(window: JSRef<Window>, list_type: NodeListType) -> Temporary<NodeList> { reflect_dom_object(box NodeList::new_inherited(list_type), - &Window(window), NodeListBinding::Wrap) + &global::Window(window), NodeListBinding::Wrap) } pub fn new_simple_list(window: JSRef<Window>, elements: Vec<JSRef<Node>>) -> Temporary<NodeList> { diff --git a/components/script/dom/performance.rs b/components/script/dom/performance.rs index 57ecc6bfb84..f1c5896b2a7 100644 --- a/components/script/dom/performance.rs +++ b/components/script/dom/performance.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::PerformanceBinding; use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceMethods; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::performancetiming::{PerformanceTiming, PerformanceTimingHelpers}; @@ -30,7 +30,7 @@ impl Performance { pub fn new(window: JSRef<Window>) -> Temporary<Performance> { reflect_dom_object(box Performance::new_inherited(window), - &Window(window), + &global::Window(window), PerformanceBinding::Wrap) } } diff --git a/components/script/dom/performancetiming.rs b/components/script/dom/performancetiming.rs index aab37e62675..955187f3dfb 100644 --- a/components/script/dom/performancetiming.rs +++ b/components/script/dom/performancetiming.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::PerformanceTimingBinding; use dom::bindings::codegen::Bindings::PerformanceTimingBinding::PerformanceTimingMethods; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::window::Window; @@ -31,7 +31,7 @@ impl PerformanceTiming { pub fn new(window: JSRef<Window>) -> Temporary<PerformanceTiming> { let timing = PerformanceTiming::new_inherited(window.navigationStart, window.navigationStartPrecise); - reflect_dom_object(box timing, &Window(window), + reflect_dom_object(box timing, &global::Window(window), PerformanceTimingBinding::Wrap) } } diff --git a/components/script/dom/screen.rs b/components/script/dom/screen.rs index 333e6169809..7fafbd4bc6a 100644 --- a/components/script/dom/screen.rs +++ b/components/script/dom/screen.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::ScreenBinding; use dom::bindings::codegen::Bindings::ScreenBinding::ScreenMethods; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::window::Window; @@ -24,7 +24,7 @@ impl Screen { pub fn new(window: JSRef<Window>) -> Temporary<Screen> { reflect_dom_object(box Screen::new_inherited(), - &Window(window), + &global::Window(window), ScreenBinding::Wrap) } } diff --git a/components/script/dom/uievent.rs b/components/script/dom/uievent.rs index e7e0771a9fd..eac29a4ab24 100644 --- a/components/script/dom/uievent.rs +++ b/components/script/dom/uievent.rs @@ -7,7 +7,8 @@ use dom::bindings::codegen::Bindings::UIEventBinding; use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods; use dom::bindings::codegen::InheritTypes::{EventCast, UIEventDerived}; use dom::bindings::error::Fallible; -use dom::bindings::global::{GlobalRef, Window}; +use dom::bindings::global::GlobalRef; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, RootedReference, Temporary, OptionalSettable}; use dom::bindings::trace::Traceable; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; @@ -42,7 +43,7 @@ impl UIEvent { pub fn new_uninitialized(window: JSRef<Window>) -> Temporary<UIEvent> { reflect_dom_object(box UIEvent::new_inherited(UIEventTypeId), - &Window(window), + &global::Window(window), UIEventBinding::Wrap) } diff --git a/components/script/dom/urlhelper.rs b/components/script/dom/urlhelper.rs index 7394a89cce7..f678e273876 100644 --- a/components/script/dom/urlhelper.rs +++ b/components/script/dom/urlhelper.rs @@ -16,7 +16,7 @@ impl UrlHelper { match url.query { None => "".to_string(), Some(ref query) if query.as_slice() == "" => "".to_string(), - Some(ref query) => "?".to_string().append(query.as_slice()) + Some(ref query) => format!("?{}", query) } } @@ -24,7 +24,7 @@ impl UrlHelper { match url.fragment { None => "".to_string(), Some(ref hash) if hash.as_slice() == "" => "".to_string(), - Some(ref hash) => "#".to_string().append(hash.as_slice()) + Some(ref hash) => format!("#{}", hash) } } } diff --git a/components/script/dom/validitystate.rs b/components/script/dom/validitystate.rs index cf8c2ba3898..99bd9258416 100644 --- a/components/script/dom/validitystate.rs +++ b/components/script/dom/validitystate.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::ValidityStateBinding; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::window::Window; @@ -25,7 +25,7 @@ impl ValidityState { pub fn new(window: JSRef<Window>) -> Temporary<ValidityState> { reflect_dom_object(box ValidityState::new_inherited(), - &Window(window), + &global::Window(window), ValidityStateBinding::Wrap) } } diff --git a/components/script/dom/virtualmethods.rs b/components/script/dom/virtualmethods.rs index d2332fcce1f..96148b59bc7 100644 --- a/components/script/dom/virtualmethods.rs +++ b/components/script/dom/virtualmethods.rs @@ -23,7 +23,7 @@ use dom::bindings::codegen::InheritTypes::HTMLStyleElementCast; use dom::bindings::codegen::InheritTypes::HTMLTextAreaElementCast; use dom::bindings::js::JSRef; use dom::element::Element; -use dom::element::ElementTypeId; +use dom::element::ElementTypeId_; use dom::element::HTMLAnchorElementTypeId; use dom::element::HTMLAreaElementTypeId; use dom::element::HTMLBodyElementTypeId; @@ -204,7 +204,7 @@ pub fn vtable_for<'a>(node: &'a JSRef<'a, Node>) -> &'a VirtualMethods + 'a { let element: &'a JSRef<'a, HTMLTextAreaElement> = HTMLTextAreaElementCast::to_borrowed_ref(node).unwrap(); element as &'a VirtualMethods + 'a } - ElementNodeTypeId(ElementTypeId) => { + ElementNodeTypeId(ElementTypeId_) => { let element: &'a JSRef<'a, Element> = ElementCast::to_borrowed_ref(node).unwrap(); element as &'a VirtualMethods + 'a } diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs index 49a8b861338..7bb38cf49df 100644 --- a/components/script/dom/xmlhttprequest.rs +++ b/components/script/dom/xmlhttprequest.rs @@ -6,7 +6,8 @@ use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull; use dom::bindings::codegen::Bindings::XMLHttpRequestBinding; use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMethods; use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType; -use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseTypeValues::{_empty, Document, Json, Text}; +use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseTypeValues; +use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseTypeValues::{_empty, Json, Text}; use dom::bindings::codegen::InheritTypes::{EventCast, EventTargetCast, XMLHttpRequestDerived}; use dom::bindings::conversions::ToJSValConvertible; use dom::bindings::error::{Error, ErrorResult, Fallible, InvalidState, InvalidAccess}; @@ -384,8 +385,8 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> { // So this unsafe block should never fail let mut buf = h.header_value(); - buf.push_bytes(&[0x2C, 0x20]); - buf.push_bytes(value.as_slice()); + buf.as_mut_vec().push_all(&[0x2C, 0x20]); + buf.as_mut_vec().push_all(value.as_slice()); value = ByteString::new(buf.container_into_owned_bytes()); } @@ -612,7 +613,8 @@ impl<'a> XMLHttpRequestMethods for JSRef<'a, XMLHttpRequest> { } fn SetResponseType(self, response_type: XMLHttpRequestResponseType) -> ErrorResult { match self.global { - WorkerField(_) if response_type == Document => return Ok(()), + WorkerField(_) if response_type == XMLHttpRequestResponseTypeValues::Document + => return Ok(()), _ => {} } match self.ready_state.deref().get() { diff --git a/components/script/script_task.rs b/components/script/script_task.rs index b0c40c6ee39..88c84ef5b74 100644 --- a/components/script/script_task.rs +++ b/components/script/script_task.rs @@ -11,7 +11,7 @@ use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods; use dom::bindings::codegen::InheritTypes::{EventTargetCast, NodeCast, EventCast, ElementCast}; use dom::bindings::conversions; use dom::bindings::conversions::{FromJSValConvertible, Empty}; -use dom::bindings::global::Window; +use dom::bindings::global; use dom::bindings::js::{JS, JSRef, RootCollection, Temporary, OptionalSettable}; use dom::bindings::js::OptionalRootable; use dom::bindings::trace::JSTraceable; @@ -514,7 +514,7 @@ impl ScriptTask { fn handle_evaluate_js(&self, pipeline: PipelineId, eval: String, reply: Sender<EvaluateJSReply>) { let page = get_page(&*self.page.borrow(), pipeline); let frame = page.frame(); - let window = frame.get_ref().window.root(); + let window = frame.as_ref().unwrap().window.root(); let cx = window.get_cx(); let rval = window.evaluate_js_with_result(eval.as_slice()); @@ -537,7 +537,7 @@ impl ScriptTask { fn handle_get_root_node(&self, pipeline: PipelineId, reply: Sender<NodeInfo>) { let page = get_page(&*self.page.borrow(), pipeline); let frame = page.frame(); - let document = frame.get_ref().document.root(); + let document = frame.as_ref().unwrap().document.root(); let node: JSRef<Node> = NodeCast::from_ref(*document); reply.send(node.summarize()); @@ -546,7 +546,7 @@ impl ScriptTask { fn handle_get_document_element(&self, pipeline: PipelineId, reply: Sender<NodeInfo>) { let page = get_page(&*self.page.borrow(), pipeline); let frame = page.frame(); - let document = frame.get_ref().document.root(); + let document = frame.as_ref().unwrap().document.root(); let document_element = document.GetDocumentElement().root().unwrap(); let node: JSRef<Node> = NodeCast::from_ref(*document_element); @@ -556,7 +556,7 @@ impl ScriptTask { fn find_node_by_unique_id(&self, pipeline: PipelineId, node_id: String) -> Temporary<Node> { let page = get_page(&*self.page.borrow(), pipeline); let frame = page.frame(); - let document = frame.get_ref().document.root(); + let document = frame.as_ref().unwrap().document.root(); let node: JSRef<Node> = NodeCast::from_ref(*document); for candidate in node.traverse_preorder() { @@ -810,7 +810,7 @@ impl ScriptTask { // Receive the JavaScript scripts. assert!(js_scripts.is_some()); - let js_scripts = js_scripts.take_unwrap(); + let js_scripts = js_scripts.take().unwrap(); debug!("js_scripts: {:?}", js_scripts); with_compartment((**cx).ptr, window.reflector().get_jsobject(), || { @@ -836,7 +836,7 @@ impl ScriptTask { // We have no concept of a document loader right now, so just dispatch the // "load" event as soon as we've finished executing all scripts parsed during // the initial load. - let event = Event::new(&Window(*window), "load".to_string(), false, false).root(); + let event = Event::new(&global::Window(*window), "load".to_string(), false, false).root(); let doctarget: JSRef<EventTarget> = EventTargetCast::from_ref(*document); let wintarget: JSRef<EventTarget> = EventTargetCast::from_ref(*window); let _ = wintarget.dispatch_event_with_target(Some(doctarget), *event); @@ -940,7 +940,7 @@ impl ScriptTask { Some(ref frame) => { let window = frame.window.root(); let event = - Event::new(&Window(*window), + Event::new(&global::Window(*window), "click".to_string(), true, true).root(); let eventtarget: JSRef<EventTarget> = EventTargetCast::from_ref(node); diff --git a/components/style/font_face.rs b/components/style/font_face.rs index 9e8a6b689ac..12cbcd41a1d 100644 --- a/components/style/font_face.rs +++ b/components/style/font_face.rs @@ -39,7 +39,7 @@ pub fn iter_font_face_rules_inner(rules: &[CSSRule], callback: |family: &str, so } enum Source { - UrlSource(UrlSource), + UrlSource_(UrlSource), LocalSource(String), } @@ -74,7 +74,7 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_ match item { DeclAtRule(rule) => log_css_error( rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()), - Declaration(Declaration{ location, name, value, important }) => { + Declaration_(Declaration{ location, name, value, important }) => { if important { log_css_error(location, "!important is not allowed on @font-face descriptors"); continue @@ -120,7 +120,7 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_ /// local() is not supported yet fn parse_one_url_src(iter: ParserIter, base_url: &Url) -> Result<UrlSource, ()> { match parse_one_src(iter, base_url) { - Ok(UrlSource(source)) => Ok(source), + Ok(UrlSource_(source)) => Ok(source), _ => Err(()) } } @@ -162,7 +162,7 @@ fn parse_one_src(iter: ParserIter, base_url: &Url) -> Result<Source, ()> { None => vec![], }; - Ok(UrlSource(UrlSource { + Ok(UrlSource_(UrlSource { url: url, format_hints: format_hints, })) @@ -171,7 +171,7 @@ fn parse_one_src(iter: ParserIter, base_url: &Url) -> Result<Source, ()> { fn parse_one_format(iter: ParserIter) -> Result<String, ()> { match iter.next() { - Some(&String(ref value)) => { + Some(&QuotedString(ref value)) => { if iter.next().is_none() { Ok(value.clone()) } else { diff --git a/components/style/media_queries.rs b/components/style/media_queries.rs index 8e0df248f2d..af12b4fe638 100644 --- a/components/style/media_queries.rs +++ b/components/style/media_queries.rs @@ -33,7 +33,7 @@ pub struct MediaQuery { pub enum MediaQueryType { All, // Always true - MediaType(MediaType), + MediaType_(MediaType), } #[deriving(PartialEq)] @@ -61,8 +61,8 @@ pub fn parse_media_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, let mut rules = vec!(); for rule in ErrorLoggerIterator(parse_rule_list(block.into_iter())) { match rule { - QualifiedRule(rule) => parse_style_rule(rule, &mut rules, namespaces, base_url), - AtRule(rule) => parse_nested_at_rule( + QualifiedRule_(rule) => parse_style_rule(rule, &mut rules, namespaces, base_url), + AtRule_(rule) => parse_nested_at_rule( rule.name.as_slice().to_ascii_lower().as_slice(), rule, &mut rules, namespaces, base_url), } } @@ -84,8 +84,8 @@ pub fn parse_media_query_list(input: &[ComponentValue]) -> MediaQueryList { let mq = match next { Some(&Ident(ref value)) => { match value.as_slice().to_ascii_lower().as_slice() { - "screen" => Some(MediaQuery{ media_type: MediaType(Screen) }), - "print" => Some(MediaQuery{ media_type: MediaType(Print) }), + "screen" => Some(MediaQuery{ media_type: MediaType_(Screen) }), + "print" => Some(MediaQuery{ media_type: MediaType_(Print) }), "all" => Some(MediaQuery{ media_type: All }), _ => None } @@ -122,7 +122,7 @@ impl MediaQueryList { pub fn evaluate(&self, device: &Device) -> bool { self.media_queries.iter().any(|mq| { match mq.media_type { - MediaType(media_type) => media_type == device.media_type, + MediaType_(media_type) => media_type == device.media_type, All => true, } // TODO: match Level 3 expressions diff --git a/components/style/namespaces.rs b/components/style/namespaces.rs index 77e5fed340b..886b350a4aa 100644 --- a/components/style/namespaces.rs +++ b/components/style/namespaces.rs @@ -38,7 +38,7 @@ pub fn parse_namespace_rule(rule: AtRule, namespaces: &mut NamespaceMap) { if prefix.is_some() { syntax_error!() } prefix = Some(value); }, - URL(value) | String(value) => { + URL(value) | QuotedString(value) => { if ns.is_some() { syntax_error!() } ns = Some(Namespace::from_str(Some(value))); break diff --git a/components/style/properties/mod.rs.mako b/components/style/properties/mod.rs.mako index e495693742a..c6d70a6d096 100644 --- a/components/style/properties/mod.rs.mako +++ b/components/style/properties/mod.rs.mako @@ -502,7 +502,7 @@ pub mod longhands { pub use super::computed_as_specified as to_computed_value; pub mod computed_value { #[deriving(PartialEq, Clone)] - pub enum Content { + pub enum ContentItem { StringContent(String), } #[allow(non_camel_case_types)] @@ -510,7 +510,7 @@ pub mod longhands { pub enum T { normal, none, - Content(Vec<Content>), + Content(Vec<ContentItem>), } } pub type SpecifiedValue = computed_value::T; @@ -532,7 +532,7 @@ pub mod longhands { let mut content = vec!(); for component_value in input.skip_whitespace() { match component_value { - &String(ref value) + &QuotedString(ref value) => content.push(StringContent(value.clone())), _ => return Err(()) // invalid/unsupported value } @@ -546,7 +546,7 @@ pub mod longhands { ${new_style_struct("Background", is_inherited=False)} ${predefined_type("background-color", "CSSColor", - "RGBA(RGBA { red: 0., green: 0., blue: 0., alpha: 0. }) /* transparent */")} + "RGBAColor(RGBA { red: 0., green: 0., blue: 0., alpha: 0. }) /* transparent */")} <%self:single_component_value name="background-image"> // The computed value is the same as the specified value. @@ -697,7 +697,7 @@ pub mod longhands { pub fn parse_specified(input: &[ComponentValue], _base_url: &Url) -> Result<DeclaredValue<SpecifiedValue>, ()> { match one_component_value(input).and_then(Color::parse) { - Ok(RGBA(rgba)) => Ok(SpecifiedValue(rgba)), + Ok(RGBAColor(rgba)) => Ok(SpecifiedValue(rgba)), Ok(CurrentColor) => Ok(Inherit), Err(()) => Err(()), } @@ -738,7 +738,7 @@ pub mod longhands { pub fn parse_one_family<'a>(iter: ParserIter) -> Result<FontFamily, ()> { // TODO: avoid copying strings? let mut idents = match iter.next() { - Some(&String(ref value)) => return Ok(FamilyName(value.clone())), + Some(&QuotedString(ref value)) => return Ok(FamilyName(value.clone())), Some(&Ident(ref value)) => { // match value.as_slice().to_ascii_lower().as_slice() { // "serif" => return Ok(Serif), @@ -1461,7 +1461,7 @@ pub fn parse_property_declaration_list<I: Iterator<Node>>(input: I, base_url: &U match item { DeclAtRule(rule) => log_css_error( rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()), - Declaration(Declaration{ location: l, name: n, value: v, important: i}) => { + Declaration_(Declaration{ location: l, name: n, value: v, important: i}) => { // TODO: only keep the last valid declaration for a given name. let (list, seen) = if i { (&mut important_declarations, &mut important_seen) @@ -1663,7 +1663,7 @@ impl ComputedValues { #[inline] pub fn resolve_color(&self, color: computed::CSSColor) -> RGBA { match color { - RGBA(rgba) => rgba, + RGBAColor(rgba) => rgba, CurrentColor => self.get_color().color, } } diff --git a/components/style/selector_matching.rs b/components/style/selector_matching.rs index 3fb90435269..6c0ff778f94 100644 --- a/components/style/selector_matching.rs +++ b/components/style/selector_matching.rs @@ -204,7 +204,7 @@ impl SelectorMap { } match SelectorMap::get_local_name(&rule) { - Some(LocalNameSelector { name, lower_name }) => { + Some(LocalName { name, lower_name }) => { self.local_name_hash.find_push(name, rule.clone()); self.lower_local_name_hash.find_push(lower_name, rule); return; @@ -244,7 +244,7 @@ impl SelectorMap { } /// Retrieve the name if it is a type selector, or None otherwise. - fn get_local_name(rule: &Rule) -> Option<LocalNameSelector> { + fn get_local_name(rule: &Rule) -> Option<LocalName> { let simple_selector_sequence = &rule.selector.simple_selectors; for ss in simple_selector_sequence.iter() { match *ss { @@ -579,7 +579,7 @@ fn can_fast_reject<'a, E: TElement<'a>, N: TNode<'a, E>>( for ss in selector.simple_selectors.iter() { match *ss { - LocalNameSelector(LocalNameSelector { ref name, ref lower_name }) => { + LocalNameSelector(LocalName { ref name, ref lower_name }) => { if bf.definitely_excludes(name) && bf.definitely_excludes(lower_name) { return Some(NotMatchedGlobally); @@ -693,7 +693,7 @@ pub fn matches_simple_selector<'a, E:TElement<'a>, shareable: &mut bool) -> bool { match *selector { - LocalNameSelector(LocalNameSelector { ref name, ref lower_name }) => { + LocalNameSelector(LocalName { ref name, ref lower_name }) => { let name = if element.is_html_element_in_html_document() { lower_name } else { name }; let element = element.as_element(); element.get_local_name() == name @@ -1000,7 +1000,7 @@ mod tests { use servo_util::atom::Atom; use sync::Arc; use super::{DeclarationBlock, Rule, SelectorMap}; - use selectors::LocalNameSelector; + use selectors::LocalName; /// Helper method to get some Rules from selector strings. /// Each sublist of the result contains the Rules for one StyleRule. @@ -1053,7 +1053,7 @@ mod tests { let rules_list = get_mock_rules(["img.foo", "#top", "IMG", "ImG"]); let check = |i, names: Option<(&str, &str)>| { assert!(SelectorMap::get_local_name(&rules_list[i][0]) - == names.map(|(name, lower_name)| LocalNameSelector { + == names.map(|(name, lower_name)| LocalName { name: Atom::from_slice(name), lower_name: Atom::from_slice(lower_name) })) }; diff --git a/components/style/selectors.rs b/components/style/selectors.rs index 8540dc1648d..24aad6398f4 100644 --- a/components/style/selectors.rs +++ b/components/style/selectors.rs @@ -58,7 +58,7 @@ pub enum Combinator { pub enum SimpleSelector { IDSelector(Atom), ClassSelector(Atom), - LocalNameSelector(LocalNameSelector), + LocalNameSelector(LocalName), NamespaceSelector(Namespace), // Attribute selectors @@ -93,7 +93,7 @@ pub enum SimpleSelector { } #[deriving(Eq, PartialEq, Clone, Hash)] -pub struct LocalNameSelector { +pub struct LocalName { pub name: Atom, pub lower_name: Atom, } @@ -292,7 +292,7 @@ fn parse_type_selector<I: Iterator<ComponentValue>>( } match local_name { Some(name) => { - simple_selectors.push(LocalNameSelector(LocalNameSelector { + simple_selectors.push(LocalNameSelector(LocalName { name: Atom::from_slice(name.as_slice()), lower_name: Atom::from_slice(name.into_ascii_lower().as_slice()) })) @@ -451,7 +451,7 @@ fn parse_attribute_selector(content: Vec<ComponentValue>, namespaces: &Namespace macro_rules! get_value( () => {{ skip_whitespace(iter); match iter.next() { - Some(Ident(value)) | Some(String(value)) => value, + Some(Ident(value)) | Some(QuotedString(value)) => value, _ => return Err(()) } }};) @@ -597,7 +597,7 @@ mod tests { assert!(parse("") == Err(())) assert!(parse("EeÉ") == Ok(vec!(Selector { compound_selectors: Arc::new(CompoundSelector { - simple_selectors: vec!(LocalNameSelector(LocalNameSelector { + simple_selectors: vec!(LocalNameSelector(LocalName { name: Atom::from_slice("EeÉ"), lower_name: Atom::from_slice("eeÉ") })), next: None, @@ -623,7 +623,7 @@ mod tests { }))) assert!(parse("e.foo#bar") == Ok(vec!(Selector { compound_selectors: Arc::new(CompoundSelector { - simple_selectors: vec!(LocalNameSelector(LocalNameSelector { + simple_selectors: vec!(LocalNameSelector(LocalName { name: Atom::from_slice("e"), lower_name: Atom::from_slice("e") }), ClassSelector(Atom::from_slice("foo")), @@ -637,7 +637,7 @@ mod tests { compound_selectors: Arc::new(CompoundSelector { simple_selectors: vec!(IDSelector(Atom::from_slice("bar"))), next: Some((box CompoundSelector { - simple_selectors: vec!(LocalNameSelector(LocalNameSelector { + simple_selectors: vec!(LocalNameSelector(LocalName { name: Atom::from_slice("e"), lower_name: Atom::from_slice("e") }), ClassSelector(Atom::from_slice("foo"))), @@ -682,7 +682,7 @@ mod tests { compound_selectors: Arc::new(CompoundSelector { simple_selectors: vec!( NamespaceSelector(namespace::MathML), - LocalNameSelector(LocalNameSelector { + LocalNameSelector(LocalName { name: Atom::from_slice("e"), lower_name: Atom::from_slice("e") }), ), @@ -704,7 +704,7 @@ mod tests { compound_selectors: Arc::new(CompoundSelector { simple_selectors: vec!(), next: Some((box CompoundSelector { - simple_selectors: vec!(LocalNameSelector(LocalNameSelector { + simple_selectors: vec!(LocalNameSelector(LocalName { name: Atom::from_slice("div"), lower_name: Atom::from_slice("div") })), next: None, diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index c8c9f8c82df..657fc5fe83e 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -73,11 +73,11 @@ impl Stylesheet { for rule in ErrorLoggerIterator(parse_stylesheet_rules(tokenize(css))) { let next_state; // Unitialized to force each branch to set it. match rule { - QualifiedRule(rule) => { + QualifiedRule_(rule) => { next_state = STATE_BODY; parse_style_rule(rule, &mut rules, &namespaces, &base_url) }, - AtRule(rule) => { + AtRule_(rule) => { let lower_name = rule.name.as_slice().to_ascii_lower(); match lower_name.as_slice() { "charset" => { diff --git a/components/util/smallvec.rs b/components/util/smallvec.rs index c5a9c87e84c..998f8ef1d57 100644 --- a/components/util/smallvec.rs +++ b/components/util/smallvec.rs @@ -47,7 +47,7 @@ impl<T> VecLike<T> for Vec<T> { } } -trait SmallVecPrivate<T> { +pub trait SmallVecPrivate<T> { unsafe fn set_len(&mut self, new_len: uint); unsafe fn set_cap(&mut self, new_cap: uint); fn data(&self, index: uint) -> *const T; diff --git a/components/util/workqueue.rs b/components/util/workqueue.rs index 4924036a6a8..a9f9419d81c 100644 --- a/components/util/workqueue.rs +++ b/components/util/workqueue.rs @@ -225,7 +225,7 @@ impl<QueueData: Send, WorkData: Send> WorkQueue<QueueData, WorkData> { threads.get_mut(i).other_deques.push(infos[j].thief.clone()) } } - assert!(threads.get(i).other_deques.len() == thread_count - 1) + assert!(threads[i].other_deques.len() == thread_count - 1) } // Spawn threads. diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 74fe836c0b3..4836ef6ae2c 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -12,10 +12,10 @@ dependencies = [ "glut 0.0.1 (git+https://github.com/servo/rust-glut#01af0162ea0322ad1a40d6adb023a39813605949)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)", "layers 0.1.0 (git+https://github.com/servo/rust-layers#ed570335738913fb41fc62a024389dfa415962e8)", -"plugins 0.0.1", "msg 0.0.1", "net 0.0.1", "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)", + "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "script 0.0.1", "servo 0.0.1", @@ -29,7 +29,7 @@ name = "alert" version = "0.1.0" source = "git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e" dependencies = [ - "cocoa 0.1.0 (git+https://github.com/servo/rust-cocoa#cfbf6d9d5a68d3c8f424d678aa22096c49136e25)", + "cocoa 0.1.0 (git+https://github.com/servo/rust-cocoa#acb9b4efc70c3f285057c2aee774f38f81a1b98d)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)", ] @@ -62,7 +62,7 @@ dependencies = [ [[package]] name = "cocoa" version = "0.1.0" -source = "git+https://github.com/servo/rust-cocoa#cfbf6d9d5a68d3c8f424d678aa22096c49136e25" +source = "git+https://github.com/servo/rust-cocoa#acb9b4efc70c3f285057c2aee774f38f81a1b98d" [[package]] name = "compositing" @@ -85,7 +85,7 @@ dependencies = [ "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)", "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "script_traits 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -114,9 +114,9 @@ dependencies = [ [[package]] name = "cssparser" version = "0.1.0" -source = "git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407" +source = "git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6" dependencies = [ - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", ] [[package]] @@ -142,7 +142,7 @@ source = "git+https://github.com/servo/rust-egl#88f2a13812ddbce2bf2317221663a61c [[package]] name = "encoding" version = "0.1.0" -source = "git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79" +source = "git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265" [[package]] name = "expat-sys" @@ -194,13 +194,13 @@ dependencies = [ "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "harfbuzz 0.1.0 (git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99c2905623d35f6)", "layers 0.1.0 (git+https://github.com/servo/rust-layers#ed570335738913fb41fc62a024389dfa415962e8)", - "plugins 0.0.1", "msg 0.0.1", "net 0.0.1", + "plugins 0.0.1", "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)", "style 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -234,10 +234,10 @@ source = "git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99 [[package]] name = "http" version = "0.1.0-pre" -source = "git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7" +source = "git+https://github.com/servo/rust-http?ref=servo#92019011b0cdf1bffc8c584830de1bf330d79d0d" dependencies = [ "openssl 0.0.0 (git+https://github.com/sfackler/rust-openssl.git#a495465b75ffb18ff2303c5a11a103e00a15a13d)", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", ] [[package]] @@ -291,16 +291,16 @@ dependencies = [ name = "layout" version = "0.0.1" dependencies = [ - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "gfx 0.0.1", "layout_traits 0.0.1", - "plugins 0.0.1", "net 0.0.1", + "plugins 0.0.1", "script 0.0.1", "script_traits 0.0.1", "style 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -321,10 +321,6 @@ version = "0.1.0" source = "git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360" [[package]] -name = "plugins" -version = "0.0.1" - -[[package]] name = "mozjs-sys" version = "0.0.0" source = "git+https://github.com/servo/mozjs#47cd6a4e60c75642ba182f0df9a42b71ec7c2c88" @@ -338,7 +334,7 @@ dependencies = [ "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface#7038341220bd7e86e21118fac2cbc6bd50890e47)", "layers 0.1.0 (git+https://github.com/servo/rust-layers#ed570335738913fb41fc62a024389dfa415962e8)", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -347,10 +343,10 @@ name = "net" version = "0.0.1" dependencies = [ "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", - "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7)", + "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#92019011b0cdf1bffc8c584830de1bf330d79d0d)", "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -380,6 +376,10 @@ version = "0.0.0" source = "git+https://github.com/sfackler/rust-phf#06254fdde7708630a6397c41c6c17ef81a4b66a0" [[package]] +name = "plugins" +version = "0.0.1" + +[[package]] name = "png" version = "0.1.0" source = "git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79" @@ -397,21 +397,22 @@ name = "script" version = "0.0.1" dependencies = [ "canvas 0.0.1", - "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407)", + "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6)", "devtools_traits 0.0.1", - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "gfx 0.0.1", - "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#4fdedeea8fc77149adf51bb24a37372af21c25b7)", + "http 0.1.0-pre (git+https://github.com/servo/rust-http?ref=servo#92019011b0cdf1bffc8c584830de1bf330d79d0d)", "hubbub 0.1.0 (git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)", - "plugins 0.0.1", "msg 0.0.1", "net 0.0.1", + "plugins 0.0.1", "script_traits 0.0.1", "style 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", + "uuid 0.0.1 (git+https://github.com/rust-lang/uuid#c3041068f413a5e46d795d21a346072794593839)", ] [[package]] @@ -422,7 +423,7 @@ dependencies = [ "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "msg 0.0.1", "net 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", ] [[package]] @@ -440,7 +441,7 @@ dependencies = [ "msg 0.0.1", "net 0.0.1", "script 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -480,12 +481,12 @@ dependencies = [ name = "style" version = "0.0.1" dependencies = [ - "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407)", - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "lazy_static 0.1.0 (git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360)", "plugins 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", "util 0.0.1", ] @@ -496,9 +497,9 @@ version = "0.0.1" [[package]] name = "url" version = "0.1.0" -source = "git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379" +source = "git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243" dependencies = [ - "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79)", + "encoding 0.1.0 (git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265)", ] [[package]] @@ -509,10 +510,15 @@ dependencies = [ "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)", "task_info 0.0.1", - "url 0.1.0 (git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379)", + "url 0.1.0 (git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243)", ] [[package]] +name = "uuid" +version = "0.0.1" +source = "git+https://github.com/rust-lang/uuid#c3041068f413a5e46d795d21a346072794593839" + +[[package]] name = "xlib" version = "0.1.0" source = "git+https://github.com/servo/rust-xlib#581d4faddec5188d3c3ae5307dbea28aab90644c" diff --git a/rust-snapshot-hash b/rust-snapshot-hash index 28a8c2f760e..15ca0275e8f 100644 --- a/rust-snapshot-hash +++ b/rust-snapshot-hash @@ -1 +1 @@ -4d2af38611cdeeb804659b5e0695ad2c251db51a/rust-0.12.0-pre +d2b30f7d3883a9f5d2e419d3d2c86cb66e9d3410/rust-0.12.0-pre diff --git a/support/glfw-rs b/support/glfw-rs -Subproject 7ccfaca315a43d97914e1601c90ad348ef190ed +Subproject 0baf7f662b8d78c8db9930b03832e16fede5d1a diff --git a/tests/reftest.rs b/tests/reftest.rs index e13a875a833..225b83a9a49 100644 --- a/tests/reftest.rs +++ b/tests/reftest.rs @@ -76,7 +76,7 @@ fn main() { if extension.to_ascii_lower().as_slice() == "list" && file.is_file() { let tests = parse_lists(&file, servo_args, render_mode, all_tests.len()); println!("\t{} [{} tests]", file.display(), tests.len()); - all_tests.push_all_move(tests); + all_tests.extend(tests.into_iter()); } } _ => {} |