Auto merge of #12828 - nox:serde, r=Ms2ger

Update serde to 0.8 (fixes #12659)

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12828)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-08-12 12:23:10 -05:00 committed by GitHub
commit 9abe9e450b
70 changed files with 919 additions and 778 deletions

View file

@ -12,13 +12,13 @@ path = "lib.rs"
[dependencies] [dependencies]
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
canvas_traits = {path = "../canvas_traits"} canvas_traits = {path = "../canvas_traits"}
euclid = "0.8.2" euclid = "0.9"
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
gleam = "0.2.8" gleam = "0.2.8"
ipc-channel = "0.4.0" ipc-channel = "0.5"
log = "0.3.5" log = "0.3.5"
num-traits = "0.1.32" num-traits = "0.1.32"
offscreen_gl_context = "0.2.0" offscreen_gl_context = "0.3"
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
util = {path = "../util"} util = {path = "../util"}

View file

@ -11,15 +11,15 @@ path = "lib.rs"
[dependencies] [dependencies]
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]} cssparser = {version = "0.5.7", features = ["heap_size", "serde-serialization"]}
euclid = "0.8.2" euclid = "0.9"
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
ipc-channel = "0.4.0" ipc-channel = "0.5"
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
serde = {version = "0.7.15", features = ["nightly"]} serde = {version = "0.8", features = ["unstable"]}
serde_macros = "0.7.15" serde_macros = "0.8"
[dependencies.webrender_traits] [dependencies.webrender_traits]
git = "https://github.com/servo/webrender_traits" git = "https://github.com/servo/webrender_traits"

View file

@ -10,13 +10,13 @@ name = "compositing"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
euclid = "0.8.2" euclid = "0.9"
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
gleam = "0.2.8" gleam = "0.2.8"
image = "0.10" image = "0.10"
ipc-channel = "0.4.0" ipc-channel = "0.5"
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]} layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
log = "0.3.5" log = "0.3.5"
msg = {path = "../msg"} msg = {path = "../msg"}
@ -24,11 +24,11 @@ net_traits = {path = "../net_traits"}
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"} profile_traits = {path = "../profile_traits"}
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
style_traits = {path = "../style_traits"} style_traits = {path = "../style_traits"}
time = "0.1.17" time = "0.1.17"
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"} util = {path = "../util"}
[dependencies.webrender] [dependencies.webrender]

View file

@ -15,24 +15,24 @@ canvas = {path = "../canvas"}
canvas_traits = {path = "../canvas_traits"} canvas_traits = {path = "../canvas_traits"}
compositing = {path = "../compositing"} compositing = {path = "../compositing"}
devtools_traits = {path = "../devtools_traits"} devtools_traits = {path = "../devtools_traits"}
euclid = "0.8.2" euclid = "0.9"
gfx = {path = "../gfx"} gfx = {path = "../gfx"}
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
ipc-channel = "0.4.0" ipc-channel = "0.5"
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]} layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
layout_traits = {path = "../layout_traits"} layout_traits = {path = "../layout_traits"}
log = "0.3.5" log = "0.3.5"
msg = {path = "../msg"} msg = {path = "../msg"}
net_traits = {path = "../net_traits"} net_traits = {path = "../net_traits"}
offscreen_gl_context = "0.2.0" offscreen_gl_context = "0.3"
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"} profile_traits = {path = "../profile_traits"}
rand = "0.3" rand = "0.3"
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
style_traits = {path = "../style_traits"} style_traits = {path = "../style_traits"}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"} util = {path = "../util"}
[dependencies.webrender_traits] [dependencies.webrender_traits]

View file

@ -11,13 +11,14 @@ path = "lib.rs"
[dependencies] [dependencies]
devtools_traits = {path = "../devtools_traits"} devtools_traits = {path = "../devtools_traits"}
hyper = { version = "0.9.9", features = [ "serde-serialization" ] } hyper = "0.9.9"
ipc-channel = "0.4.0" hyper_serde = "0.1.4"
ipc-channel = "0.5"
log = "0.3.5" log = "0.3.5"
msg = {path = "../msg"} msg = {path = "../msg"}
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
serde = "0.7.15" serde = "0.8"
serde_json = "0.7" serde_json = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
time = "0.1" time = "0.1"
util = {path = "../util"} util = {path = "../util"}

View file

@ -153,12 +153,12 @@ impl ActorRegistry {
msg: &BTreeMap<String, Value>, msg: &BTreeMap<String, Value>,
stream: &mut TcpStream) stream: &mut TcpStream)
-> Result<(), ()> { -> Result<(), ()> {
let to = msg.get("to").unwrap().as_string().unwrap(); let to = msg.get("to").unwrap().as_str().unwrap();
match self.actors.get(to) { match self.actors.get(to) {
None => debug!("message received for unknown actor \"{}\"", to), None => debug!("message received for unknown actor \"{}\"", to),
Some(actor) => { Some(actor) => {
let msg_type = msg.get("type").unwrap().as_string().unwrap(); let msg_type = msg.get("type").unwrap().as_str().unwrap();
if try!(actor.handle_message(self, msg_type, msg, stream)) if try!(actor.handle_message(self, msg_type, msg, stream))
!= ActorMessageStatus::Processed { != ActorMessageStatus::Processed {
debug!("unexpected message type \"{}\" found for actor \"{}\"", debug!("unexpected message type \"{}\" found for actor \"{}\"",

View file

@ -103,7 +103,7 @@ impl Actor for ConsoleActor {
Ok(match msg_type { Ok(match msg_type {
"getCachedMessages" => { "getCachedMessages" => {
let str_types = msg.get("messageTypes").unwrap().as_array().unwrap().into_iter().map(|json_type| { let str_types = msg.get("messageTypes").unwrap().as_array().unwrap().into_iter().map(|json_type| {
json_type.as_string().unwrap() json_type.as_str().unwrap()
}); });
let mut message_types = CachedConsoleMessageTypes::empty(); let mut message_types = CachedConsoleMessageTypes::empty();
for str_type in str_types { for str_type in str_types {
@ -154,7 +154,7 @@ impl Actor for ConsoleActor {
.as_array() .as_array()
.unwrap_or(&vec!()) .unwrap_or(&vec!())
.iter() .iter()
.map(|listener| listener.as_string().unwrap().to_owned()) .map(|listener| listener.as_str().unwrap().to_owned())
.collect(), .collect(),
}; };
stream.write_json_packet(&msg); stream.write_json_packet(&msg);
@ -174,7 +174,7 @@ impl Actor for ConsoleActor {
} }
"evaluateJS" => { "evaluateJS" => {
let input = msg.get("text").unwrap().as_string().unwrap().to_owned(); let input = msg.get("text").unwrap().as_str().unwrap().to_owned();
let (chan, port) = ipc::channel().unwrap(); let (chan, port) = ipc::channel().unwrap();
self.script_chan.send(DevtoolScriptControlMsg::EvaluateJS( self.script_chan.send(DevtoolScriptControlMsg::EvaluateJS(
self.pipeline, input.clone(), chan)).unwrap(); self.pipeline, input.clone(), chan)).unwrap();

View file

@ -106,7 +106,7 @@ impl Actor for NodeActor {
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> { stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type { Ok(match msg_type {
"modifyAttributes" => { "modifyAttributes" => {
let target = msg.get("to").unwrap().as_string().unwrap(); let target = msg.get("to").unwrap().as_str().unwrap();
let mods = msg.get("modifications").unwrap().as_array().unwrap(); let mods = msg.get("modifications").unwrap().as_array().unwrap();
let modifications = mods.iter().map(|json_mod| { let modifications = mods.iter().map(|json_mod| {
serde_json::from_str(&serde_json::to_string(json_mod).unwrap()).unwrap() serde_json::from_str(&serde_json::to_string(json_mod).unwrap()).unwrap()
@ -310,7 +310,7 @@ impl Actor for WalkerActor {
} }
"children" => { "children" => {
let target = msg.get("node").unwrap().as_string().unwrap(); let target = msg.get("node").unwrap().as_str().unwrap();
let (tx, rx) = ipc::channel().unwrap(); let (tx, rx) = ipc::channel().unwrap();
self.script_chan.send(GetChildren(self.pipeline, self.script_chan.send(GetChildren(self.pipeline,
registry.actor_to_script(target.to_owned()), registry.actor_to_script(target.to_owned()),
@ -478,7 +478,7 @@ impl Actor for PageStyleActor {
//TODO: query script for box layout properties of node (msg.node) //TODO: query script for box layout properties of node (msg.node)
"getLayout" => { "getLayout" => {
let target = msg.get("node").unwrap().as_string().unwrap(); let target = msg.get("node").unwrap().as_str().unwrap();
let (tx, rx) = ipc::channel().unwrap(); let (tx, rx) = ipc::channel().unwrap();
self.script_chan.send(GetLayout(self.pipeline, self.script_chan.send(GetLayout(self.pipeline,
registry.actor_to_script(target.to_owned()), registry.actor_to_script(target.to_owned()),
@ -493,7 +493,7 @@ impl Actor for PageStyleActor {
} = try!(rx.recv().unwrap().ok_or(())); } = try!(rx.recv().unwrap().ok_or(()));
let auto_margins = msg.get("autoMargins") let auto_margins = msg.get("autoMargins")
.and_then(&Value::as_boolean).unwrap_or(false); .and_then(&Value::as_bool).unwrap_or(false);
// http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js // http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js
let msg = GetLayoutReply { let msg = GetLayoutReply {

View file

@ -94,7 +94,7 @@ impl Actor for TabActor {
"reconfigure" => { "reconfigure" => {
if let Some(options) = msg.get("options").and_then(|o| o.as_object()) { if let Some(options) = msg.get("options").and_then(|o| o.as_object()) {
if let Some(val) = options.get("performReload") { if let Some(val) = options.get("performReload") {
if val.as_boolean().unwrap_or(false) { if val.as_bool().unwrap_or(false) {
let console_actor = registry.find::<ConsoleActor>(&self.console); let console_actor = registry.find::<ConsoleActor>(&self.console);
let _ = console_actor.script_chan.send( let _ = console_actor.script_chan.send(
DevtoolScriptControlMsg::Reload(console_actor.pipeline)); DevtoolScriptControlMsg::Reload(console_actor.pipeline));

View file

@ -191,14 +191,14 @@ impl Actor for TimelineActor {
// init memory actor // init memory actor
if let Some(with_memory) = msg.get("withMemory") { if let Some(with_memory) = msg.get("withMemory") {
if let Some(true) = with_memory.as_boolean() { if let Some(true) = with_memory.as_bool() {
*self.memory_actor.borrow_mut() = Some(MemoryActor::create(registry)); *self.memory_actor.borrow_mut() = Some(MemoryActor::create(registry));
} }
} }
// init framerate actor // init framerate actor
if let Some(with_ticks) = msg.get("withTicks") { if let Some(with_ticks) = msg.get("withTicks") {
if let Some(true) = with_ticks.as_boolean() { if let Some(true) = with_ticks.as_bool() {
let framerate_actor = Some(FramerateActor::create( let framerate_actor = Some(FramerateActor::create(
registry, registry,
self.pipeline.clone(), self.pipeline.clone(),

View file

@ -86,9 +86,6 @@ impl JsonPacketStream for TcpStream {
serde_json::Error::Syntax(_, l, c) => { serde_json::Error::Syntax(_, l, c) => {
return Err(format!("syntax at {}:{}", l, c)) return Err(format!("syntax at {}:{}", l, c))
}, },
serde_json::Error::FromUtf8(e) => {
return Err(e.description().to_owned())
},
}, },
}; };
}, },

View file

@ -13,10 +13,11 @@ path = "lib.rs"
bitflags = "0.7" bitflags = "0.7"
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
hyper = {version = "0.9.9", features = ["serde-serialization"]} hyper = "0.9.9"
ipc-channel = "0.4.0" hyper_serde = "0.1.4"
ipc-channel = "0.5"
msg = {path = "../msg"} msg = {path = "../msg"}
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
time = "0.1" time = "0.1"
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}

View file

@ -11,16 +11,16 @@ name = "gfx"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
bitflags = "0.7" bitflags = "0.7"
euclid = "0.8.2" euclid = "0.9"
fnv = "1.0" fnv = "1.0"
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
harfbuzz-sys = "0.1" harfbuzz-sys = "0.1"
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
ipc-channel = "0.4.0" ipc-channel = "0.5"
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]} layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
lazy_static = "0.2" lazy_static = "0.2"
libc = "0.2" libc = "0.2"
@ -34,15 +34,15 @@ profile_traits = {path = "../profile_traits"}
rand = "0.3" rand = "0.3"
range = {path = "../range"} range = {path = "../range"}
rustc-serialize = "0.3" rustc-serialize = "0.3"
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
smallvec = "0.1" smallvec = "0.1"
string_cache = {version = "0.2.20", features = ["heap_size"]} string_cache = {version = "0.2.23", features = ["heap_size"]}
style = {path = "../style"} style = {path = "../style"}
style_traits = {path = "../style_traits"} style_traits = {path = "../style_traits"}
time = "0.1.12" time = "0.1.12"
unicode-script = {version = "0.1", features = ["harfbuzz"]} unicode-script = {version = "0.1", features = ["harfbuzz"]}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"} util = {path = "../util"}
xi-unicode = "0.0.1" xi-unicode = "0.0.1"
@ -54,8 +54,8 @@ features = ["serde_macros"]
[target.'cfg(target_os = "macos")'.dependencies] [target.'cfg(target_os = "macos")'.dependencies]
byteorder = "0.5" byteorder = "0.5"
core-foundation = "0.2" core-foundation = "0.2"
core-graphics = "0.3" core-graphics = "0.4"
core-text = "1.1" core-text = "2.0"
[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))'.dependencies] [target.'cfg(any(target_os = "linux", target_os = "android", target_os = "windows"))'.dependencies]
freetype = {git = "https://github.com/servo/rust-freetype"} freetype = {git = "https://github.com/servo/rust-freetype"}

View file

@ -31,7 +31,6 @@ use net_traits::image::base::{Image, PixelFormat};
use paint_context::PaintContext; use paint_context::PaintContext;
use range::Range; use range::Range;
use serde::de::{self, Deserialize, Deserializer, MapVisitor, Visitor}; use serde::de::{self, Deserialize, Deserializer, MapVisitor, Visitor};
use serde::ser::impls::MapIteratorVisitor;
use serde::ser::{Serialize, Serializer}; use serde::ser::{Serialize, Serializer};
use std::cmp::{self, Ordering}; use std::cmp::{self, Ordering};
use std::collections::HashMap; use std::collections::HashMap;
@ -161,7 +160,12 @@ impl<K, V> DerefMut for FnvHashMap<K, V> {
impl<K, V> Serialize for FnvHashMap<K, V> where K: Eq + Hash + Serialize, V: Serialize { impl<K, V> Serialize for FnvHashMap<K, V> where K: Eq + Hash + Serialize, V: Serialize {
#[inline] #[inline]
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer { fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer {
serializer.serialize_map(MapIteratorVisitor::new(self.iter(), Some(self.len()))) let mut state = try!(serializer.serialize_map(Some(self.len())));
for (key, value) in self.iter() {
try!(serializer.serialize_map_key(&mut state, key));
try!(serializer.serialize_map_value(&mut state, value));
}
serializer.serialize_map_end(state)
} }
} }

View file

@ -229,7 +229,7 @@ impl FontCache {
Ok(ref metadata) => { Ok(ref metadata) => {
metadata.content_type.as_ref().map_or(false, |content_type| { metadata.content_type.as_ref().map_or(false, |content_type| {
let mime = &content_type.0; let mime = &content_type.0;
is_supported_font_type(&mime.0, &mime.1) is_supported_font_type(&(mime.0).0, &mime.1)
}) })
} }
Err(_) => false, Err(_) => false,

View file

@ -11,7 +11,7 @@ path = "lib.rs"
[dependencies] [dependencies]
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
euclid = "0.8.2" euclid = "0.9"
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]} layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
@ -20,5 +20,5 @@ plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"} profile_traits = {path = "../profile_traits"}
range = {path = "../range"} range = {path = "../range"}
rustc-serialize = "0.3" rustc-serialize = "0.3"
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"

View file

@ -10,18 +10,18 @@ name = "layout"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
bitflags = "0.7" bitflags = "0.7"
canvas_traits = {path = "../canvas_traits"} canvas_traits = {path = "../canvas_traits"}
cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]} cssparser = {version = "0.5.7", features = ["heap_size", "serde-serialization"]}
euclid = "0.8.2" euclid = "0.9"
fnv = "1.0" fnv = "1.0"
gfx = {path = "../gfx"} gfx = {path = "../gfx"}
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
ipc-channel = "0.4.0" ipc-channel = "0.5"
libc = "0.2" libc = "0.2"
log = "0.3.5" log = "0.3.5"
msg = {path = "../msg"} msg = {path = "../msg"}
@ -34,14 +34,14 @@ rustc-serialize = "0.3"
script_layout_interface = {path = "../script_layout_interface"} script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
selectors = {version = "0.8", features = ["heap_size"]} selectors = {version = "0.8", features = ["heap_size"]}
serde_macros = "0.7.15" serde_macros = "0.8"
smallvec = "0.1" smallvec = "0.1"
string_cache = {version = "0.2.20", features = ["heap_size"]} string_cache = {version = "0.2.23", features = ["heap_size"]}
style = {path = "../style"} style = {path = "../style"}
style_traits = {path = "../style_traits"} style_traits = {path = "../style_traits"}
unicode-bidi = "0.2" unicode-bidi = "0.2"
unicode-script = {version = "0.1", features = ["harfbuzz"]} unicode-script = {version = "0.1", features = ["harfbuzz"]}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"} util = {path = "../util"}
[dependencies.webrender_traits] [dependencies.webrender_traits]

View file

@ -10,15 +10,15 @@ name = "layout_thread"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]} azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
euclid = "0.8.2" euclid = "0.9"
fnv = "1.0" fnv = "1.0"
gfx = {path = "../gfx"} gfx = {path = "../gfx"}
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
ipc-channel = "0.4.0" ipc-channel = "0.5"
layout = {path = "../layout"} layout = {path = "../layout"}
layout_traits = {path = "../layout_traits"} layout_traits = {path = "../layout_traits"}
log = "0.3.5" log = "0.3.5"
@ -29,10 +29,10 @@ profile_traits = {path = "../profile_traits"}
script = {path = "../script"} script = {path = "../script"}
script_layout_interface = {path = "../script_layout_interface"} script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
serde_json = "0.7" serde_json = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
style = {path = "../style"} style = {path = "../style"}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"} util = {path = "../util"}
[dependencies.webrender_traits] [dependencies.webrender_traits]

View file

@ -16,8 +16,8 @@ msg = {path = "../msg"}
net_traits = {path = "../net_traits"} net_traits = {path = "../net_traits"}
profile_traits = {path = "../profile_traits"} profile_traits = {path = "../profile_traits"}
util = {path = "../util"} util = {path = "../util"}
ipc-channel = "0.4.0" ipc-channel = "0.5"
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
[dependencies.webrender_traits] [dependencies.webrender_traits]
git = "https://github.com/servo/webrender_traits" git = "https://github.com/servo/webrender_traits"

View file

@ -11,15 +11,16 @@ path = "lib.rs"
[dependencies] [dependencies]
bitflags = "0.7" bitflags = "0.7"
cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]} cssparser = {version = "0.5.7", features = ["heap_size", "serde-serialization"]}
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
hyper = {version = "0.9.9", features = ["serde-serialization"]} hyper = "0.9.9"
ipc-channel = "0.4.0" hyper_serde = "0.1.4"
ipc-channel = "0.5"
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
url = {version = "1.0.0", features = ["heap_size", "serde"]} url = {version = "1.2", features = ["heap_size", "serde"]}
[dependencies.webrender_traits] [dependencies.webrender_traits]
git = "https://github.com/servo/webrender_traits" git = "https://github.com/servo/webrender_traits"

View file

@ -191,7 +191,11 @@ pub struct Image {
#[derive(Clone, Deserialize, Serialize)] #[derive(Clone, Deserialize, Serialize)]
pub struct LoadData { pub struct LoadData {
pub url: Url, pub url: Url,
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub method: Method, pub method: Method,
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub headers: Headers, pub headers: Headers,
pub data: Option<Vec<u8>>, pub data: Option<Vec<u8>>,
pub referrer_policy: Option<ReferrerPolicy>, pub referrer_policy: Option<ReferrerPolicy>,

View file

@ -12,6 +12,7 @@
extern crate bitflags; extern crate bitflags;
extern crate heapsize; extern crate heapsize;
extern crate hyper; extern crate hyper;
extern crate hyper_serde;
extern crate ipc_channel; extern crate ipc_channel;
extern crate serde; extern crate serde;
extern crate url; extern crate url;

View file

@ -12,14 +12,15 @@ path = "lib.rs"
[dependencies] [dependencies]
bitflags = "0.7" bitflags = "0.7"
brotli = "1.0.6" brotli = "1.0.6"
content-blocker = "0.2" content-blocker = "0.2.1"
cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] } cookie = {version = "0.2.5", features = ["serialize-rustc"]}
device = {git = "https://github.com/servo/devices"} device = {git = "https://github.com/servo/devices"}
devtools_traits = {path = "../devtools_traits"} devtools_traits = {path = "../devtools_traits"}
flate2 = "0.2.0" flate2 = "0.2.0"
hyper = {version = "0.9.9", features = ["serde-serialization"]} hyper = "0.9.9"
hyper_serde = "0.1.4"
immeta = "0.3.1" immeta = "0.3.1"
ipc-channel = "0.4.0" ipc-channel = "0.5"
lazy_static = "0.2" lazy_static = "0.2"
log = "0.3.5" log = "0.3.5"
matches = "0.1" matches = "0.1"
@ -36,9 +37,9 @@ rustc-serialize = "0.3"
threadpool = "1.0" threadpool = "1.0"
time = "0.1.17" time = "0.1.17"
unicase = "1.4.0" unicase = "1.4.0"
url = {version = "1.0.0", features = ["heap_size", "rustc-serialize"]} url = {version = "1.2", features = ["heap_size", "rustc-serialize"]}
util = {path = "../util"} util = {path = "../util"}
uuid = {version = "0.2", features = ["v4"]} uuid = {version = "0.3", features = ["v4"]}
websocket = "0.17" websocket = "0.17"
[dependencies.webrender_traits] [dependencies.webrender_traits]

View file

@ -6,6 +6,7 @@ use file_loader;
use hyper::header::ContentType; use hyper::header::ContentType;
use hyper::http::RawStatus; use hyper::http::RawStatus;
use hyper::mime::{Mime, SubLevel, TopLevel}; use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper_serde::Serde;
use mime_classifier::MimeClassifier; use mime_classifier::MimeClassifier;
use net_traits::ProgressMsg::Done; use net_traits::ProgressMsg::Done;
use net_traits::response::HttpsState; use net_traits::response::HttpsState;
@ -33,10 +34,11 @@ pub fn factory(mut load_data: LoadData,
"blank" => { "blank" => {
let metadata = Metadata { let metadata = Metadata {
final_url: load_data.url, final_url: load_data.url,
content_type: Some(ContentType(Mime(TopLevel::Text, SubLevel::Html, vec![]))), content_type:
Some(Serde(ContentType(Mime(TopLevel::Text, SubLevel::Html, vec![])))),
charset: Some("utf-8".to_owned()), charset: Some("utf-8".to_owned()),
headers: None, headers: None,
status: Some(RawStatus(200, "OK".into())), status: Some(Serde(RawStatus(200, "OK".into()))),
https_state: HttpsState::None, https_state: HttpsState::None,
referrer: None, referrer: None,
}; };

View file

@ -6,6 +6,7 @@ use filemanager_thread::{FileManager, UIProvider};
use hyper::header::{DispositionType, ContentDisposition, DispositionParam}; use hyper::header::{DispositionType, ContentDisposition, DispositionParam};
use hyper::header::{Headers, ContentType, ContentLength, Charset}; use hyper::header::{Headers, ContentType, ContentLength, Charset};
use hyper::http::RawStatus; use hyper::http::RawStatus;
use hyper_serde::Serde;
use ipc_channel::ipc; use ipc_channel::ipc;
use mime::{Mime, Attr}; use mime::{Mime, Attr};
use mime_classifier::MimeClassifier; use mime_classifier::MimeClassifier;
@ -68,11 +69,11 @@ fn load_blob<UI: 'static + UIProvider>
let metadata = Metadata { let metadata = Metadata {
final_url: load_data.url.clone(), final_url: load_data.url.clone(),
content_type: Some(ContentType(content_type.clone())), content_type: Some(Serde(ContentType(content_type.clone()))),
charset: charset.map(|c| c.as_str().to_string()), charset: charset.map(|c| c.as_str().to_string()),
headers: Some(headers), headers: Some(Serde(headers)),
// https://w3c.github.io/FileAPI/#TwoHundredOK // https://w3c.github.io/FileAPI/#TwoHundredOK
status: Some(RawStatus(200, "OK".into())), status: Some(Serde(RawStatus(200, "OK".into()))),
https_state: HttpsState::None, https_state: HttpsState::None,
referrer: None, referrer: None,
}; };

View file

@ -19,6 +19,7 @@ use hyper::header::{IfNoneMatch, Pragma, Location, QualityItem, Referer as Refer
use hyper::method::Method; use hyper::method::Method;
use hyper::mime::{Mime, SubLevel, TopLevel}; use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper::status::StatusCode; use hyper::status::StatusCode;
use hyper_serde::Serde;
use mime_guess::guess_mime_type; use mime_guess::guess_mime_type;
use msg::constellation_msg::ReferrerPolicy; use msg::constellation_msg::ReferrerPolicy;
use net_traits::FetchTaskTarget; use net_traits::FetchTaskTarget;
@ -996,7 +997,8 @@ fn http_network_fetch(request: Rc<Request>,
if let Some(pipeline_id) = pipeline_id { if let Some(pipeline_id) = pipeline_id {
send_response_to_devtools( send_response_to_devtools(
&sender, request_id.into(), &sender, request_id.into(),
meta_headers, meta_status, meta_headers.map(Serde::into_inner),
meta_status.map(Serde::into_inner),
pipeline_id); pipeline_id);
} }
} }

View file

@ -24,6 +24,7 @@ use hyper::method::Method;
use hyper::mime::{Mime, SubLevel, TopLevel}; use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper::net::Fresh; use hyper::net::Fresh;
use hyper::status::{StatusClass, StatusCode}; use hyper::status::{StatusClass, StatusCode};
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
use log; use log;
use mime_classifier::MimeClassifier; use mime_classifier::MimeClassifier;
@ -1076,8 +1077,8 @@ pub fn load<A, B>(load_data: &LoadData,
Some(&ContentType(ref mime)) => Some(mime), Some(&ContentType(ref mime)) => Some(mime),
None => None None => None
}); });
metadata.headers = Some(adjusted_headers); metadata.headers = Some(Serde(adjusted_headers));
metadata.status = Some(response.status_raw().clone()); metadata.status = Some(Serde(response.status_raw().clone()));
metadata.https_state = if doc_url.scheme() == "https" { metadata.https_state = if doc_url.scheme() == "https" {
HttpsState::Modern HttpsState::Modern
} else { } else {
@ -1092,7 +1093,8 @@ pub fn load<A, B>(load_data: &LoadData,
if let Some(ref chan) = devtools_chan { if let Some(ref chan) = devtools_chan {
send_response_to_devtools( send_response_to_devtools(
&chan, request_id, &chan, request_id,
metadata.headers.clone(), metadata.status.clone(), metadata.headers.clone().map(Serde::into_inner),
metadata.status.clone().map(Serde::into_inner),
pipeline_id); pipeline_id);
} }
} }

View file

@ -21,6 +21,7 @@ extern crate device;
extern crate devtools_traits; extern crate devtools_traits;
extern crate flate2; extern crate flate2;
extern crate hyper; extern crate hyper;
extern crate hyper_serde;
extern crate immeta; extern crate immeta;
extern crate ipc_channel; extern crate ipc_channel;
#[macro_use] extern crate lazy_static; #[macro_use] extern crate lazy_static;

View file

@ -21,6 +21,7 @@ use http_loader::{self, HttpState};
use hyper::client::pool::Pool; use hyper::client::pool::Pool;
use hyper::header::{ContentType, Header, SetCookie}; use hyper::header::{ContentType, Header, SetCookie};
use hyper::mime::{Mime, SubLevel, TopLevel}; use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender, IpcReceiverSet}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender, IpcReceiverSet};
use mime_classifier::{ApacheBugFlag, MimeClassifier, NoSniffFlag}; use mime_classifier::{ApacheBugFlag, MimeClassifier, NoSniffFlag};
use net_traits::LoadContext; use net_traits::LoadContext;
@ -115,7 +116,7 @@ pub fn start_sending_sniffed_opt(start_chan: LoadConsumer, mut metadata: Metadat
} }
let supplied_type = let supplied_type =
metadata.content_type.as_ref().map(|&ContentType(Mime(ref toplevel, ref sublevel, _))| { metadata.content_type.as_ref().map(|&Serde(ContentType(Mime(ref toplevel, ref sublevel, _)))| {
(format!("{}", toplevel), format!("{}", sublevel)) (format!("{}", toplevel), format!("{}", sublevel))
}); });
let (toplevel, sublevel) = classifier.classify(context, let (toplevel, sublevel) = classifier.classify(context,
@ -125,7 +126,8 @@ pub fn start_sending_sniffed_opt(start_chan: LoadConsumer, mut metadata: Metadat
&partial_body); &partial_body);
let mime_tp: TopLevel = toplevel.parse().unwrap(); let mime_tp: TopLevel = toplevel.parse().unwrap();
let mime_sb: SubLevel = sublevel.parse().unwrap(); let mime_sb: SubLevel = sublevel.parse().unwrap();
metadata.content_type = Some(ContentType(Mime(mime_tp, mime_sb, vec![]))); metadata.content_type =
Some(Serde(ContentType(Mime(mime_tp, mime_sb, vec![]))));
} }
start_sending_opt(start_chan, metadata, None) start_sending_opt(start_chan, metadata, None)
@ -291,7 +293,7 @@ impl ResourceChannelManager {
} }
CoreResourceMsg::GetCookiesDataForUrl(url, consumer, source) => { CoreResourceMsg::GetCookiesDataForUrl(url, consumer, source) => {
let mut cookie_jar = group.cookie_jar.write().unwrap(); let mut cookie_jar = group.cookie_jar.write().unwrap();
let cookies = cookie_jar.cookies_data_for_url(&url, source).collect(); let cookies = cookie_jar.cookies_data_for_url(&url, source).map(Serde).collect();
consumer.send(cookies).unwrap(); consumer.send(cookies).unwrap();
} }
CoreResourceMsg::Cancel(res_id) => { CoreResourceMsg::Cancel(res_id) => {

View file

@ -12,17 +12,18 @@ path = "lib.rs"
[dependencies] [dependencies]
util = {path = "../util"} util = {path = "../util"}
msg = {path = "../msg"} msg = {path = "../msg"}
ipc-channel = "0.4.0" ipc-channel = "0.5"
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
hyper = { version = "0.9.9", features = [ "serde-serialization" ] } hyper = "0.9.9"
hyper_serde = "0.1.4"
image = "0.10" image = "0.10"
lazy_static = "0.2" lazy_static = "0.2"
log = "0.3.5" log = "0.3.5"
num-traits = "0.1.32" num-traits = "0.1.32"
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
websocket = "0.17" websocket = "0.17"
uuid = { version = "0.2.2", features = ["v4", "serde"] } uuid = { version = "0.3", features = ["v4", "serde"] }
cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] } cookie = {version = "0.2.5", features = ["serialize-rustc"]}

View file

@ -15,6 +15,7 @@
extern crate cookie as cookie_rs; extern crate cookie as cookie_rs;
extern crate heapsize; extern crate heapsize;
extern crate hyper; extern crate hyper;
extern crate hyper_serde;
extern crate image as piston_image; extern crate image as piston_image;
extern crate ipc_channel; extern crate ipc_channel;
#[allow(unused_extern_crates)] #[allow(unused_extern_crates)]
@ -37,6 +38,7 @@ use hyper::header::{ContentType, Headers};
use hyper::http::RawStatus; use hyper::http::RawStatus;
use hyper::method::Method; use hyper::method::Method;
use hyper::mime::{Attr, Mime}; use hyper::mime::{Attr, Mime};
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender}; use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use msg::constellation_msg::{PipelineId, ReferrerPolicy}; use msg::constellation_msg::{PipelineId, ReferrerPolicy};
use request::{Request, RequestInit}; use request::{Request, RequestInit};
@ -85,8 +87,12 @@ pub enum LoadContext {
#[derive(Clone, Debug, Deserialize, Serialize, HeapSizeOf)] #[derive(Clone, Debug, Deserialize, Serialize, HeapSizeOf)]
pub struct CustomResponse { pub struct CustomResponse {
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub headers: Headers, pub headers: Headers,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub raw_status: RawStatus, pub raw_status: RawStatus,
pub body: Vec<u8> pub body: Vec<u8>
} }
@ -107,11 +113,17 @@ pub struct CustomResponseMediator {
pub struct LoadData { pub struct LoadData {
pub url: Url, pub url: Url,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub method: Method, pub method: Method,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
/// Headers that will apply to the initial request only /// Headers that will apply to the initial request only
pub headers: Headers, pub headers: Headers,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
/// Headers that will apply to the initial request and any redirects /// Headers that will apply to the initial request and any redirects
/// Unused in fetch /// Unused in fetch
pub preserved_headers: Headers, pub preserved_headers: Headers,
@ -378,7 +390,12 @@ pub enum WebSocketDomAction {
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub enum WebSocketNetworkEvent { pub enum WebSocketNetworkEvent {
ConnectionEstablished(header::Headers, Vec<String>), ConnectionEstablished(
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
header::Headers,
Vec<String>
),
MessageReceived(MessageData), MessageReceived(MessageData),
Close(Option<u16>, String), Close(Option<u16>, String),
Fail, Fail,
@ -407,11 +424,17 @@ pub enum CoreResourceMsg {
/// Store a set of cookies for a given originating URL /// Store a set of cookies for a given originating URL
SetCookiesForUrl(Url, String, CookieSource), SetCookiesForUrl(Url, String, CookieSource),
/// Store a set of cookies for a given originating URL /// Store a set of cookies for a given originating URL
SetCookiesForUrlWithData(Url, Cookie, CookieSource), SetCookiesForUrlWithData(
Url,
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
Cookie,
CookieSource
),
/// Retrieve the stored cookies for a given URL /// Retrieve the stored cookies for a given URL
GetCookiesForUrl(Url, IpcSender<Option<String>>, CookieSource), GetCookiesForUrl(Url, IpcSender<Option<String>>, CookieSource),
/// Get a cookie by name for a given originating URL /// Get a cookie by name for a given originating URL
GetCookiesDataForUrl(Url, IpcSender<Vec<Cookie>>, CookieSource), GetCookiesDataForUrl(Url, IpcSender<Vec<Serde<Cookie>>>, CookieSource),
/// Cancel a network request corresponding to a given `ResourceId` /// Cancel a network request corresponding to a given `ResourceId`
Cancel(ResourceId), Cancel(ResourceId),
/// Synchronization message solely for knowing the state of the ResourceChannelManager loop /// Synchronization message solely for knowing the state of the ResourceChannelManager loop
@ -528,18 +551,18 @@ pub struct Metadata {
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
/// MIME type / subtype. /// MIME type / subtype.
pub content_type: Option<(ContentType)>, pub content_type: Option<Serde<ContentType>>,
/// Character set. /// Character set.
pub charset: Option<String>, pub charset: Option<String>,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
/// Headers /// Headers
pub headers: Option<Headers>, pub headers: Option<Serde<Headers>>,
#[ignore_heap_size_of = "Defined in hyper"] #[ignore_heap_size_of = "Defined in hyper"]
/// HTTP Status /// HTTP Status
pub status: Option<RawStatus>, pub status: Option<Serde<RawStatus>>,
/// Is successful HTTPS connection /// Is successful HTTPS connection
pub https_state: HttpsState, pub https_state: HttpsState,
@ -557,7 +580,7 @@ impl Metadata {
charset: None, charset: None,
headers: None, headers: None,
// https://fetch.spec.whatwg.org/#concept-response-status-message // https://fetch.spec.whatwg.org/#concept-response-status-message
status: Some(RawStatus(200, "OK".into())), status: Some(Serde(RawStatus(200, "OK".into()))),
https_state: HttpsState::None, https_state: HttpsState::None,
referrer: None, referrer: None,
} }
@ -566,7 +589,7 @@ impl Metadata {
/// Extract the parts of a Mime that we care about. /// Extract the parts of a Mime that we care about.
pub fn set_content_type(&mut self, content_type: Option<&Mime>) { pub fn set_content_type(&mut self, content_type: Option<&Mime>) {
match self.headers { match self.headers {
None => self.headers = Some(Headers::new()), None => self.headers = Some(Serde(Headers::new())),
Some(_) => (), Some(_) => (),
} }
@ -577,7 +600,7 @@ impl Metadata {
headers.set(ContentType(mime.clone())); headers.set(ContentType(mime.clone()));
} }
self.content_type = Some(ContentType(mime.clone())); self.content_type = Some(Serde(ContentType(mime.clone())));
let &Mime(_, _, ref parameters) = mime; let &Mime(_, _, ref parameters) = mime;
for &(ref k, ref v) in parameters { for &(ref k, ref v) in parameters {
if &Attr::Charset == k { if &Attr::Charset == k {

View file

@ -111,8 +111,12 @@ pub enum CORSSettings {
#[derive(Serialize, Deserialize, Clone)] #[derive(Serialize, Deserialize, Clone)]
pub struct RequestInit { pub struct RequestInit {
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub method: Method, pub method: Method,
pub url: Url, pub url: Url,
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub headers: Headers, pub headers: Headers,
pub unsafe_request: bool, pub unsafe_request: bool,
pub same_origin_data: bool, pub same_origin_data: bool,

View file

@ -7,6 +7,7 @@
use hyper::header::{AccessControlExposeHeaders, ContentType, Headers}; use hyper::header::{AccessControlExposeHeaders, ContentType, Headers};
use hyper::http::RawStatus; use hyper::http::RawStatus;
use hyper::status::StatusCode; use hyper::status::StatusCode;
use hyper_serde::Serde;
use std::ascii::AsciiExt; use std::ascii::AsciiExt;
use std::cell::{Cell, RefCell}; use std::cell::{Cell, RefCell};
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
@ -237,8 +238,8 @@ impl Response {
Some(&ContentType(ref mime)) => Some(mime), Some(&ContentType(ref mime)) => Some(mime),
None => None None => None
}); });
metadata.headers = Some(self.headers.clone()); metadata.headers = Some(Serde(self.headers.clone()));
metadata.status = self.raw_status.clone(); metadata.status = self.raw_status.clone().map(Serde);
metadata.https_state = self.https_state; metadata.https_state = self.https_state;
return Ok(metadata); return Ok(metadata);
} }

View file

@ -13,12 +13,12 @@ path = "lib.rs"
profile_traits = {path = "../profile_traits"} profile_traits = {path = "../profile_traits"}
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
util = {path = "../util", features = ["servo"]} util = {path = "../util", features = ["servo"]}
ipc-channel = "0.4.0" ipc-channel = "0.5"
heartbeats-simple = "0.3" heartbeats-simple = "0.3"
log = "0.3.5" log = "0.3.5"
serde = "0.7.15" serde = "0.8"
serde_json = "0.7" serde_json = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
time = "0.1.12" time = "0.1.12"
[target.'cfg(target_os = "macos")'.dependencies] [target.'cfg(target_os = "macos")'.dependencies]

View file

@ -13,10 +13,10 @@ path = "lib.rs"
energy-profiling = ["energymon", "energy-monitor"] energy-profiling = ["energymon", "energy-monitor"]
[dependencies] [dependencies]
ipc-channel = "0.4.0" ipc-channel = "0.5"
energymon = {git = "https://github.com/energymon/energymon-rust.git", optional = true} energymon = {git = "https://github.com/energymon/energymon-rust.git", optional = true}
energy-monitor = {version = "0.2.0", optional = true} energy-monitor = {version = "0.2.0", optional = true}
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
time = "0.1.12" time = "0.1.12"

View file

@ -15,5 +15,5 @@ heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
num-traits = "0.1.32" num-traits = "0.1.32"
rustc-serialize = "0.3" rustc-serialize = "0.3"
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"

View file

@ -22,23 +22,24 @@ video-metadata = {git = "https://github.com/GuillaumeGomez/video-metadata-rs"}
[dependencies] [dependencies]
angle = {git = "https://github.com/servo/angle", branch = "servo"} angle = {git = "https://github.com/servo/angle", branch = "servo"}
app_units = "0.2.5" app_units = "0.3"
bitflags = "0.7" bitflags = "0.7"
canvas_traits = {path = "../canvas_traits"} canvas_traits = {path = "../canvas_traits"}
caseless = "0.1.0" caseless = "0.1.0"
cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] } cookie = {version = "0.2.5", features = ["serialize-rustc"]}
cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]} cssparser = {version = "0.5.7", features = ["heap_size", "serde-serialization"]}
devtools_traits = {path = "../devtools_traits"} devtools_traits = {path = "../devtools_traits"}
encoding = "0.2" encoding = "0.2"
euclid = "0.8.2" euclid = "0.9"
fnv = "1.0" fnv = "1.0"
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.6" heapsize = "0.3.6"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
html5ever = {version = "0.5.1", features = ["heap_size", "unstable"]} html5ever = {version = "0.5.1", features = ["heap_size", "unstable"]}
hyper = {version = "0.9.9", features = ["serde-serialization"]} hyper = "0.9.9"
hyper_serde = "0.1.4"
image = "0.10" image = "0.10"
ipc-channel = "0.4.0" ipc-channel = "0.5"
js = {git = "https://github.com/servo/rust-mozjs"} js = {git = "https://github.com/servo/rust-mozjs"}
libc = "0.2" libc = "0.2"
log = "0.3.5" log = "0.3.5"
@ -47,7 +48,7 @@ mime_guess = "1.8.0"
msg = {path = "../msg"} msg = {path = "../msg"}
net_traits = {path = "../net_traits"} net_traits = {path = "../net_traits"}
num-traits = "0.1.32" num-traits = "0.1.32"
offscreen_gl_context = "0.2.0" offscreen_gl_context = "0.3"
open = "1.1.1" open = "1.1.1"
phf = "0.7.16" phf = "0.7.16"
phf_macros = "0.7.16" phf_macros = "0.7.16"
@ -62,14 +63,14 @@ rustc-serialize = "0.3"
script_layout_interface = {path = "../script_layout_interface"} script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
selectors = {version = "0.8", features = ["heap_size"]} selectors = {version = "0.8", features = ["heap_size"]}
serde = "0.7.15" serde = "0.8"
smallvec = "0.1" smallvec = "0.1"
string_cache = {version = "0.2.20", features = ["heap_size", "unstable"]} string_cache = {version = "0.2.23", features = ["heap_size", "unstable"]}
style = {path = "../style"} style = {path = "../style"}
time = "0.1.12" time = "0.1.12"
url = {version = "1.0.0", features = ["heap_size", "query_encoding"]} url = {version = "1.2", features = ["heap_size", "query_encoding"]}
util = {path = "../util"} util = {path = "../util"}
uuid = {version = "0.2", features = ["v4"]} uuid = {version = "0.3", features = ["v4"]}
websocket = "0.17" websocket = "0.17"
xml5ever = {version = "0.1.2", features = ["unstable"]} xml5ever = {version = "0.1.2", features = ["unstable"]}

View file

@ -24,6 +24,7 @@ use encoding::all::UTF_8;
use hyper::header::ContentType; use hyper::header::ContentType;
use hyper::http::RawStatus; use hyper::http::RawStatus;
use hyper::mime::{Mime, TopLevel, SubLevel}; use hyper::mime::{Mime, TopLevel, SubLevel};
use hyper_serde::Serde;
use ipc_channel::ipc; use ipc_channel::ipc;
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
use net_traits::{AsyncResponseListener, AsyncResponseTarget, Metadata, NetworkError}; use net_traits::{AsyncResponseListener, AsyncResponseTarget, Metadata, NetworkError};
@ -282,7 +283,7 @@ impl AsyncResponseListener for StylesheetContext {
fn headers_available(&mut self, metadata: Result<Metadata, NetworkError>) { fn headers_available(&mut self, metadata: Result<Metadata, NetworkError>) {
self.metadata = metadata.ok(); self.metadata = metadata.ok();
if let Some(ref meta) = self.metadata { if let Some(ref meta) = self.metadata {
if let Some(ContentType(Mime(TopLevel::Text, SubLevel::Css, _))) = meta.content_type { if let Some(Serde(ContentType(Mime(TopLevel::Text, SubLevel::Css, _)))) = meta.content_type {
} else { } else {
self.elem.root().upcast::<EventTarget>().fire_simple_event("error"); self.elem.root().upcast::<EventTarget>().fire_simple_event("error");
} }
@ -304,7 +305,7 @@ impl AsyncResponseListener for StylesheetContext {
Some(meta) => meta, Some(meta) => meta,
None => return, None => return,
}; };
let is_css = metadata.content_type.map_or(false, |ContentType(Mime(top, sub, _))| let is_css = metadata.content_type.map_or(false, |Serde(ContentType(Mime(top, sub, _)))|
top == TopLevel::Text && sub == SubLevel::Css); top == TopLevel::Text && sub == SubLevel::Css);
let data = if is_css { mem::replace(&mut self.data, vec!()) } else { vec!() }; let data = if is_css { mem::replace(&mut self.data, vec!()) } else { vec!() };
@ -334,7 +335,7 @@ impl AsyncResponseListener for StylesheetContext {
document.invalidate_stylesheets(); document.invalidate_stylesheets();
// FIXME: Revisit once consensus is reached at: https://github.com/whatwg/html/issues/1142 // FIXME: Revisit once consensus is reached at: https://github.com/whatwg/html/issues/1142
successful = metadata.status.map_or(false, |RawStatus(code, _)| code == 200); successful = metadata.status.map_or(false, |Serde(RawStatus(code, _))| code == 200);
} }
if elem.parser_inserted.get() { if elem.parser_inserted.get() {

View file

@ -24,6 +24,7 @@ use dom::htmlsourceelement::HTMLSourceElement;
use dom::mediaerror::MediaError; use dom::mediaerror::MediaError;
use dom::node::{window_from_node, document_from_node, Node, UnbindContext}; use dom::node::{window_from_node, document_from_node, Node, UnbindContext};
use dom::virtualmethods::VirtualMethods; use dom::virtualmethods::VirtualMethods;
use hyper_serde::Serde;
use ipc_channel::ipc; use ipc_channel::ipc;
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
use net_traits::{AsyncResponseListener, AsyncResponseTarget, Metadata, NetworkError}; use net_traits::{AsyncResponseListener, AsyncResponseTarget, Metadata, NetworkError};
@ -67,7 +68,7 @@ impl AsyncResponseListener for HTMLMediaElementContext {
.as_ref() .as_ref()
.and_then(|m| m.status .and_then(|m| m.status
.as_ref() .as_ref()
.map(|s| s.0 < 200 || s.0 >= 300)) .map(|&Serde(ref s)| s.0 < 200 || s.0 >= 300))
.unwrap_or(false); .unwrap_or(false);
if is_failure { if is_failure {
// Ensure that the element doesn't receive any further notifications // Ensure that the element doesn't receive any further notifications

View file

@ -27,6 +27,7 @@ use encoding::label::encoding_from_whatwg_label;
use encoding::types::{DecoderTrap, EncodingRef}; use encoding::types::{DecoderTrap, EncodingRef};
use html5ever::tree_builder::NextParserState; use html5ever::tree_builder::NextParserState;
use hyper::http::RawStatus; use hyper::http::RawStatus;
use hyper_serde::Serde;
use ipc_channel::ipc; use ipc_channel::ipc;
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
use js::jsval::UndefinedValue; use js::jsval::UndefinedValue;
@ -158,7 +159,7 @@ impl AsyncResponseListener for ScriptContext {
let status_code = self.metadata.as_ref().and_then(|m| { let status_code = self.metadata.as_ref().and_then(|m| {
match m.status { match m.status {
Some(RawStatus(c, _)) => Some(c), Some(Serde(RawStatus(c, _))) => Some(c),
_ => None, _ => None,
} }
}).unwrap_or(0); }).unwrap_or(0);

View file

@ -28,6 +28,7 @@ use html5ever::tree_builder;
use html5ever::tree_builder::{TreeBuilder, TreeBuilderOpts}; use html5ever::tree_builder::{TreeBuilder, TreeBuilderOpts};
use hyper::header::ContentType; use hyper::header::ContentType;
use hyper::mime::{Mime, SubLevel, TopLevel}; use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper_serde::Serde;
use js::jsapi::JSTracer; use js::jsapi::JSTracer;
use msg::constellation_msg::{PipelineId, SubpageId}; use msg::constellation_msg::{PipelineId, SubpageId};
use net_traits::{AsyncResponseListener, Metadata, NetworkError}; use net_traits::{AsyncResponseListener, Metadata, NetworkError};
@ -98,7 +99,8 @@ impl AsyncResponseListener for ParserContext {
}, },
Err(_) => None, Err(_) => None,
}; };
let content_type = metadata.clone().and_then(|meta| meta.content_type); let content_type =
metadata.clone().and_then(|meta| meta.content_type).map(Serde::into_inner);
let parser = match ScriptThread::page_headers_available(&self.id, let parser = match ScriptThread::page_headers_available(&self.id,
self.subpage.as_ref(), self.subpage.as_ref(),
metadata) { metadata) {

View file

@ -39,6 +39,7 @@ use hyper::header::{ContentLength, ContentType};
use hyper::http::RawStatus; use hyper::http::RawStatus;
use hyper::method::Method; use hyper::method::Method;
use hyper::mime::{self, Mime, Attr as MimeAttr, Value as MimeValue}; use hyper::mime::{self, Mime, Attr as MimeAttr, Value as MimeValue};
use hyper_serde::Serde;
use ipc_channel::ipc; use ipc_channel::ipc;
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
use js::jsapi::JS_ClearPendingException; use js::jsapi::JS_ClearPendingException;
@ -875,7 +876,10 @@ impl XMLHttpRequest {
*self.response_url.borrow_mut() = metadata.final_url[..Position::AfterQuery].to_owned(); *self.response_url.borrow_mut() = metadata.final_url[..Position::AfterQuery].to_owned();
// XXXManishearth Clear cache entries in case of a network error // XXXManishearth Clear cache entries in case of a network error
self.process_partial_response(XHRProgress::HeadersReceived(gen_id, metadata.headers, metadata.status)); self.process_partial_response(XHRProgress::HeadersReceived(
gen_id,
metadata.headers.map(Serde::into_inner),
metadata.status.map(Serde::into_inner)));
Ok(()) Ok(())
} }

View file

@ -48,6 +48,7 @@ extern crate gfx_traits;
extern crate heapsize; extern crate heapsize;
extern crate html5ever; extern crate html5ever;
extern crate hyper; extern crate hyper;
extern crate hyper_serde;
extern crate image; extern crate image;
extern crate ipc_channel; extern crate ipc_channel;
#[macro_use] #[macro_use]

View file

@ -55,6 +55,7 @@ use hyper::header::{ContentType, Headers, HttpDate, LastModified};
use hyper::header::{ReferrerPolicy as ReferrerPolicyHeader}; use hyper::header::{ReferrerPolicy as ReferrerPolicyHeader};
use hyper::method::Method; use hyper::method::Method;
use hyper::mime::{Mime, SubLevel, TopLevel}; use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
use js::glue::GetWindowProxyClass; use js::glue::GetWindowProxyClass;
@ -1695,7 +1696,7 @@ impl ScriptThread {
headers.get().map(|&LastModified(HttpDate(ref tm))| dom_last_modified(tm)) headers.get().map(|&LastModified(HttpDate(ref tm))| dom_last_modified(tm))
}); });
let content_type = metadata.content_type.as_ref().and_then(|&ContentType(ref mimetype)| { let content_type = metadata.content_type.as_ref().and_then(|&Serde(ContentType(ref mimetype))| {
match *mimetype { match *mimetype {
Mime(TopLevel::Application, SubLevel::Xml, _) | Mime(TopLevel::Application, SubLevel::Xml, _) |
Mime(TopLevel::Application, SubLevel::Ext(_), _) | Mime(TopLevel::Application, SubLevel::Ext(_), _) |
@ -1710,8 +1711,8 @@ impl ScriptThread {
Some(incomplete.url.clone())); Some(incomplete.url.clone()));
let is_html_document = match metadata.content_type { let is_html_document = match metadata.content_type {
Some(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _))) | Some(Serde(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _)))) |
Some(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _))) => Some(Serde(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _)))) =>
IsHTMLDocument::NonHTMLDocument, IsHTMLDocument::NonHTMLDocument,
_ => IsHTMLDocument::HTMLDocument, _ => IsHTMLDocument::HTMLDocument,
}; };
@ -1797,11 +1798,11 @@ impl ScriptThread {
document.set_https_state(metadata.https_state); document.set_https_state(metadata.https_state);
let is_xml = match metadata.content_type { let is_xml = match metadata.content_type {
Some(ContentType(Mime(TopLevel::Application, SubLevel::Ext(ref sub_level), _))) Some(Serde(ContentType(Mime(TopLevel::Application, SubLevel::Ext(ref sub_level), _))))
if sub_level.ends_with("+xml") => true, if sub_level.ends_with("+xml") => true,
Some(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _))) | Some(Serde(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _)))) |
Some(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _))) => true, Some(Serde(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _)))) => true,
_ => false, _ => false,
}; };

View file

@ -27,6 +27,7 @@ use dom::window::ScriptHelpers;
use euclid::point::Point2D; use euclid::point::Point2D;
use euclid::rect::Rect; use euclid::rect::Rect;
use euclid::size::Size2D; use euclid::size::Size2D;
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcSender}; use ipc_channel::ipc::{self, IpcSender};
use js::jsapi::{JSContext, HandleValue}; use js::jsapi::{JSContext, HandleValue};
use js::jsval::UndefinedValue; use js::jsval::UndefinedValue;
@ -194,7 +195,7 @@ pub fn handle_get_active_element(context: &BrowsingContext,
pub fn handle_get_cookies(context: &BrowsingContext, pub fn handle_get_cookies(context: &BrowsingContext,
_pipeline: PipelineId, _pipeline: PipelineId,
reply: IpcSender<Vec<Cookie>>) { reply: IpcSender<Vec<Serde<Cookie>>>) {
let document = context.active_document(); let document = context.active_document();
let url = document.url(); let url = document.url();
let (sender, receiver) = ipc::channel().unwrap(); let (sender, receiver) = ipc::channel().unwrap();
@ -209,7 +210,7 @@ pub fn handle_get_cookies(context: &BrowsingContext,
pub fn handle_get_cookie(context: &BrowsingContext, pub fn handle_get_cookie(context: &BrowsingContext,
_pipeline: PipelineId, _pipeline: PipelineId,
name: String, name: String,
reply: IpcSender<Vec<Cookie>>) { reply: IpcSender<Vec<Serde<Cookie>>>) {
let document = context.active_document(); let document = context.active_document();
let url = document.url(); let url = document.url();
let (sender, receiver) = ipc::channel().unwrap(); let (sender, receiver) = ipc::channel().unwrap();

View file

@ -10,15 +10,15 @@ name = "script_layout_interface"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
bitflags = "0.7" bitflags = "0.7"
canvas_traits = {path = "../canvas_traits"} canvas_traits = {path = "../canvas_traits"}
cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]} cssparser = {version = "0.5.7", features = ["heap_size", "serde-serialization"]}
euclid = "0.8.2" euclid = "0.9"
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
ipc-channel = "0.4.0" ipc-channel = "0.5"
libc = "0.2" libc = "0.2"
log = "0.3.5" log = "0.3.5"
msg = {path = "../msg"} msg = {path = "../msg"}
@ -28,7 +28,7 @@ profile_traits = {path = "../profile_traits"}
range = {path = "../range"} range = {path = "../range"}
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
selectors = {version = "0.8", features = ["heap_size"]} selectors = {version = "0.8", features = ["heap_size"]}
string_cache = {version = "0.2.20", features = ["heap_size"]} string_cache = {version = "0.2.23", features = ["heap_size"]}
style = {path = "../style"} style = {path = "../style"}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"} util = {path = "../util"}

View file

@ -10,26 +10,27 @@ name = "script_traits"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
canvas_traits = {path = "../canvas_traits"} canvas_traits = {path = "../canvas_traits"}
cookie = { version = "0.2.5", features = ["serialize-rustc", "serialize-serde"]} cookie = {version = "0.2.5", features = ["serialize-rustc"]}
devtools_traits = {path = "../devtools_traits"} devtools_traits = {path = "../devtools_traits"}
euclid = "0.8.2" euclid = "0.9"
gfx_traits = {path = "../gfx_traits"} gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.0" heapsize = "0.3.0"
heapsize_plugin = "0.1.2" heapsize_plugin = "0.1.2"
ipc-channel = "0.4.0" hyper_serde = "0.1.4"
ipc-channel = "0.5"
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]} layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
libc = "0.2" libc = "0.2"
msg = {path = "../msg"} msg = {path = "../msg"}
net_traits = {path = "../net_traits"} net_traits = {path = "../net_traits"}
offscreen_gl_context = "0.2.0" offscreen_gl_context = "0.3"
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"} profile_traits = {path = "../profile_traits"}
rustc-serialize = "0.3.4" rustc-serialize = "0.3.4"
serde = "0.7.15" serde = "0.8"
serde_macros = "0.7.15" serde_macros = "0.8"
style_traits = {path = "../style_traits", features = ["servo"]} style_traits = {path = "../style_traits", features = ["servo"]}
time = "0.1.12" time = "0.1.12"
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"} util = {path = "../util"}

View file

@ -18,6 +18,7 @@ extern crate devtools_traits;
extern crate euclid; extern crate euclid;
extern crate gfx_traits; extern crate gfx_traits;
extern crate heapsize; extern crate heapsize;
extern crate hyper_serde;
extern crate ipc_channel; extern crate ipc_channel;
extern crate layers; extern crate layers;
extern crate libc; extern crate libc;

View file

@ -6,6 +6,7 @@
use cookie_rs::Cookie; use cookie_rs::Cookie;
use euclid::rect::Rect; use euclid::rect::Rect;
use hyper_serde::Serde;
use ipc_channel::ipc::IpcSender; use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use rustc_serialize::json::{Json, ToJson}; use rustc_serialize::json::{Json, ToJson};
@ -13,15 +14,20 @@ use url::Url;
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub enum WebDriverScriptCommand { pub enum WebDriverScriptCommand {
AddCookie(Cookie, IpcSender<Result<(), WebDriverCookieError>>), AddCookie(
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
Cookie,
IpcSender<Result<(), WebDriverCookieError>>
),
ExecuteScript(String, IpcSender<WebDriverJSResult>), ExecuteScript(String, IpcSender<WebDriverJSResult>),
ExecuteAsyncScript(String, IpcSender<WebDriverJSResult>), ExecuteAsyncScript(String, IpcSender<WebDriverJSResult>),
FindElementCSS(String, IpcSender<Result<Option<String>, ()>>), FindElementCSS(String, IpcSender<Result<Option<String>, ()>>),
FindElementsCSS(String, IpcSender<Result<Vec<String>, ()>>), FindElementsCSS(String, IpcSender<Result<Vec<String>, ()>>),
FocusElement(String, IpcSender<Result<(), ()>>), FocusElement(String, IpcSender<Result<(), ()>>),
GetActiveElement(IpcSender<Option<String>>), GetActiveElement(IpcSender<Option<String>>),
GetCookie(String, IpcSender<Vec<Cookie>>), GetCookie(String, IpcSender<Vec<Serde<Cookie>>>),
GetCookies(IpcSender<Vec<Cookie>>), GetCookies(IpcSender<Vec<Serde<Cookie>>>),
GetElementAttribute(String, String, IpcSender<Result<Option<String>, ()>>), GetElementAttribute(String, String, IpcSender<Result<Option<String>, ()>>),
GetElementCSS(String, String, IpcSender<Result<String, ()>>), GetElementCSS(String, String, IpcSender<Result<String, ()>>),
GetElementRect(String, IpcSender<Result<Rect<f64>, ()>>), GetElementRect(String, IpcSender<Result<Rect<f64>, ()>>),

File diff suppressed because it is too large Load diff

View file

@ -52,11 +52,11 @@ constellation = {path = "../constellation"}
devtools = {path = "../devtools"} devtools = {path = "../devtools"}
devtools_traits = {path = "../devtools_traits"} devtools_traits = {path = "../devtools_traits"}
env_logger = "0.3" env_logger = "0.3"
euclid = "0.8.2" euclid = "0.9"
gfx = {path = "../gfx"} gfx = {path = "../gfx"}
gleam = "0.2" gleam = "0.2"
glutin_app = {path = "../../ports/glutin"} glutin_app = {path = "../../ports/glutin"}
ipc-channel = "0.4.0" ipc-channel = "0.5"
layout = {path = "../layout"} layout = {path = "../layout"}
layout_thread = {path = "../layout_thread"} layout_thread = {path = "../layout_thread"}
libc = "0.2" libc = "0.2"
@ -70,7 +70,7 @@ script = {path = "../script"}
script_layout_interface = {path = "../script_layout_interface"} script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
style = {path = "../style", features = ["servo"]} style = {path = "../style", features = ["servo"]}
url = "1.0.0" url = "1.2"
util = {path = "../util"} util = {path = "../util"}
webdriver_server = {path = "../webdriver_server", optional = true} webdriver_server = {path = "../webdriver_server", optional = true}

View file

@ -13,19 +13,19 @@ path = "lib.rs"
[features] [features]
gecko = ["gecko_bindings", "gecko_string_cache"] gecko = ["gecko_bindings", "gecko_string_cache"]
servo = ["serde", "serde/nightly", "serde_macros", "heapsize", "heapsize_plugin", servo = ["serde", "serde/unstable", "serde_macros", "heapsize", "heapsize_plugin",
"style_traits/servo", "app_units/plugins", "euclid/plugins", "style_traits/servo", "app_units/plugins",
"cssparser/heap_size", "cssparser/serde-serialization", "cssparser/heap_size", "cssparser/serde-serialization",
"selectors/heap_size", "selectors/unstable", "string_cache", "selectors/heap_size", "selectors/unstable", "string_cache",
"url/heap_size", "plugins"] "url/heap_size", "plugins"]
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
bitflags = "0.7" bitflags = "0.7"
cssparser = "0.5.5" cssparser = "0.5.7"
deque = "0.3.1" deque = "0.3.1"
encoding = "0.2" encoding = "0.2"
euclid = "0.8.2" euclid = "0.9"
fnv = "1.0" fnv = "1.0"
gecko_bindings = {path = "../../ports/geckolib/gecko_bindings", optional = true} gecko_bindings = {path = "../../ports/geckolib/gecko_bindings", optional = true}
gecko_string_cache = {path = "../../ports/geckolib/string_cache", optional = true} gecko_string_cache = {path = "../../ports/geckolib/string_cache", optional = true}
@ -39,13 +39,13 @@ ordered-float = "0.2.2"
rand = "0.3" rand = "0.3"
rustc-serialize = "0.3" rustc-serialize = "0.3"
selectors = "0.8.2" selectors = "0.8.2"
serde = {version = "0.7.15", optional = true} serde = {version = "0.8", optional = true}
serde_macros = {version = "0.7.15", optional = true} serde_macros = {version = "0.8", optional = true}
smallvec = "0.1" smallvec = "0.1"
string_cache = {version = "0.2.22", features = ["heap_size"], optional = true} string_cache = {version = "0.2.23", features = ["heap_size"], optional = true}
style_traits = {path = "../style_traits"} style_traits = {path = "../style_traits"}
time = "0.1" time = "0.1"
url = "1.0.0" url = "1.2"
util = {path = "../util"} util = {path = "../util"}
plugins = {path = "../plugins", optional = true} plugins = {path = "../plugins", optional = true}

View file

@ -14,10 +14,10 @@ servo = ["heapsize", "heapsize_plugin", "serde", "serde_macros",
"cssparser/heap_size", "cssparser/serde-serialization"] "cssparser/heap_size", "cssparser/serde-serialization"]
[dependencies] [dependencies]
cssparser = "0.5.4" cssparser = "0.5.7"
euclid = "0.8.2" euclid = "0.9"
heapsize = {version = "0.3.0", optional = true} heapsize = {version = "0.3.0", optional = true}
heapsize_plugin = {version = "0.1.2", optional = true} heapsize_plugin = {version = "0.1.2", optional = true}
rustc-serialize = "0.3" rustc-serialize = "0.3"
serde = {version = "0.7.11", optional = true} serde = {version = "0.8", optional = true}
serde_macros = {version = "0.7.11", optional = true} serde_macros = {version = "0.8", optional = true}

View file

@ -15,19 +15,19 @@ servo = ["serde", "serde_macros", "ipc-channel", "app_units/plugins",
"euclid/unstable", "url/heap_size", "url/serde", "plugins"] "euclid/unstable", "url/heap_size", "url/serde", "plugins"]
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
bitflags = "0.7" bitflags = "0.7"
euclid = "0.8.2" euclid = "0.9"
getopts = "0.2.11" getopts = "0.2.11"
heapsize = "0.3.0" heapsize = "0.3.0"
ipc-channel = {version = "0.4.0", optional = true} ipc-channel = {version = "0.5", optional = true}
lazy_static = "0.2" lazy_static = "0.2"
log = "0.3.5" log = "0.3.5"
num_cpus = "0.2.2" num_cpus = "0.2.2"
rustc-serialize = "0.3" rustc-serialize = "0.3"
serde = {version = "0.7.11", optional = true} serde = {version = "0.8", optional = true}
serde_macros = {version = "0.7.11", optional = true} serde_macros = {version = "0.8", optional = true}
url = "1.0.0" url = "1.2"
plugins = {path = "../plugins", optional = true} plugins = {path = "../plugins", optional = true}
[dev-dependencies] [dev-dependencies]

View file

@ -10,18 +10,18 @@ name = "webdriver_server"
path = "lib.rs" path = "lib.rs"
[dependencies] [dependencies]
euclid = "0.8.2" euclid = "0.9"
hyper = "0.9.9" hyper = "0.9.9"
image = "0.10" image = "0.10"
ipc-channel = "0.4.0" ipc-channel = "0.5"
log = "0.3.5" log = "0.3.5"
msg = {path = "../msg"} msg = {path = "../msg"}
plugins = {path = "../plugins"} plugins = {path = "../plugins"}
regex = "0.1.55" regex = "0.1.55"
rustc-serialize = "0.3.4" rustc-serialize = "0.3.4"
script_traits = {path = "../script_traits"} script_traits = {path = "../script_traits"}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"} util = {path = "../util"}
uuid = { version = "0.2", features = ["v4"] } uuid = { version = "0.3", features = ["v4"] }
webdriver = "0.9" webdriver = "0.9"
cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] } cookie = {version = "0.2.5", features = ["serialize-rustc"]}

View file

@ -643,7 +643,7 @@ impl Handler {
try!(self.frame_script_command(WebDriverScriptCommand::GetCookies(sender))); try!(self.frame_script_command(WebDriverScriptCommand::GetCookies(sender)));
let cookies = receiver.recv().unwrap(); let cookies = receiver.recv().unwrap();
let response = cookies.into_iter().map(|cookie| { let response = cookies.into_iter().map(|cookie| {
cookie_msg_to_cookie(cookie) cookie_msg_to_cookie(cookie.into_inner())
}).collect::<Vec<Cookie>>(); }).collect::<Vec<Cookie>>();
Ok(WebDriverResponse::Cookie(CookieResponse::new(response))) Ok(WebDriverResponse::Cookie(CookieResponse::new(response)))
} }
@ -653,7 +653,7 @@ impl Handler {
try!(self.frame_script_command(WebDriverScriptCommand::GetCookie(name.to_owned(), sender))); try!(self.frame_script_command(WebDriverScriptCommand::GetCookie(name.to_owned(), sender)));
let cookies = receiver.recv().unwrap(); let cookies = receiver.recv().unwrap();
let response = cookies.into_iter().map(|cookie| { let response = cookies.into_iter().map(|cookie| {
cookie_msg_to_cookie(cookie) cookie_msg_to_cookie(cookie.into_inner())
}).collect::<Vec<Cookie>>(); }).collect::<Vec<Cookie>>();
Ok(WebDriverResponse::Cookie(CookieResponse::new(response))) Ok(WebDriverResponse::Cookie(CookieResponse::new(response)))
} }

555
ports/cef/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -17,7 +17,7 @@ opt-level = 3
[dependencies] [dependencies]
compositing = {path = "../../components/compositing"} compositing = {path = "../../components/compositing"}
devtools = {path = "../../components/devtools"} devtools = {path = "../../components/devtools"}
euclid = "0.8.2" euclid = "0.9"
gleam = "0.2.8" gleam = "0.2.8"
glutin_app = {path = "../glutin"} glutin_app = {path = "../glutin"}
layers = {git = "https://github.com/servo/rust-layers"} layers = {git = "https://github.com/servo/rust-layers"}
@ -29,12 +29,12 @@ plugins = {path = "../../components/plugins"}
script_traits = {path = "../../components/script_traits"} script_traits = {path = "../../components/script_traits"}
servo = {path = "../../components/servo"} servo = {path = "../../components/servo"}
style_traits = {path = "../../components/style_traits"} style_traits = {path = "../../components/style_traits"}
url = "1.0.0" url = "1.2"
util = {path = "../../components/util"} util = {path = "../../components/util"}
[target.'cfg(target_os="macos")'.dependencies] [target.'cfg(target_os="macos")'.dependencies]
objc = "0.2" objc = "0.2"
cocoa = "0.4" cocoa = "0.5"
[target.'cfg(target_os="linux")'.dependencies] [target.'cfg(target_os="linux")'.dependencies]
x11 = "2.3" x11 = "2.3"

View file

@ -2,9 +2,9 @@
name = "geckoservo" name = "geckoservo"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gecko_bindings 0.0.1", "gecko_bindings 0.0.1",
"gecko_string_cache 0.2.20", "gecko_string_cache 0.2.20",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -14,7 +14,7 @@ dependencies = [
"selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"style 0.0.1", "style 0.0.1",
"style_traits 0.0.1", "style_traits 0.0.1",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
] ]
@ -28,13 +28,13 @@ dependencies = [
[[package]] [[package]]
name = "app_units" name = "app_units"
version = "0.2.5" version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -49,7 +49,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "cssparser" name = "cssparser"
version = "0.5.6" version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
@ -140,14 +140,14 @@ dependencies = [
[[package]] [[package]]
name = "euclid" name = "euclid"
version = "0.8.2" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -171,7 +171,7 @@ dependencies = [
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "selectors 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -315,17 +315,17 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"quickersort 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "quickersort 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"string_cache 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", "string_cache 0.2.23 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "serde" name = "serde"
version = "0.7.15" version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
@ -335,26 +335,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "string_cache" name = "string_cache"
version = "0.2.22" version = "0.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "debug_unreachable 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_generator 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)", "phf_generator 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"phf_shared 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)", "phf_shared 0.7.16 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "style" name = "style"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
"deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)", "encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gecko_bindings 0.0.1", "gecko_bindings 0.0.1",
"gecko_string_cache 0.2.20", "gecko_string_cache 0.2.20",
@ -371,7 +371,7 @@ dependencies = [
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1", "style_traits 0.0.1",
"time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"util 0.0.1", "util 0.0.1",
"walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -380,8 +380,8 @@ dependencies = [
name = "style_traits" name = "style_traits"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "cssparser 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -435,7 +435,7 @@ dependencies = [
[[package]] [[package]]
name = "url" name = "url"
version = "1.1.1" version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -451,16 +451,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
name = "util" name = "util"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"app_units 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "heapsize 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "xdg 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]

View file

@ -10,9 +10,9 @@ path = "lib.rs"
crate-type = ["staticlib"] crate-type = ["staticlib"]
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
env_logger = "0.3" env_logger = "0.3"
euclid = "0.8.2" euclid = "0.9"
gecko_bindings = {version = "0.0.1", path = "gecko_bindings"} gecko_bindings = {version = "0.0.1", path = "gecko_bindings"}
gecko_string_cache = {path = "string_cache"} gecko_string_cache = {path = "string_cache"}
lazy_static = "0.2" lazy_static = "0.2"
@ -22,5 +22,5 @@ num_cpus = "0.2.2"
selectors = "0.8" selectors = "0.8"
style = {path = "../../components/style", features = ["gecko"]} style = {path = "../../components/style", features = ["gecko"]}
style_traits = {path = "../../components/style_traits"} style_traits = {path = "../../components/style_traits"}
url = "1.0.0" url = "1.2"
util = {path = "../../components/util"} util = {path = "../../components/util"}

View file

@ -15,4 +15,4 @@ gecko_bindings = {version = "0.0.1", path = "../gecko_bindings"}
heapsize = "0.3.5" heapsize = "0.3.5"
libc = "0.2" libc = "0.2"
selectors = "0.8" selectors = "0.8"
serde = "0.7.15" serde = "0.8"

View file

@ -11,16 +11,16 @@ path = "lib.rs"
[dependencies] [dependencies]
bitflags = "0.7" bitflags = "0.7"
compositing = {path = "../../components/compositing"} compositing = {path = "../../components/compositing"}
euclid = "0.8.2" euclid = "0.9"
gleam = "0.2.8" gleam = "0.2.8"
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]} layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
log = "0.3.5" log = "0.3.5"
msg = {path = "../../components/msg"} msg = {path = "../../components/msg"}
net_traits = {path = "../../components/net_traits"} net_traits = {path = "../../components/net_traits"}
script_traits = {path = "../../components/script_traits"} script_traits = {path = "../../components/script_traits"}
servo-glutin = "0.4" servo-glutin = "0.5"
style_traits = {path = "../../components/style_traits"} style_traits = {path = "../../components/style_traits"}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../../components/util"} util = {path = "../../components/util"}
[target.'cfg(target_os = "linux")'.dependencies] [target.'cfg(target_os = "linux")'.dependencies]

View file

@ -11,5 +11,5 @@ doctest = false
[dependencies] [dependencies]
gfx = {path = "../../../components/gfx"} gfx = {path = "../../../components/gfx"}
ipc-channel = "0.4.0" ipc-channel = "0.5"
style = {path = "../../../components/style"} style = {path = "../../../components/style"}

View file

@ -10,12 +10,13 @@ path = "lib.rs"
doctest = false doctest = false
[dependencies] [dependencies]
content-blocker = "0.2" content-blocker = "0.2.1"
cookie = "0.2" cookie = "0.2"
devtools_traits = {path = "../../../components/devtools_traits"} devtools_traits = {path = "../../../components/devtools_traits"}
flate2 = "0.2.0" flate2 = "0.2.0"
hyper = "0.9.9" hyper = "0.9.9"
ipc-channel = "0.4.0" hyper_serde = "0.1.4"
ipc-channel = "0.5"
msg = {path = "../../../components/msg"} msg = {path = "../../../components/msg"}
net = {path = "../../../components/net"} net = {path = "../../../components/net"}
net_traits = {path = "../../../components/net_traits"} net_traits = {path = "../../../components/net_traits"}
@ -23,5 +24,5 @@ plugins = {path = "../../../components/plugins"}
profile_traits = {path = "../../../components/profile_traits"} profile_traits = {path = "../../../components/profile_traits"}
time = "0.1" time = "0.1"
unicase = "1.0" unicase = "1.0"
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../../../components/util"} util = {path = "../../../components/util"}

View file

@ -3,7 +3,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
extern crate hyper; extern crate hyper;
extern crate hyper_serde;
use hyper_serde::Serde;
use ipc_channel::ipc; use ipc_channel::ipc;
use msg::constellation_msg::{PipelineId, ReferrerPolicy}; use msg::constellation_msg::{PipelineId, ReferrerPolicy};
use net_traits::LoadConsumer::Channel; use net_traits::LoadConsumer::Channel;
@ -44,7 +46,8 @@ fn assert_parse(url: &'static str,
classifier, CancellationListener::new(None)); classifier, CancellationListener::new(None));
let response = start_port.recv().unwrap(); let response = start_port.recv().unwrap();
assert_eq!(&response.metadata.content_type, &content_type); assert_eq!(&response.metadata.content_type.map(Serde::into_inner),
&content_type);
assert_eq!(&response.metadata.charset, &charset); assert_eq!(&response.metadata.charset, &charset);
let progress = response.progress_port.recv().unwrap(); let progress = response.progress_port.recv().unwrap();

View file

@ -18,6 +18,7 @@ use hyper::http::RawStatus;
use hyper::method::Method; use hyper::method::Method;
use hyper::mime::{Mime, SubLevel, TopLevel}; use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper::status::StatusCode; use hyper::status::StatusCode;
use hyper_serde::Serde;
use msg::constellation_msg::{PipelineId, ReferrerPolicy}; use msg::constellation_msg::{PipelineId, ReferrerPolicy};
use net::cookie::Cookie; use net::cookie::Cookie;
use net::cookie_storage::CookieStorage; use net::cookie_storage::CookieStorage;
@ -1584,7 +1585,8 @@ fn test_auth_ui_sets_header_on_401() {
}, DEFAULT_USER_AGENT.to_owned(), &CancellationListener::new(None), None) { }, DEFAULT_USER_AGENT.to_owned(), &CancellationListener::new(None), None) {
Err(e) => panic!("response contained error {:?}", e), Err(e) => panic!("response contained error {:?}", e),
Ok(response) => { Ok(response) => {
assert_eq!(response.metadata.status, Some(RawStatus(200, Cow::Borrowed("Ok")))); assert_eq!(response.metadata.status,
Some(Serde(RawStatus(200, Cow::Borrowed("Ok")))));
} }
} }
} }
@ -1618,7 +1620,8 @@ fn test_auth_ui_needs_www_auth() {
match response { match response {
Err(e) => panic!("response contained error {:?}", e), Err(e) => panic!("response contained error {:?}", e),
Ok(response) => { Ok(response) => {
assert_eq!(response.metadata.status, Some(RawStatus(401, Cow::Borrowed("Unauthorized")))); assert_eq!(response.metadata.status,
Some(Serde(RawStatus(401, Cow::Borrowed("Unauthorized")))));
} }
} }
} }
@ -1944,7 +1947,7 @@ fn load_request_for_custom_response(expected_body: Vec<u8>) -> (Metadata, String
fn test_custom_response() { fn test_custom_response() {
let expected_body = b"Yay!".to_vec(); let expected_body = b"Yay!".to_vec();
let (metadata, body) = load_request_for_custom_response(expected_body.clone()); let (metadata, body) = load_request_for_custom_response(expected_body.clone());
assert_eq!(metadata.status, Some(RawStatus(200, Cow::Borrowed("OK")))); assert_eq!(metadata.status, Some(Serde(RawStatus(200, Cow::Borrowed("OK")))));
assert_eq!(body, String::from_utf8(expected_body).unwrap()); assert_eq!(body, String::from_utf8(expected_body).unwrap());
} }

View file

@ -10,6 +10,7 @@ extern crate cookie as cookie_rs;
extern crate devtools_traits; extern crate devtools_traits;
extern crate flate2; extern crate flate2;
extern crate hyper; extern crate hyper;
extern crate hyper_serde;
extern crate ipc_channel; extern crate ipc_channel;
extern crate msg; extern crate msg;
extern crate net; extern crate net;

View file

@ -12,4 +12,4 @@ doctest = false
[dependencies] [dependencies]
profile = {path = "../../../components/profile"} profile = {path = "../../../components/profile"}
profile_traits = {path = "../../../components/profile_traits"} profile_traits = {path = "../../../components/profile_traits"}
ipc-channel = "0.4.0" ipc-channel = "0.5"

View file

@ -13,4 +13,4 @@ doctest = false
msg = {path = "../../../components/msg"} msg = {path = "../../../components/msg"}
plugins = {path = "../../../components/plugins"} plugins = {path = "../../../components/plugins"}
script = {path = "../../../components/script"} script = {path = "../../../components/script"}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}

View file

@ -10,13 +10,13 @@ path = "lib.rs"
doctest = false doctest = false
[dependencies] [dependencies]
app_units = "0.2.5" app_units = "0.3"
cssparser = {version = "0.5.4", features = ["heap_size"]} cssparser = {version = "0.5.7", features = ["heap_size"]}
euclid = "0.8.2" euclid = "0.9"
rustc-serialize = "0.3" rustc-serialize = "0.3"
selectors = {version = "0.8", features = ["heap_size"]} selectors = {version = "0.8", features = ["heap_size"]}
string_cache = {version = "0.2", features = ["heap_size"]} string_cache = {version = "0.2.23", features = ["heap_size"]}
style = {path = "../../../components/style"} style = {path = "../../../components/style"}
style_traits = {path = "../../../components/style_traits"} style_traits = {path = "../../../components/style_traits"}
url = {version = "1.0.0", features = ["heap_size"]} url = {version = "1.2", features = ["heap_size"]}
util = {path = "../../../components/util"} util = {path = "../../../components/util"}