Upgrade to rustc d2b30f7d3 2014-09-23

This commit is contained in:
Simon Sapin 2014-09-25 16:01:21 +01:00
parent a58324f25b
commit b3245fa407
51 changed files with 227 additions and 197 deletions

58
Cargo.lock generated
View file

@ -8,7 +8,7 @@ dependencies = [
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
"script 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", "util 0.0.1",
] ]
@ -17,7 +17,7 @@ name = "alert"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e" source = "git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e"
dependencies = [ 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)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
] ]
@ -50,7 +50,7 @@ dependencies = [
[[package]] [[package]]
name = "cocoa" name = "cocoa"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-cocoa#cfbf6d9d5a68d3c8f424d678aa22096c49136e25" source = "git+https://github.com/servo/rust-cocoa#acb9b4efc70c3f285057c2aee774f38f81a1b98d"
[[package]] [[package]]
name = "compositing" name = "compositing"
@ -73,7 +73,7 @@ dependencies = [
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)", "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)",
"png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)",
"script_traits 0.0.1", "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", "util 0.0.1",
] ]
@ -102,9 +102,9 @@ dependencies = [
[[package]] [[package]]
name = "cssparser" name = "cssparser"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407" source = "git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6"
dependencies = [ 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]] [[package]]
@ -130,7 +130,7 @@ source = "git+https://github.com/servo/rust-egl#88f2a13812ddbce2bf2317221663a61c
[[package]] [[package]]
name = "encoding" name = "encoding"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79" source = "git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265"
[[package]] [[package]]
name = "expat-sys" name = "expat-sys"
@ -188,7 +188,7 @@ dependencies = [
"png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "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)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)",
"style 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", "util 0.0.1",
] ]
@ -222,10 +222,10 @@ source = "git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99
[[package]] [[package]]
name = "http" name = "http"
version = "0.1.0-pre" 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 = [ dependencies = [
"openssl 0.0.0 (git+https://github.com/sfackler/rust-openssl.git#a495465b75ffb18ff2303c5a11a103e00a15a13d)", "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]] [[package]]
@ -279,7 +279,7 @@ dependencies = [
name = "layout" name = "layout"
version = "0.0.1" version = "0.0.1"
dependencies = [ 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)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"gfx 0.0.1", "gfx 0.0.1",
"layout_traits 0.0.1", "layout_traits 0.0.1",
@ -288,7 +288,7 @@ dependencies = [
"script 0.0.1", "script 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"style 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", "util 0.0.1",
] ]
@ -322,7 +322,7 @@ dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "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)", "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)", "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", "util 0.0.1",
] ]
@ -331,10 +331,10 @@ name = "net"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "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)", "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)", "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", "util 0.0.1",
] ]
@ -385,12 +385,12 @@ name = "script"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"canvas 0.0.1", "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", "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)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"gfx 0.0.1", "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)", "hubbub 0.1.0 (git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)",
"msg 0.0.1", "msg 0.0.1",
@ -398,8 +398,9 @@ dependencies = [
"plugins 0.0.1", "plugins 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"style 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", "util 0.0.1",
"uuid 0.0.1 (git+https://github.com/rust-lang/uuid#c3041068f413a5e46d795d21a346072794593839)",
] ]
[[package]] [[package]]
@ -410,7 +411,7 @@ dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"msg 0.0.1", "msg 0.0.1",
"net 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]] [[package]]
@ -454,12 +455,12 @@ dependencies = [
name = "style" name = "style"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407)", "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6)",
"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)", "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)", "lazy_static 0.1.0 (git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360)",
"plugins 0.0.1", "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", "util 0.0.1",
] ]
@ -470,9 +471,9 @@ version = "0.0.1"
[[package]] [[package]]
name = "url" name = "url"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379" source = "git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243"
dependencies = [ 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]] [[package]]
@ -483,9 +484,14 @@ dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "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)", "string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
"task_info 0.0.1", "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]] [[package]]
name = "xlib" name = "xlib"
version = "0.1.0" version = "0.1.0"

View file

@ -19,7 +19,7 @@ pub trait Actor: Any {
fn handle_message(&self, fn handle_message(&self,
registry: &ActorRegistry, registry: &ActorRegistry,
msg_type: &String, msg_type: &String,
msg: &json::Object, msg: &json::JsonObject,
stream: &mut TcpStream) -> bool; stream: &mut TcpStream) -> bool;
fn name(&self) -> String; 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 /// 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. /// 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(); let to = msg.find(&"to".to_string()).unwrap().as_string().unwrap();
match self.actors.find(&to.to_string()) { match self.actors.find(&to.to_string()) {
None => println!("message received for unknown actor \"{:s}\"", to), None => println!("message received for unknown actor \"{:s}\"", to),

View file

@ -70,7 +70,7 @@ enum ConsoleMessageType {
#[deriving(Encodable)] #[deriving(Encodable)]
struct GetCachedMessagesReply { struct GetCachedMessagesReply {
from: String, from: String,
messages: Vec<json::Object>, messages: Vec<json::JsonObject>,
} }
#[deriving(Encodable)] #[deriving(Encodable)]
@ -111,7 +111,7 @@ impl Actor for ConsoleActor {
fn handle_message(&self, fn handle_message(&self,
_registry: &ActorRegistry, _registry: &ActorRegistry,
msg_type: &String, msg_type: &String,
msg: &json::Object, msg: &json::JsonObject,
stream: &mut TcpStream) -> bool { stream: &mut TcpStream) -> bool {
match msg_type.as_slice() { match msg_type.as_slice() {
"getCachedMessages" => { "getCachedMessages" => {

View file

@ -59,7 +59,7 @@ impl Actor for HighlighterActor {
fn handle_message(&self, fn handle_message(&self,
_registry: &ActorRegistry, _registry: &ActorRegistry,
msg_type: &String, msg_type: &String,
_msg: &json::Object, _msg: &json::JsonObject,
stream: &mut TcpStream) -> bool { stream: &mut TcpStream) -> bool {
match msg_type.as_slice() { match msg_type.as_slice() {
"showBoxModel" => { "showBoxModel" => {
@ -217,7 +217,7 @@ impl Actor for WalkerActor {
fn handle_message(&self, fn handle_message(&self,
registry: &ActorRegistry, registry: &ActorRegistry,
msg_type: &String, msg_type: &String,
msg: &json::Object, msg: &json::JsonObject,
stream: &mut TcpStream) -> bool { stream: &mut TcpStream) -> bool {
match msg_type.as_slice() { match msg_type.as_slice() {
"querySelector" => { "querySelector" => {
@ -362,7 +362,7 @@ impl Actor for PageStyleActor {
fn handle_message(&self, fn handle_message(&self,
registry: &ActorRegistry, registry: &ActorRegistry,
msg_type: &String, msg_type: &String,
msg: &json::Object, msg: &json::JsonObject,
stream: &mut TcpStream) -> bool { stream: &mut TcpStream) -> bool {
match msg_type.as_slice() { match msg_type.as_slice() {
"getApplied" => { "getApplied" => {
@ -433,7 +433,7 @@ impl Actor for InspectorActor {
fn handle_message(&self, fn handle_message(&self,
registry: &ActorRegistry, registry: &ActorRegistry,
msg_type: &String, msg_type: &String,
_msg: &json::Object, _msg: &json::JsonObject,
stream: &mut TcpStream) -> bool { stream: &mut TcpStream) -> bool {
match msg_type.as_slice() { match msg_type.as_slice() {
"getWalker" => { "getWalker" => {

View file

@ -53,7 +53,7 @@ impl Actor for RootActor {
fn handle_message(&self, fn handle_message(&self,
registry: &ActorRegistry, registry: &ActorRegistry,
msg_type: &String, msg_type: &String,
_msg: &json::Object, _msg: &json::JsonObject,
stream: &mut TcpStream) -> bool { stream: &mut TcpStream) -> bool {
match msg_type.as_slice() { match msg_type.as_slice() {
"listAddons" => { "listAddons" => {

View file

@ -76,7 +76,7 @@ impl Actor for TabActor {
fn handle_message(&self, fn handle_message(&self,
_registry: &ActorRegistry, _registry: &ActorRegistry,
msg_type: &String, msg_type: &String,
_msg: &json::Object, _msg: &json::JsonObject,
stream: &mut TcpStream) -> bool { stream: &mut TcpStream) -> bool {
match msg_type.as_slice() { match msg_type.as_slice() {
"reconfigure" => { "reconfigure" => {

View file

@ -258,7 +258,7 @@ impl Shaper {
// loc refers to a *byte* offset within the utf8 string. // loc refers to a *byte* offset within the utf8 string.
let loc = glyph_data.byte_offset_of_glyph(i); let loc = glyph_data.byte_offset_of_glyph(i);
if loc < byte_max { 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; *byte_to_glyph.get_mut(loc as uint) = i as i32;
} else { } else {
debug!("ERROR: tried to set out of range byte_to_glyph: idx={}, glyph idx={}", debug!("ERROR: tried to set out of range byte_to_glyph: idx={}, glyph idx={}",

View file

@ -680,7 +680,7 @@ impl InlineFragments {
/// Merges another set of inline fragments with this one. /// Merges another set of inline fragments with this one.
pub fn push_all(&mut self, fragments: InlineFragments) { 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. /// A convenience function to return the fragment at a given index.

View file

@ -15,7 +15,7 @@ extern crate sync;
use rustc::lint::LintPassObject; use rustc::lint::LintPassObject;
use rustc::plugin::Registry; use rustc::plugin::Registry;
use syntax::ext::base::ItemDecorator; use syntax::ext::base::Decorator;
use syntax::parse::token::intern; use syntax::parse::token::intern;
@ -27,6 +27,6 @@ mod jstraceable;
pub fn plugin_registrar(reg: &mut Registry) { pub fn plugin_registrar(reg: &mut Registry) {
reg.register_lint_pass(box lints::TransmutePass as LintPassObject); reg.register_lint_pass(box lints::TransmutePass as LintPassObject);
reg.register_lint_pass(box lints::UnrootedPass 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))
} }

View file

@ -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::TyPtr(ast::MutTy { ty: ref t, ..}) | ast::TyRptr(_, ast::MutTy { ty: ref t, ..}) => lint_unrooted_ty(cx, &**t, warning),
ast::TyPath(_, _, id) => { ast::TyPath(_, _, id) => {
match cx.tcx.def_map.borrow().get_copy(&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") { if ty::has_attr(cx.tcx, def_id, "must_root") {
cx.span_lint(UNROOTED_MUST_ROOT, ty.span, warning); cx.span_lint(UNROOTED_MUST_ROOT, ty.span, warning);
} }

View file

@ -57,3 +57,6 @@ git = "https://github.com/servo/rust-mozjs"
[dependencies.url] [dependencies.url]
git = "https://github.com/servo/rust-url" git = "https://github.com/servo/rust-url"
[dependencies.uuid]
git = "https://github.com/rust-lang/uuid"

View file

@ -5,7 +5,7 @@
use dom::bindings::codegen::Bindings::AttrBinding; use dom::bindings::codegen::Bindings::AttrBinding;
use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods; use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
use dom::bindings::codegen::InheritTypes::NodeCast; 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::js::{JS, JSRef, Temporary};
use dom::bindings::trace::Traceable; use dom::bindings::trace::Traceable;
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
@ -112,7 +112,7 @@ impl Attr {
name: Atom, namespace: Namespace, name: Atom, namespace: Namespace,
prefix: Option<DOMString>, owner: JSRef<Element>) -> Temporary<Attr> { prefix: Option<DOMString>, owner: JSRef<Element>) -> Temporary<Attr> {
reflect_dom_object(box Attr::new_inherited(local_name, value, name, namespace, prefix, owner), reflect_dom_object(box Attr::new_inherited(local_name, value, name, namespace, prefix, owner),
&Window(window), AttrBinding::Wrap) &global::Window(window), AttrBinding::Wrap)
} }
} }

View file

@ -23,7 +23,7 @@ use js::jsval::{UndefinedValue, NullValue, BooleanValue, Int32Value, UInt32Value
use js::jsval::{StringValue, ObjectValue, ObjectOrNullValue}; use js::jsval::{StringValue, ObjectValue, ObjectOrNullValue};
use js::glue::RUST_JS_NumberValue; use js::glue::RUST_JS_NumberValue;
use libc; use libc;
use std::default::Default; use std::default;
use std::slice; use std::slice;
use dom::bindings::codegen::PrototypeList; 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, cx: *mut JSContext, value: JSVal,
convert_fn: unsafe extern "C" fn(*mut JSContext, JSVal, *mut T) -> JSBool) -> Result<T, ()> { 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 { if convert_fn(cx, value, &mut ret) == 0 {
Err(()) Err(())
} else { } else {
@ -246,7 +246,7 @@ pub enum StringificationBehavior {
Empty, Empty,
} }
impl Default for StringificationBehavior { impl default::Default for StringificationBehavior {
fn default() -> StringificationBehavior { fn default() -> StringificationBehavior {
Default 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>, ()> { fn from_jsval(cx: *mut JSContext, value: JSVal, _: ()) -> Result<Option<T>, ()> {
if value.is_null_or_undefined() { if value.is_null_or_undefined() {
Ok(None) Ok(None)
} else { } else {
let option: X = Default::default(); let option: X = default::Default::default();
let result: Result<T, ()> = FromJSValConvertible::from_jsval(cx, value, option); let result: Result<T, ()> = FromJSValConvertible::from_jsval(cx, value, option);
result.map(Some) result.map(Some)
} }

View file

@ -11,7 +11,7 @@ use dom::bindings::conversions::FromJSValConvertible;
use dom::bindings::js::{JS, JSRef, Root}; use dom::bindings::js::{JS, JSRef, Root};
use dom::bindings::utils::{Reflectable, Reflector}; use dom::bindings::utils::{Reflectable, Reflector};
use dom::workerglobalscope::WorkerGlobalScope; use dom::workerglobalscope::WorkerGlobalScope;
use dom::window::Window; use dom::window;
use script_task::ScriptChan; use script_task::ScriptChan;
use servo_net::resource_task::ResourceTask; use servo_net::resource_task::ResourceTask;
@ -27,13 +27,13 @@ use std::ptr;
/// A freely-copyable reference to a rooted global object. /// A freely-copyable reference to a rooted global object.
pub enum GlobalRef<'a> { pub enum GlobalRef<'a> {
Window(JSRef<'a, Window>), Window(JSRef<'a, window::Window>),
Worker(JSRef<'a, WorkerGlobalScope>), Worker(JSRef<'a, WorkerGlobalScope>),
} }
/// A stack-based rooted reference to a global object. /// A stack-based rooted reference to a global object.
pub enum GlobalRoot<'a, 'b> { pub enum GlobalRoot<'a, 'b> {
WindowRoot(Root<'a, 'b, Window>), WindowRoot(Root<'a, 'b, window::Window>),
WorkerRoot(Root<'a, 'b, WorkerGlobalScope>), WorkerRoot(Root<'a, 'b, WorkerGlobalScope>),
} }
@ -42,7 +42,7 @@ pub enum GlobalRoot<'a, 'b> {
#[jstraceable] #[jstraceable]
#[must_root] #[must_root]
pub enum GlobalField { pub enum GlobalField {
WindowField(JS<Window>), WindowField(JS<window::Window>),
WorkerField(JS<WorkerGlobalScope>), WorkerField(JS<WorkerGlobalScope>),
} }
@ -58,7 +58,7 @@ impl<'a> GlobalRef<'a> {
/// Extract a `Window`, causing task failure if the global object is not /// Extract a `Window`, causing task failure if the global object is not
/// a `Window`. /// 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 { match *self {
Window(window) => window, Window(window) => window,
Worker(_) => fail!("expected a Window scope"), Worker(_) => fail!("expected a Window scope"),

View file

@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::DedicatedWorkerGlobalScopeBinding::Dedicat
use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull; use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
use dom::bindings::codegen::InheritTypes::DedicatedWorkerGlobalScopeDerived; use dom::bindings::codegen::InheritTypes::DedicatedWorkerGlobalScopeDerived;
use dom::bindings::codegen::InheritTypes::{EventTargetCast, WorkerGlobalScopeCast}; 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::js::{JSRef, Temporary, RootCollection};
use dom::bindings::trace::Untraceable; use dom::bindings::trace::Untraceable;
use dom::bindings::utils::{Reflectable, Reflector}; use dom::bindings::utils::{Reflectable, Reflector};
@ -130,7 +130,7 @@ impl DedicatedWorkerGlobalScope {
ptr::null(), ptr::null_mut()) != 0); 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(); global.delayed_release_worker();
}, },
Ok(XHRProgressMsg(addr, progress)) => { Ok(XHRProgressMsg(addr, progress)) => {

View file

@ -19,7 +19,8 @@ use dom::bindings::codegen::InheritTypes::{HTMLFormElementDerived, HTMLImageElem
use dom::bindings::codegen::InheritTypes::{HTMLScriptElementDerived}; use dom::bindings::codegen::InheritTypes::{HTMLScriptElementDerived};
use dom::bindings::error::{ErrorResult, Fallible, NotSupported, InvalidCharacter}; use dom::bindings::error::{ErrorResult, Fallible, NotSupported, InvalidCharacter};
use dom::bindings::error::{HierarchyRequest, NamespaceError}; 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::{JS, JSRef, Temporary, OptionalSettable, TemporaryPushable};
use dom::bindings::js::OptionalRootable; use dom::bindings::js::OptionalRootable;
use dom::bindings::trace::{Traceable, Untraceable}; 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> { 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), let document = reflect_dom_object(box Document::new_inherited(window, url, doctype, content_type),
&Window(window), &global::Window(window),
DocumentBinding::Wrap).root(); DocumentBinding::Wrap).root();
let node: JSRef<Node> = NodeCast::from_ref(*document); let node: JSRef<Node> = NodeCast::from_ref(*document);
@ -584,10 +585,14 @@ impl<'a> DocumentMethods for JSRef<'a, Document> {
let window = self.window.root(); let window = self.window.root();
match interface.as_slice().to_ascii_lower().as_slice() { match interface.as_slice().to_ascii_lower().as_slice() {
"uievents" | "uievent" => Ok(EventCast::from_temporary(UIEvent::new_uninitialized(*window))), "uievents" | "uievent" => Ok(EventCast::from_temporary(
"mouseevents" | "mouseevent" => Ok(EventCast::from_temporary(MouseEvent::new_uninitialized(*window))), UIEvent::new_uninitialized(*window))),
"customevent" => Ok(EventCast::from_temporary(CustomEvent::new_uninitialized(&Window(*window)))), "mouseevents" | "mouseevent" => Ok(EventCast::from_temporary(
"htmlevents" | "events" | "event" => Ok(Event::new_uninitialized(&Window(*window))), 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) _ => Err(NotSupported)
} }
} }

View file

@ -6,7 +6,8 @@ use dom::bindings::codegen::Bindings::DOMParserBinding;
use dom::bindings::codegen::Bindings::DOMParserBinding::DOMParserMethods; use dom::bindings::codegen::Bindings::DOMParserBinding::DOMParserMethods;
use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedTypeValues::{Text_html, Text_xml}; use dom::bindings::codegen::Bindings::DOMParserBinding::SupportedTypeValues::{Text_html, Text_xml};
use dom::bindings::error::{Fallible, FailureUnknown}; 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::js::{JS, JSRef, Temporary};
use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object}; use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
use dom::document::{Document, HTMLDocument, NonHTMLDocument}; use dom::document::{Document, HTMLDocument, NonHTMLDocument};
@ -29,7 +30,7 @@ impl DOMParser {
} }
pub fn new(window: JSRef<Window>) -> Temporary<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) DOMParserBinding::Wrap)
} }

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::Bindings::DOMRectBinding; use dom::bindings::codegen::Bindings::DOMRectBinding;
use dom::bindings::codegen::Bindings::DOMRectBinding::DOMRectMethods; 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::js::{JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::window::Window; use dom::window::Window;
@ -36,7 +36,7 @@ impl DOMRect {
top: Au, bottom: Au, top: Au, bottom: Au,
left: Au, right: Au) -> Temporary<DOMRect> { left: Au, right: Au) -> Temporary<DOMRect> {
reflect_dom_object(box DOMRect::new_inherited(top, bottom, left, right), reflect_dom_object(box DOMRect::new_inherited(top, bottom, left, right),
&Window(window), DOMRectBinding::Wrap) &global::Window(window), DOMRectBinding::Wrap)
} }
} }

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::Bindings::DOMRectListBinding; use dom::bindings::codegen::Bindings::DOMRectListBinding;
use dom::bindings::codegen::Bindings::DOMRectListBinding::DOMRectListMethods; 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::js::{JS, JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::domrect::DOMRect; use dom::domrect::DOMRect;
@ -32,7 +32,7 @@ impl DOMRectList {
pub fn new(window: JSRef<Window>, pub fn new(window: JSRef<Window>,
rects: Vec<JSRef<DOMRect>>) -> Temporary<DOMRectList> { rects: Vec<JSRef<DOMRect>>) -> Temporary<DOMRectList> {
reflect_dom_object(box DOMRectList::new_inherited(window, rects), reflect_dom_object(box DOMRectList::new_inherited(window, rects),
&Window(window), DOMRectListBinding::Wrap) &global::Window(window), DOMRectListBinding::Wrap)
} }
} }

View file

@ -142,7 +142,7 @@ pub enum ElementTypeId {
HTMLVideoElementTypeId, HTMLVideoElementTypeId,
HTMLUnknownElementTypeId, 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> { 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) document, ElementBinding::Wrap)
} }
} }

View file

@ -5,7 +5,7 @@
use dom::bindings::codegen::Bindings::HTMLCollectionBinding; use dom::bindings::codegen::Bindings::HTMLCollectionBinding;
use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods; use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
use dom::bindings::codegen::InheritTypes::{ElementCast, NodeCast}; 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::js::{JS, JSRef, Temporary};
use dom::bindings::trace::JSTraceable; use dom::bindings::trace::JSTraceable;
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; 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> { pub fn new(window: JSRef<Window>, collection: CollectionTypeId) -> Temporary<HTMLCollection> {
reflect_dom_object(box HTMLCollection::new_inherited(collection), 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() root.deref().traverse_preorder()
.filter_map(|node| { .filter_map(|node| {
let elem: Option<JSRef<Element>> = ElementCast::to_ref(node); let elem: Option<JSRef<Element>> = ElementCast::to_ref(node);
elem.filtered(|&elem| filter.filter(elem, *root)) match elem {
.map(|elem| elem.clone()) Some(ref elem) if filter.filter(*elem, *root) => Some(elem.clone()),
_ => None
}
}) })
.nth(index as uint) .nth(index as uint)
.clone() .clone()
@ -221,8 +223,10 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> {
root.deref().traverse_preorder() root.deref().traverse_preorder()
.filter_map(|node| { .filter_map(|node| {
let elem: Option<JSRef<Element>> = ElementCast::to_ref(node); let elem: Option<JSRef<Element>> = ElementCast::to_ref(node);
elem.filtered(|&elem| filter.filter(elem, *root)) match elem {
.map(|elem| elem.clone()) Some(ref elem) if filter.filter(*elem, *root) => Some(elem.clone()),
_ => None
}
}) })
.find(|elem| { .find(|elem| {
elem.get_string_attribute("name") == key || elem.get_string_attribute("name") == key ||

View file

@ -12,7 +12,7 @@ use dom::bindings::codegen::InheritTypes::{HTMLElementDerived, HTMLBodyElementDe
use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::js::{JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector}; use dom::bindings::utils::{Reflectable, Reflector};
use dom::document::Document; 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::eventtarget::{EventTarget, EventTargetHelpers, NodeTargetTypeId};
use dom::node::{Node, ElementNodeTypeId, window_from_node}; use dom::node::{Node, ElementNodeTypeId, window_from_node};
use dom::virtualmethods::VirtualMethods; use dom::virtualmethods::VirtualMethods;
@ -30,7 +30,7 @@ pub struct HTMLElement {
impl HTMLElementDerived for EventTarget { impl HTMLElementDerived for EventTarget {
fn is_htmlelement(&self) -> bool { fn is_htmlelement(&self) -> bool {
match self.type_id { match self.type_id {
NodeTargetTypeId(ElementNodeTypeId(ElementTypeId)) => false, NodeTargetTypeId(ElementNodeTypeId(ElementTypeId_)) => false,
NodeTargetTypeId(ElementNodeTypeId(_)) => true, NodeTargetTypeId(ElementNodeTypeId(_)) => true,
_ => false _ => false
} }

View file

@ -94,7 +94,7 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> {
}, },
Some(ref s) => { Some(ref s) => {
debug!("script language={:s}", *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 => { None => {
debug!("no script type or language, inferring js"); debug!("no script type or language, inferring js");

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::Bindings::LocationBinding; use dom::bindings::codegen::Bindings::LocationBinding;
use dom::bindings::codegen::Bindings::LocationBinding::LocationMethods; 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::js::{JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::urlhelper::UrlHelper; use dom::urlhelper::UrlHelper;
@ -32,7 +32,7 @@ impl Location {
pub fn new(window: JSRef<Window>, page: Rc<Page>) -> Temporary<Location> { pub fn new(window: JSRef<Window>, page: Rc<Page>) -> Temporary<Location> {
reflect_dom_object(box Location::new_inherited(page), reflect_dom_object(box Location::new_inherited(page),
&Window(window), &global::Window(window),
LocationBinding::Wrap) LocationBinding::Wrap)
} }
} }

View file

@ -7,7 +7,8 @@ use dom::bindings::codegen::Bindings::MouseEventBinding::MouseEventMethods;
use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods; use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
use dom::bindings::codegen::InheritTypes::{UIEventCast, MouseEventDerived}; use dom::bindings::codegen::InheritTypes::{UIEventCast, MouseEventDerived};
use dom::bindings::error::Fallible; 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::js::{JS, JSRef, RootedReference, Temporary, OptionalSettable};
use dom::bindings::trace::Traceable; use dom::bindings::trace::Traceable;
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
@ -59,7 +60,7 @@ impl MouseEvent {
pub fn new_uninitialized(window: JSRef<Window>) -> Temporary<MouseEvent> { pub fn new_uninitialized(window: JSRef<Window>) -> Temporary<MouseEvent> {
reflect_dom_object(box MouseEvent::new_inherited(), reflect_dom_object(box MouseEvent::new_inherited(),
&Window(window), &global::Window(window),
MouseEventBinding::Wrap) MouseEventBinding::Wrap)
} }

View file

@ -5,7 +5,7 @@
use dom::attr::Attr; use dom::attr::Attr;
use dom::bindings::codegen::Bindings::NamedNodeMapBinding; use dom::bindings::codegen::Bindings::NamedNodeMapBinding;
use dom::bindings::codegen::Bindings::NamedNodeMapBinding::NamedNodeMapMethods; 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::js::{JS, JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::element::Element; use dom::element::Element;
@ -28,7 +28,7 @@ impl NamedNodeMap {
pub fn new(window: JSRef<Window>, elem: JSRef<Element>) -> Temporary<NamedNodeMap> { pub fn new(window: JSRef<Window>, elem: JSRef<Element>) -> Temporary<NamedNodeMap> {
reflect_dom_object(box NamedNodeMap::new_inherited(elem), reflect_dom_object(box NamedNodeMap::new_inherited(elem),
&Window(window), NamedNodeMapBinding::Wrap) &global::Window(window), NamedNodeMapBinding::Wrap)
} }
} }

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::Bindings::NavigatorBinding; use dom::bindings::codegen::Bindings::NavigatorBinding;
use dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods; 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::js::{JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::navigatorinfo::NavigatorInfo; use dom::navigatorinfo::NavigatorInfo;
@ -26,7 +26,7 @@ impl Navigator {
pub fn new(window: JSRef<Window>) -> Temporary<Navigator> { pub fn new(window: JSRef<Window>) -> Temporary<Navigator> {
reflect_dom_object(box Navigator::new_inherited(), reflect_dom_object(box Navigator::new_inherited(),
&Window(window), &global::Window(window),
NavigatorBinding::Wrap) NavigatorBinding::Wrap)
} }
} }

View file

@ -20,7 +20,8 @@ use dom::bindings::codegen::InheritTypes::{ProcessingInstructionCast, EventTarge
use dom::bindings::codegen::InheritTypes::{HTMLLegendElementDerived, HTMLFieldSetElementDerived}; use dom::bindings::codegen::InheritTypes::{HTMLLegendElementDerived, HTMLFieldSetElementDerived};
use dom::bindings::codegen::InheritTypes::HTMLOptGroupElementDerived; use dom::bindings::codegen::InheritTypes::HTMLOptGroupElementDerived;
use dom::bindings::error::{Fallible, NotFound, HierarchyRequest, Syntax}; 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::{JS, JSRef, RootedReference, Temporary, Root, OptionalUnrootable};
use dom::bindings::js::{OptionalSettable, TemporaryPushable, OptionalRootedRootable}; use dom::bindings::js::{OptionalSettable, TemporaryPushable, OptionalRootedRootable};
use dom::bindings::js::{ResultRootable, OptionalRootable}; use dom::bindings::js::{ResultRootable, OptionalRootable};
@ -203,9 +204,9 @@ impl LayoutDataRef {
/// Take the chan out of the layout data if it is present. /// Take the chan out of the layout data if it is present.
pub fn take_chan(&self) -> Option<LayoutChan> { pub fn take_chan(&self) -> Option<LayoutChan> {
let mut layout_data = self.data_cell.borrow_mut(); let mut layout_data = self.data_cell.borrow_mut();
match *layout_data { match &mut *layout_data {
None => None, &None => None,
Some(..) => Some(layout_data.get_mut_ref().chan.take_unwrap()), &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 { fn summarize(&self) -> NodeInfo {
if self.unique_id.borrow().is_empty() { if self.unique_id.borrow().is_empty() {
let mut unique_id = self.unique_id.borrow_mut(); 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 { NodeInfo {
@ -1008,7 +1009,7 @@ impl Node {
wrap_fn: extern "Rust" fn(*mut JSContext, &GlobalRef, Box<N>) -> Temporary<N>) wrap_fn: extern "Rust" fn(*mut JSContext, &GlobalRef, Box<N>) -> Temporary<N>)
-> Temporary<N> { -> Temporary<N> {
let window = document.window.root(); 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 { pub fn new_inherited(type_id: NodeTypeId, doc: JSRef<Document>) -> Node {

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::Bindings::NodeListBinding; use dom::bindings::codegen::Bindings::NodeListBinding;
use dom::bindings::codegen::Bindings::NodeListBinding::NodeListMethods; 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::js::{JS, JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::node::{Node, NodeHelpers}; use dom::node::{Node, NodeHelpers};
@ -35,7 +35,7 @@ impl NodeList {
pub fn new(window: JSRef<Window>, pub fn new(window: JSRef<Window>,
list_type: NodeListType) -> Temporary<NodeList> { list_type: NodeListType) -> Temporary<NodeList> {
reflect_dom_object(box NodeList::new_inherited(list_type), 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> { pub fn new_simple_list(window: JSRef<Window>, elements: Vec<JSRef<Node>>) -> Temporary<NodeList> {

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::Bindings::PerformanceBinding; use dom::bindings::codegen::Bindings::PerformanceBinding;
use dom::bindings::codegen::Bindings::PerformanceBinding::PerformanceMethods; 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::js::{JS, JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::performancetiming::{PerformanceTiming, PerformanceTimingHelpers}; use dom::performancetiming::{PerformanceTiming, PerformanceTimingHelpers};
@ -30,7 +30,7 @@ impl Performance {
pub fn new(window: JSRef<Window>) -> Temporary<Performance> { pub fn new(window: JSRef<Window>) -> Temporary<Performance> {
reflect_dom_object(box Performance::new_inherited(window), reflect_dom_object(box Performance::new_inherited(window),
&Window(window), &global::Window(window),
PerformanceBinding::Wrap) PerformanceBinding::Wrap)
} }
} }

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::Bindings::PerformanceTimingBinding; use dom::bindings::codegen::Bindings::PerformanceTimingBinding;
use dom::bindings::codegen::Bindings::PerformanceTimingBinding::PerformanceTimingMethods; 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::js::{JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::window::Window; use dom::window::Window;
@ -31,7 +31,7 @@ impl PerformanceTiming {
pub fn new(window: JSRef<Window>) -> Temporary<PerformanceTiming> { pub fn new(window: JSRef<Window>) -> Temporary<PerformanceTiming> {
let timing = PerformanceTiming::new_inherited(window.navigationStart, let timing = PerformanceTiming::new_inherited(window.navigationStart,
window.navigationStartPrecise); window.navigationStartPrecise);
reflect_dom_object(box timing, &Window(window), reflect_dom_object(box timing, &global::Window(window),
PerformanceTimingBinding::Wrap) PerformanceTimingBinding::Wrap)
} }
} }

View file

@ -4,7 +4,7 @@
use dom::bindings::codegen::Bindings::ScreenBinding; use dom::bindings::codegen::Bindings::ScreenBinding;
use dom::bindings::codegen::Bindings::ScreenBinding::ScreenMethods; 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::js::{JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::window::Window; use dom::window::Window;
@ -24,7 +24,7 @@ impl Screen {
pub fn new(window: JSRef<Window>) -> Temporary<Screen> { pub fn new(window: JSRef<Window>) -> Temporary<Screen> {
reflect_dom_object(box Screen::new_inherited(), reflect_dom_object(box Screen::new_inherited(),
&Window(window), &global::Window(window),
ScreenBinding::Wrap) ScreenBinding::Wrap)
} }
} }

View file

@ -7,7 +7,8 @@ use dom::bindings::codegen::Bindings::UIEventBinding;
use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods; use dom::bindings::codegen::Bindings::UIEventBinding::UIEventMethods;
use dom::bindings::codegen::InheritTypes::{EventCast, UIEventDerived}; use dom::bindings::codegen::InheritTypes::{EventCast, UIEventDerived};
use dom::bindings::error::Fallible; 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::js::{JS, JSRef, RootedReference, Temporary, OptionalSettable};
use dom::bindings::trace::Traceable; use dom::bindings::trace::Traceable;
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
@ -42,7 +43,7 @@ impl UIEvent {
pub fn new_uninitialized(window: JSRef<Window>) -> Temporary<UIEvent> { pub fn new_uninitialized(window: JSRef<Window>) -> Temporary<UIEvent> {
reflect_dom_object(box UIEvent::new_inherited(UIEventTypeId), reflect_dom_object(box UIEvent::new_inherited(UIEventTypeId),
&Window(window), &global::Window(window),
UIEventBinding::Wrap) UIEventBinding::Wrap)
} }

View file

@ -16,7 +16,7 @@ impl UrlHelper {
match url.query { match url.query {
None => "".to_string(), None => "".to_string(),
Some(ref query) if query.as_slice() == "" => "".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 { match url.fragment {
None => "".to_string(), None => "".to_string(),
Some(ref hash) if hash.as_slice() == "" => "".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)
} }
} }
} }

View file

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::Bindings::ValidityStateBinding; use dom::bindings::codegen::Bindings::ValidityStateBinding;
use dom::bindings::global::Window; use dom::bindings::global;
use dom::bindings::js::{JSRef, Temporary}; use dom::bindings::js::{JSRef, Temporary};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object}; use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::window::Window; use dom::window::Window;
@ -25,7 +25,7 @@ impl ValidityState {
pub fn new(window: JSRef<Window>) -> Temporary<ValidityState> { pub fn new(window: JSRef<Window>) -> Temporary<ValidityState> {
reflect_dom_object(box ValidityState::new_inherited(), reflect_dom_object(box ValidityState::new_inherited(),
&Window(window), &global::Window(window),
ValidityStateBinding::Wrap) ValidityStateBinding::Wrap)
} }
} }

View file

@ -23,7 +23,7 @@ use dom::bindings::codegen::InheritTypes::HTMLStyleElementCast;
use dom::bindings::codegen::InheritTypes::HTMLTextAreaElementCast; use dom::bindings::codegen::InheritTypes::HTMLTextAreaElementCast;
use dom::bindings::js::JSRef; use dom::bindings::js::JSRef;
use dom::element::Element; use dom::element::Element;
use dom::element::ElementTypeId; use dom::element::ElementTypeId_;
use dom::element::HTMLAnchorElementTypeId; use dom::element::HTMLAnchorElementTypeId;
use dom::element::HTMLAreaElementTypeId; use dom::element::HTMLAreaElementTypeId;
use dom::element::HTMLBodyElementTypeId; 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(); let element: &'a JSRef<'a, HTMLTextAreaElement> = HTMLTextAreaElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a element as &'a VirtualMethods + 'a
} }
ElementNodeTypeId(ElementTypeId) => { ElementNodeTypeId(ElementTypeId_) => {
let element: &'a JSRef<'a, Element> = ElementCast::to_borrowed_ref(node).unwrap(); let element: &'a JSRef<'a, Element> = ElementCast::to_borrowed_ref(node).unwrap();
element as &'a VirtualMethods + 'a element as &'a VirtualMethods + 'a
} }

View file

@ -6,7 +6,8 @@ use dom::bindings::codegen::Bindings::EventHandlerBinding::EventHandlerNonNull;
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding; use dom::bindings::codegen::Bindings::XMLHttpRequestBinding;
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMethods; use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestMethods;
use dom::bindings::codegen::Bindings::XMLHttpRequestBinding::XMLHttpRequestResponseType; 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::codegen::InheritTypes::{EventCast, EventTargetCast, XMLHttpRequestDerived};
use dom::bindings::conversions::ToJSValConvertible; use dom::bindings::conversions::ToJSValConvertible;
use dom::bindings::error::{Error, ErrorResult, Fallible, InvalidState, InvalidAccess}; 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 // So this unsafe block should never fail
let mut buf = h.header_value(); let mut buf = h.header_value();
buf.push_bytes(&[0x2C, 0x20]); buf.as_mut_vec().push_all(&[0x2C, 0x20]);
buf.push_bytes(value.as_slice()); buf.as_mut_vec().push_all(value.as_slice());
value = ByteString::new(buf.container_into_owned_bytes()); 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 { fn SetResponseType(self, response_type: XMLHttpRequestResponseType) -> ErrorResult {
match self.global { match self.global {
WorkerField(_) if response_type == Document => return Ok(()), WorkerField(_) if response_type == XMLHttpRequestResponseTypeValues::Document
=> return Ok(()),
_ => {} _ => {}
} }
match self.ready_state.deref().get() { match self.ready_state.deref().get() {

View file

@ -11,7 +11,7 @@ use dom::bindings::codegen::Bindings::ElementBinding::ElementMethods;
use dom::bindings::codegen::InheritTypes::{EventTargetCast, NodeCast, EventCast, ElementCast}; use dom::bindings::codegen::InheritTypes::{EventTargetCast, NodeCast, EventCast, ElementCast};
use dom::bindings::conversions; use dom::bindings::conversions;
use dom::bindings::conversions::{FromJSValConvertible, Empty}; 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::{JS, JSRef, RootCollection, Temporary, OptionalSettable};
use dom::bindings::js::OptionalRootable; use dom::bindings::js::OptionalRootable;
use dom::bindings::trace::JSTraceable; use dom::bindings::trace::JSTraceable;
@ -514,7 +514,7 @@ impl ScriptTask {
fn handle_evaluate_js(&self, pipeline: PipelineId, eval: String, reply: Sender<EvaluateJSReply>) { fn handle_evaluate_js(&self, pipeline: PipelineId, eval: String, reply: Sender<EvaluateJSReply>) {
let page = get_page(&*self.page.borrow(), pipeline); let page = get_page(&*self.page.borrow(), pipeline);
let frame = page.frame(); 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 cx = window.get_cx();
let rval = window.evaluate_js_with_result(eval.as_slice()); 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>) { fn handle_get_root_node(&self, pipeline: PipelineId, reply: Sender<NodeInfo>) {
let page = get_page(&*self.page.borrow(), pipeline); let page = get_page(&*self.page.borrow(), pipeline);
let frame = page.frame(); 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); let node: JSRef<Node> = NodeCast::from_ref(*document);
reply.send(node.summarize()); reply.send(node.summarize());
@ -546,7 +546,7 @@ impl ScriptTask {
fn handle_get_document_element(&self, pipeline: PipelineId, reply: Sender<NodeInfo>) { fn handle_get_document_element(&self, pipeline: PipelineId, reply: Sender<NodeInfo>) {
let page = get_page(&*self.page.borrow(), pipeline); let page = get_page(&*self.page.borrow(), pipeline);
let frame = page.frame(); 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 document_element = document.GetDocumentElement().root().unwrap();
let node: JSRef<Node> = NodeCast::from_ref(*document_element); 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> { fn find_node_by_unique_id(&self, pipeline: PipelineId, node_id: String) -> Temporary<Node> {
let page = get_page(&*self.page.borrow(), pipeline); let page = get_page(&*self.page.borrow(), pipeline);
let frame = page.frame(); 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); let node: JSRef<Node> = NodeCast::from_ref(*document);
for candidate in node.traverse_preorder() { for candidate in node.traverse_preorder() {
@ -810,7 +810,7 @@ impl ScriptTask {
// Receive the JavaScript scripts. // Receive the JavaScript scripts.
assert!(js_scripts.is_some()); assert!(js_scripts.is_some());
let js_scripts = js_scripts.take_unwrap(); let js_scripts = js_scripts.take().unwrap();
debug!("js_scripts: {:?}", js_scripts); debug!("js_scripts: {:?}", js_scripts);
with_compartment((**cx).ptr, window.reflector().get_jsobject(), || { 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 // 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 // "load" event as soon as we've finished executing all scripts parsed during
// the initial load. // 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 doctarget: JSRef<EventTarget> = EventTargetCast::from_ref(*document);
let wintarget: JSRef<EventTarget> = EventTargetCast::from_ref(*window); let wintarget: JSRef<EventTarget> = EventTargetCast::from_ref(*window);
let _ = wintarget.dispatch_event_with_target(Some(doctarget), *event); let _ = wintarget.dispatch_event_with_target(Some(doctarget), *event);
@ -940,7 +940,7 @@ impl ScriptTask {
Some(ref frame) => { Some(ref frame) => {
let window = frame.window.root(); let window = frame.window.root();
let event = let event =
Event::new(&Window(*window), Event::new(&global::Window(*window),
"click".to_string(), "click".to_string(),
true, true).root(); true, true).root();
let eventtarget: JSRef<EventTarget> = EventTargetCast::from_ref(node); let eventtarget: JSRef<EventTarget> = EventTargetCast::from_ref(node);

View file

@ -39,7 +39,7 @@ pub fn iter_font_face_rules_inner(rules: &[CSSRule], callback: |family: &str, so
} }
enum Source { enum Source {
UrlSource(UrlSource), UrlSource_(UrlSource),
LocalSource(String), LocalSource(String),
} }
@ -74,7 +74,7 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_
match item { match item {
DeclAtRule(rule) => log_css_error( DeclAtRule(rule) => log_css_error(
rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()), 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 { if important {
log_css_error(location, "!important is not allowed on @font-face descriptors"); log_css_error(location, "!important is not allowed on @font-face descriptors");
continue continue
@ -120,7 +120,7 @@ pub fn parse_font_face_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>, base_
/// local() is not supported yet /// local() is not supported yet
fn parse_one_url_src(iter: ParserIter, base_url: &Url) -> Result<UrlSource, ()> { fn parse_one_url_src(iter: ParserIter, base_url: &Url) -> Result<UrlSource, ()> {
match parse_one_src(iter, base_url) { match parse_one_src(iter, base_url) {
Ok(UrlSource(source)) => Ok(source), Ok(UrlSource_(source)) => Ok(source),
_ => Err(()) _ => Err(())
} }
} }
@ -162,7 +162,7 @@ fn parse_one_src(iter: ParserIter, base_url: &Url) -> Result<Source, ()> {
None => vec![], None => vec![],
}; };
Ok(UrlSource(UrlSource { Ok(UrlSource_(UrlSource {
url: url, url: url,
format_hints: format_hints, 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, ()> { fn parse_one_format(iter: ParserIter) -> Result<String, ()> {
match iter.next() { match iter.next() {
Some(&String(ref value)) => { Some(&QuotedString(ref value)) => {
if iter.next().is_none() { if iter.next().is_none() {
Ok(value.clone()) Ok(value.clone())
} else { } else {

View file

@ -33,7 +33,7 @@ pub struct MediaQuery {
pub enum MediaQueryType { pub enum MediaQueryType {
All, // Always true All, // Always true
MediaType(MediaType), MediaType_(MediaType),
} }
#[deriving(PartialEq)] #[deriving(PartialEq)]
@ -61,8 +61,8 @@ pub fn parse_media_rule(rule: AtRule, parent_rules: &mut Vec<CSSRule>,
let mut rules = vec!(); let mut rules = vec!();
for rule in ErrorLoggerIterator(parse_rule_list(block.into_iter())) { for rule in ErrorLoggerIterator(parse_rule_list(block.into_iter())) {
match rule { match rule {
QualifiedRule(rule) => parse_style_rule(rule, &mut rules, namespaces, base_url), QualifiedRule_(rule) => parse_style_rule(rule, &mut rules, namespaces, base_url),
AtRule(rule) => parse_nested_at_rule( AtRule_(rule) => parse_nested_at_rule(
rule.name.as_slice().to_ascii_lower().as_slice(), rule, &mut rules, namespaces, base_url), 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 { let mq = match next {
Some(&Ident(ref value)) => { Some(&Ident(ref value)) => {
match value.as_slice().to_ascii_lower().as_slice() { match value.as_slice().to_ascii_lower().as_slice() {
"screen" => Some(MediaQuery{ media_type: MediaType(Screen) }), "screen" => Some(MediaQuery{ media_type: MediaType_(Screen) }),
"print" => Some(MediaQuery{ media_type: MediaType(Print) }), "print" => Some(MediaQuery{ media_type: MediaType_(Print) }),
"all" => Some(MediaQuery{ media_type: All }), "all" => Some(MediaQuery{ media_type: All }),
_ => None _ => None
} }
@ -122,7 +122,7 @@ impl MediaQueryList {
pub fn evaluate(&self, device: &Device) -> bool { pub fn evaluate(&self, device: &Device) -> bool {
self.media_queries.iter().any(|mq| { self.media_queries.iter().any(|mq| {
match mq.media_type { match mq.media_type {
MediaType(media_type) => media_type == device.media_type, MediaType_(media_type) => media_type == device.media_type,
All => true, All => true,
} }
// TODO: match Level 3 expressions // TODO: match Level 3 expressions

View file

@ -38,7 +38,7 @@ pub fn parse_namespace_rule(rule: AtRule, namespaces: &mut NamespaceMap) {
if prefix.is_some() { syntax_error!() } if prefix.is_some() { syntax_error!() }
prefix = Some(value); prefix = Some(value);
}, },
URL(value) | String(value) => { URL(value) | QuotedString(value) => {
if ns.is_some() { syntax_error!() } if ns.is_some() { syntax_error!() }
ns = Some(Namespace::from_str(Some(value))); ns = Some(Namespace::from_str(Some(value)));
break break

View file

@ -502,7 +502,7 @@ pub mod longhands {
pub use super::computed_as_specified as to_computed_value; pub use super::computed_as_specified as to_computed_value;
pub mod computed_value { pub mod computed_value {
#[deriving(PartialEq, Clone)] #[deriving(PartialEq, Clone)]
pub enum Content { pub enum ContentItem {
StringContent(String), StringContent(String),
} }
#[allow(non_camel_case_types)] #[allow(non_camel_case_types)]
@ -510,7 +510,7 @@ pub mod longhands {
pub enum T { pub enum T {
normal, normal,
none, none,
Content(Vec<Content>), Content(Vec<ContentItem>),
} }
} }
pub type SpecifiedValue = computed_value::T; pub type SpecifiedValue = computed_value::T;
@ -532,7 +532,7 @@ pub mod longhands {
let mut content = vec!(); let mut content = vec!();
for component_value in input.skip_whitespace() { for component_value in input.skip_whitespace() {
match component_value { match component_value {
&String(ref value) &QuotedString(ref value)
=> content.push(StringContent(value.clone())), => content.push(StringContent(value.clone())),
_ => return Err(()) // invalid/unsupported value _ => return Err(()) // invalid/unsupported value
} }
@ -546,7 +546,7 @@ pub mod longhands {
${new_style_struct("Background", is_inherited=False)} ${new_style_struct("Background", is_inherited=False)}
${predefined_type("background-color", "CSSColor", ${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"> <%self:single_component_value name="background-image">
// The computed value is the same as the specified value. // 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) pub fn parse_specified(input: &[ComponentValue], _base_url: &Url)
-> Result<DeclaredValue<SpecifiedValue>, ()> { -> Result<DeclaredValue<SpecifiedValue>, ()> {
match one_component_value(input).and_then(Color::parse) { 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), Ok(CurrentColor) => Ok(Inherit),
Err(()) => Err(()), Err(()) => Err(()),
} }
@ -738,7 +738,7 @@ pub mod longhands {
pub fn parse_one_family<'a>(iter: ParserIter) -> Result<FontFamily, ()> { pub fn parse_one_family<'a>(iter: ParserIter) -> Result<FontFamily, ()> {
// TODO: avoid copying strings? // TODO: avoid copying strings?
let mut idents = match iter.next() { 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)) => { Some(&Ident(ref value)) => {
// match value.as_slice().to_ascii_lower().as_slice() { // match value.as_slice().to_ascii_lower().as_slice() {
// "serif" => return Ok(Serif), // "serif" => return Ok(Serif),
@ -1461,7 +1461,7 @@ pub fn parse_property_declaration_list<I: Iterator<Node>>(input: I, base_url: &U
match item { match item {
DeclAtRule(rule) => log_css_error( DeclAtRule(rule) => log_css_error(
rule.location, format!("Unsupported at-rule in declaration list: @{:s}", rule.name).as_slice()), 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. // TODO: only keep the last valid declaration for a given name.
let (list, seen) = if i { let (list, seen) = if i {
(&mut important_declarations, &mut important_seen) (&mut important_declarations, &mut important_seen)
@ -1663,7 +1663,7 @@ impl ComputedValues {
#[inline] #[inline]
pub fn resolve_color(&self, color: computed::CSSColor) -> RGBA { pub fn resolve_color(&self, color: computed::CSSColor) -> RGBA {
match color { match color {
RGBA(rgba) => rgba, RGBAColor(rgba) => rgba,
CurrentColor => self.get_color().color, CurrentColor => self.get_color().color,
} }
} }

View file

@ -204,7 +204,7 @@ impl SelectorMap {
} }
match SelectorMap::get_local_name(&rule) { 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.local_name_hash.find_push(name, rule.clone());
self.lower_local_name_hash.find_push(lower_name, rule); self.lower_local_name_hash.find_push(lower_name, rule);
return; return;
@ -244,7 +244,7 @@ impl SelectorMap {
} }
/// Retrieve the name if it is a type selector, or None otherwise. /// 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; let simple_selector_sequence = &rule.selector.simple_selectors;
for ss in simple_selector_sequence.iter() { for ss in simple_selector_sequence.iter() {
match *ss { 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() { for ss in selector.simple_selectors.iter() {
match *ss { match *ss {
LocalNameSelector(LocalNameSelector { ref name, ref lower_name }) => { LocalNameSelector(LocalName { ref name, ref lower_name }) => {
if bf.definitely_excludes(name) if bf.definitely_excludes(name)
&& bf.definitely_excludes(lower_name) { && bf.definitely_excludes(lower_name) {
return Some(NotMatchedGlobally); return Some(NotMatchedGlobally);
@ -693,7 +693,7 @@ pub fn matches_simple_selector<'a, E:TElement<'a>,
shareable: &mut bool) shareable: &mut bool)
-> bool { -> bool {
match *selector { 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 name = if element.is_html_element_in_html_document() { lower_name } else { name };
let element = element.as_element(); let element = element.as_element();
element.get_local_name() == name element.get_local_name() == name
@ -1000,7 +1000,7 @@ mod tests {
use servo_util::atom::Atom; use servo_util::atom::Atom;
use sync::Arc; use sync::Arc;
use super::{DeclarationBlock, Rule, SelectorMap}; use super::{DeclarationBlock, Rule, SelectorMap};
use selectors::LocalNameSelector; use selectors::LocalName;
/// Helper method to get some Rules from selector strings. /// Helper method to get some Rules from selector strings.
/// Each sublist of the result contains the Rules for one StyleRule. /// 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 rules_list = get_mock_rules(["img.foo", "#top", "IMG", "ImG"]);
let check = |i, names: Option<(&str, &str)>| { let check = |i, names: Option<(&str, &str)>| {
assert!(SelectorMap::get_local_name(&rules_list[i][0]) 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), name: Atom::from_slice(name),
lower_name: Atom::from_slice(lower_name) })) lower_name: Atom::from_slice(lower_name) }))
}; };

View file

@ -58,7 +58,7 @@ pub enum Combinator {
pub enum SimpleSelector { pub enum SimpleSelector {
IDSelector(Atom), IDSelector(Atom),
ClassSelector(Atom), ClassSelector(Atom),
LocalNameSelector(LocalNameSelector), LocalNameSelector(LocalName),
NamespaceSelector(Namespace), NamespaceSelector(Namespace),
// Attribute selectors // Attribute selectors
@ -93,7 +93,7 @@ pub enum SimpleSelector {
} }
#[deriving(Eq, PartialEq, Clone, Hash)] #[deriving(Eq, PartialEq, Clone, Hash)]
pub struct LocalNameSelector { pub struct LocalName {
pub name: Atom, pub name: Atom,
pub lower_name: Atom, pub lower_name: Atom,
} }
@ -292,7 +292,7 @@ fn parse_type_selector<I: Iterator<ComponentValue>>(
} }
match local_name { match local_name {
Some(name) => { Some(name) => {
simple_selectors.push(LocalNameSelector(LocalNameSelector { simple_selectors.push(LocalNameSelector(LocalName {
name: Atom::from_slice(name.as_slice()), name: Atom::from_slice(name.as_slice()),
lower_name: Atom::from_slice(name.into_ascii_lower().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( () => {{ macro_rules! get_value( () => {{
skip_whitespace(iter); skip_whitespace(iter);
match iter.next() { match iter.next() {
Some(Ident(value)) | Some(String(value)) => value, Some(Ident(value)) | Some(QuotedString(value)) => value,
_ => return Err(()) _ => return Err(())
} }
}};) }};)
@ -597,7 +597,7 @@ mod tests {
assert!(parse("") == Err(())) assert!(parse("") == Err(()))
assert!(parse("EeÉ") == Ok(vec!(Selector { assert!(parse("EeÉ") == Ok(vec!(Selector {
compound_selectors: Arc::new(CompoundSelector { compound_selectors: Arc::new(CompoundSelector {
simple_selectors: vec!(LocalNameSelector(LocalNameSelector { simple_selectors: vec!(LocalNameSelector(LocalName {
name: Atom::from_slice("EeÉ"), name: Atom::from_slice("EeÉ"),
lower_name: Atom::from_slice("eeÉ") })), lower_name: Atom::from_slice("eeÉ") })),
next: None, next: None,
@ -623,7 +623,7 @@ mod tests {
}))) })))
assert!(parse("e.foo#bar") == Ok(vec!(Selector { assert!(parse("e.foo#bar") == Ok(vec!(Selector {
compound_selectors: Arc::new(CompoundSelector { compound_selectors: Arc::new(CompoundSelector {
simple_selectors: vec!(LocalNameSelector(LocalNameSelector { simple_selectors: vec!(LocalNameSelector(LocalName {
name: Atom::from_slice("e"), name: Atom::from_slice("e"),
lower_name: Atom::from_slice("e") }), lower_name: Atom::from_slice("e") }),
ClassSelector(Atom::from_slice("foo")), ClassSelector(Atom::from_slice("foo")),
@ -637,7 +637,7 @@ mod tests {
compound_selectors: Arc::new(CompoundSelector { compound_selectors: Arc::new(CompoundSelector {
simple_selectors: vec!(IDSelector(Atom::from_slice("bar"))), simple_selectors: vec!(IDSelector(Atom::from_slice("bar"))),
next: Some((box CompoundSelector { next: Some((box CompoundSelector {
simple_selectors: vec!(LocalNameSelector(LocalNameSelector { simple_selectors: vec!(LocalNameSelector(LocalName {
name: Atom::from_slice("e"), name: Atom::from_slice("e"),
lower_name: Atom::from_slice("e") }), lower_name: Atom::from_slice("e") }),
ClassSelector(Atom::from_slice("foo"))), ClassSelector(Atom::from_slice("foo"))),
@ -682,7 +682,7 @@ mod tests {
compound_selectors: Arc::new(CompoundSelector { compound_selectors: Arc::new(CompoundSelector {
simple_selectors: vec!( simple_selectors: vec!(
NamespaceSelector(namespace::MathML), NamespaceSelector(namespace::MathML),
LocalNameSelector(LocalNameSelector { LocalNameSelector(LocalName {
name: Atom::from_slice("e"), name: Atom::from_slice("e"),
lower_name: Atom::from_slice("e") }), lower_name: Atom::from_slice("e") }),
), ),
@ -704,7 +704,7 @@ mod tests {
compound_selectors: Arc::new(CompoundSelector { compound_selectors: Arc::new(CompoundSelector {
simple_selectors: vec!(), simple_selectors: vec!(),
next: Some((box CompoundSelector { next: Some((box CompoundSelector {
simple_selectors: vec!(LocalNameSelector(LocalNameSelector { simple_selectors: vec!(LocalNameSelector(LocalName {
name: Atom::from_slice("div"), name: Atom::from_slice("div"),
lower_name: Atom::from_slice("div") })), lower_name: Atom::from_slice("div") })),
next: None, next: None,

View file

@ -73,11 +73,11 @@ impl Stylesheet {
for rule in ErrorLoggerIterator(parse_stylesheet_rules(tokenize(css))) { for rule in ErrorLoggerIterator(parse_stylesheet_rules(tokenize(css))) {
let next_state; // Unitialized to force each branch to set it. let next_state; // Unitialized to force each branch to set it.
match rule { match rule {
QualifiedRule(rule) => { QualifiedRule_(rule) => {
next_state = STATE_BODY; next_state = STATE_BODY;
parse_style_rule(rule, &mut rules, &namespaces, &base_url) parse_style_rule(rule, &mut rules, &namespaces, &base_url)
}, },
AtRule(rule) => { AtRule_(rule) => {
let lower_name = rule.name.as_slice().to_ascii_lower(); let lower_name = rule.name.as_slice().to_ascii_lower();
match lower_name.as_slice() { match lower_name.as_slice() {
"charset" => { "charset" => {

View file

@ -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_len(&mut self, new_len: uint);
unsafe fn set_cap(&mut self, new_cap: uint); unsafe fn set_cap(&mut self, new_cap: uint);
fn data(&self, index: uint) -> *const T; fn data(&self, index: uint) -> *const T;

View file

@ -225,7 +225,7 @@ impl<QueueData: Send, WorkData: Send> WorkQueue<QueueData, WorkData> {
threads.get_mut(i).other_deques.push(infos[j].thief.clone()) 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. // Spawn threads.

74
ports/cef/Cargo.lock generated
View file

@ -12,10 +12,10 @@ dependencies = [
"glut 0.0.1 (git+https://github.com/servo/rust-glut#01af0162ea0322ad1a40d6adb023a39813605949)", "glut 0.0.1 (git+https://github.com/servo/rust-glut#01af0162ea0322ad1a40d6adb023a39813605949)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ed570335738913fb41fc62a024389dfa415962e8)", "layers 0.1.0 (git+https://github.com/servo/rust-layers#ed570335738913fb41fc62a024389dfa415962e8)",
"plugins 0.0.1",
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)", "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)", "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)",
"script 0.0.1", "script 0.0.1",
"servo 0.0.1", "servo 0.0.1",
@ -29,7 +29,7 @@ name = "alert"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e" source = "git+https://github.com/servo/rust-alert#fdc24f13be8d8a2d15214ec228d166b3221b809e"
dependencies = [ 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)", "core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation#166a601ff3e0fc3a64ca1a9090d02c8d4f22b61a)",
] ]
@ -62,7 +62,7 @@ dependencies = [
[[package]] [[package]]
name = "cocoa" name = "cocoa"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-cocoa#cfbf6d9d5a68d3c8f424d678aa22096c49136e25" source = "git+https://github.com/servo/rust-cocoa#acb9b4efc70c3f285057c2aee774f38f81a1b98d"
[[package]] [[package]]
name = "compositing" name = "compositing"
@ -85,7 +85,7 @@ dependencies = [
"opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)", "opengles 0.1.0 (git+https://github.com/servo/rust-opengles#6776e9c07feb149d34b087039ecf6b2c143e3afc)",
"png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)",
"script_traits 0.0.1", "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", "util 0.0.1",
] ]
@ -114,9 +114,9 @@ dependencies = [
[[package]] [[package]]
name = "cssparser" name = "cssparser"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407" source = "git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6"
dependencies = [ 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]] [[package]]
@ -142,7 +142,7 @@ source = "git+https://github.com/servo/rust-egl#88f2a13812ddbce2bf2317221663a61c
[[package]] [[package]]
name = "encoding" name = "encoding"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/lifthrasiir/rust-encoding#35f0d70f65f73ba16f296f9ec675eddee661ba79" source = "git+https://github.com/lifthrasiir/rust-encoding#28eafb604a92c7786685b46c0fc02682ba3ab265"
[[package]] [[package]]
name = "expat-sys" name = "expat-sys"
@ -194,13 +194,13 @@ dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"harfbuzz 0.1.0 (git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99c2905623d35f6)", "harfbuzz 0.1.0 (git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99c2905623d35f6)",
"layers 0.1.0 (git+https://github.com/servo/rust-layers#ed570335738913fb41fc62a024389dfa415962e8)", "layers 0.1.0 (git+https://github.com/servo/rust-layers#ed570335738913fb41fc62a024389dfa415962e8)",
"plugins 0.0.1",
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
"plugins 0.0.1",
"png 0.1.0 (git+https://github.com/servo/rust-png#74418ffbf20e94b0d3bed4a9d004062a13342c79)", "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)", "stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image#f5022de4ad6bb474a03493d1f274dde9b0f1af0c)",
"style 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", "util 0.0.1",
] ]
@ -234,10 +234,10 @@ source = "git+https://github.com/servo/rust-harfbuzz#ad520942cc17232e1a40cdd8a99
[[package]] [[package]]
name = "http" name = "http"
version = "0.1.0-pre" 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 = [ dependencies = [
"openssl 0.0.0 (git+https://github.com/sfackler/rust-openssl.git#a495465b75ffb18ff2303c5a11a103e00a15a13d)", "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]] [[package]]
@ -291,16 +291,16 @@ dependencies = [
name = "layout" name = "layout"
version = "0.0.1" version = "0.0.1"
dependencies = [ 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)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"gfx 0.0.1", "gfx 0.0.1",
"layout_traits 0.0.1", "layout_traits 0.0.1",
"plugins 0.0.1",
"net 0.0.1", "net 0.0.1",
"plugins 0.0.1",
"script 0.0.1", "script 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"style 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", "util 0.0.1",
] ]
@ -320,10 +320,6 @@ name = "lazy_static"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360" source = "git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360"
[[package]]
name = "plugins"
version = "0.0.1"
[[package]] [[package]]
name = "mozjs-sys" name = "mozjs-sys"
version = "0.0.0" version = "0.0.0"
@ -338,7 +334,7 @@ dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "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)", "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)", "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", "util 0.0.1",
] ]
@ -347,10 +343,10 @@ name = "net"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "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)", "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)", "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", "util 0.0.1",
] ]
@ -379,6 +375,10 @@ name = "phf_mac"
version = "0.0.0" version = "0.0.0"
source = "git+https://github.com/sfackler/rust-phf#06254fdde7708630a6397c41c6c17ef81a4b66a0" source = "git+https://github.com/sfackler/rust-phf#06254fdde7708630a6397c41c6c17ef81a4b66a0"
[[package]]
name = "plugins"
version = "0.0.1"
[[package]] [[package]]
name = "png" name = "png"
version = "0.1.0" version = "0.1.0"
@ -397,21 +397,22 @@ name = "script"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"canvas 0.0.1", "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", "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)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"gfx 0.0.1", "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)", "hubbub 0.1.0 (git+https://github.com/servo/rust-hubbub#c7f868e688de6e9cbdc26aa09292ed072bc2648b)",
"js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)", "js 0.1.0 (git+https://github.com/servo/rust-mozjs#41fb0d80a5ed5614ca13a120cdb3281e599d4e04)",
"plugins 0.0.1",
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
"plugins 0.0.1",
"script_traits 0.0.1", "script_traits 0.0.1",
"style 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", "util 0.0.1",
"uuid 0.0.1 (git+https://github.com/rust-lang/uuid#c3041068f413a5e46d795d21a346072794593839)",
] ]
[[package]] [[package]]
@ -422,7 +423,7 @@ dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)",
"msg 0.0.1", "msg 0.0.1",
"net 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]] [[package]]
@ -440,7 +441,7 @@ dependencies = [
"msg 0.0.1", "msg 0.0.1",
"net 0.0.1", "net 0.0.1",
"script 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", "util 0.0.1",
] ]
@ -480,12 +481,12 @@ dependencies = [
name = "style" name = "style"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#fa619d4ffd6920dee6e7ea79f42d9cceb9015407)", "cssparser 0.1.0 (git+https://github.com/servo/rust-cssparser#22146ce095cb62df39d459c3a79d1486041f96f6)",
"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)", "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)", "lazy_static 0.1.0 (git+https://github.com/Kimundi/lazy-static.rs#e62a65372f1dd9019e37eb9381d819edff80e360)",
"plugins 0.0.1", "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", "util 0.0.1",
] ]
@ -496,9 +497,9 @@ version = "0.0.1"
[[package]] [[package]]
name = "url" name = "url"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/servo/rust-url#bfdf809365600a7941a77524f9bb065886de3379" source = "git+https://github.com/servo/rust-url#29f70a47230c2aa736e263977247c786e0b2c243"
dependencies = [ 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]] [[package]]
@ -509,9 +510,14 @@ dependencies = [
"geom 0.1.0 (git+https://github.com/servo/rust-geom#50a294fd997f0c6eb43e9a58ad6e227fdc2a4692)", "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)", "string_cache 0.0.0 (git+https://github.com/servo/string-cache#b348bd00cc8991e1f25749be077c5bd9cec019bb)",
"task_info 0.0.1", "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]] [[package]]
name = "xlib" name = "xlib"
version = "0.1.0" version = "0.1.0"

View file

@ -1 +1 @@
4d2af38611cdeeb804659b5e0695ad2c251db51a/rust-0.12.0-pre d2b30f7d3883a9f5d2e419d3d2c86cb66e9d3410/rust-0.12.0-pre

@ -1 +1 @@
Subproject commit 7ccfaca315a43d97914e1601c90ad348ef190edf Subproject commit 0baf7f662b8d78c8db9930b03832e16fede5d1ac

View file

@ -76,7 +76,7 @@ fn main() {
if extension.to_ascii_lower().as_slice() == "list" && file.is_file() { if extension.to_ascii_lower().as_slice() == "list" && file.is_file() {
let tests = parse_lists(&file, servo_args, render_mode, all_tests.len()); let tests = parse_lists(&file, servo_args, render_mode, all_tests.len());
println!("\t{} [{} tests]", file.display(), tests.len()); println!("\t{} [{} tests]", file.display(), tests.len());
all_tests.push_all_move(tests); all_tests.extend(tests.into_iter());
} }
} }
_ => {} _ => {}