servo: Merge #12828 - Update serde to 0.8 (fixes #12659) (from nox:serde); r=Ms2ger

Source-Repo: https://github.com/servo/servo
Source-Revision: 9abe9e450b54ef9151bbee1aa0bd2dedb685fa7a
This commit is contained in:
Anthony Ramine 2016-08-12 12:23:10 -05:00
Родитель 98447e1715
Коммит 64c09a7eda
70 изменённых файлов: 919 добавлений и 778 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -103,7 +103,7 @@ impl Actor for ConsoleActor {
Ok(match msg_type {
"getCachedMessages" => {
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();
for str_type in str_types {
@ -154,7 +154,7 @@ impl Actor for ConsoleActor {
.as_array()
.unwrap_or(&vec!())
.iter()
.map(|listener| listener.as_string().unwrap().to_owned())
.map(|listener| listener.as_str().unwrap().to_owned())
.collect(),
};
stream.write_json_packet(&msg);
@ -174,7 +174,7 @@ impl Actor for ConsoleActor {
}
"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();
self.script_chan.send(DevtoolScriptControlMsg::EvaluateJS(
self.pipeline, input.clone(), chan)).unwrap();

Просмотреть файл

@ -106,7 +106,7 @@ impl Actor for NodeActor {
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
Ok(match msg_type {
"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 modifications = mods.iter().map(|json_mod| {
serde_json::from_str(&serde_json::to_string(json_mod).unwrap()).unwrap()
@ -310,7 +310,7 @@ impl Actor for WalkerActor {
}
"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();
self.script_chan.send(GetChildren(self.pipeline,
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)
"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();
self.script_chan.send(GetLayout(self.pipeline,
registry.actor_to_script(target.to_owned()),
@ -493,7 +493,7 @@ impl Actor for PageStyleActor {
} = try!(rx.recv().unwrap().ok_or(()));
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
let msg = GetLayoutReply {

Просмотреть файл

@ -94,7 +94,7 @@ impl Actor for TabActor {
"reconfigure" => {
if let Some(options) = msg.get("options").and_then(|o| o.as_object()) {
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.script_chan.send(
DevtoolScriptControlMsg::Reload(console_actor.pipeline));

Просмотреть файл

@ -191,14 +191,14 @@ impl Actor for TimelineActor {
// init memory actor
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));
}
}
// init framerate actor
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(
registry,
self.pipeline.clone(),

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -31,7 +31,6 @@ use net_traits::image::base::{Image, PixelFormat};
use paint_context::PaintContext;
use range::Range;
use serde::de::{self, Deserialize, Deserializer, MapVisitor, Visitor};
use serde::ser::impls::MapIteratorVisitor;
use serde::ser::{Serialize, Serializer};
use std::cmp::{self, Ordering};
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 {
#[inline]
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)
}
}

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -10,18 +10,18 @@ name = "layout"
path = "lib.rs"
[dependencies]
app_units = "0.2.5"
app_units = "0.3"
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
bitflags = "0.7"
canvas_traits = {path = "../canvas_traits"}
cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]}
euclid = "0.8.2"
cssparser = {version = "0.5.7", features = ["heap_size", "serde-serialization"]}
euclid = "0.9"
fnv = "1.0"
gfx = {path = "../gfx"}
gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.0"
heapsize_plugin = "0.1.2"
ipc-channel = "0.4.0"
ipc-channel = "0.5"
libc = "0.2"
log = "0.3.5"
msg = {path = "../msg"}
@ -34,14 +34,14 @@ rustc-serialize = "0.3"
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
selectors = {version = "0.8", features = ["heap_size"]}
serde_macros = "0.7.15"
serde_macros = "0.8"
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_traits = {path = "../style_traits"}
unicode-bidi = "0.2"
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"}
[dependencies.webrender_traits]

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -11,15 +11,16 @@ path = "lib.rs"
[dependencies]
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_plugin = "0.1.2"
hyper = {version = "0.9.9", features = ["serde-serialization"]}
ipc-channel = "0.4.0"
hyper = "0.9.9"
hyper_serde = "0.1.4"
ipc-channel = "0.5"
plugins = {path = "../plugins"}
serde = "0.7.15"
serde_macros = "0.7.15"
url = {version = "1.0.0", features = ["heap_size", "serde"]}
serde = "0.8"
serde_macros = "0.8"
url = {version = "1.2", features = ["heap_size", "serde"]}
[dependencies.webrender_traits]
git = "https://github.com/servo/webrender_traits"

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -12,14 +12,15 @@ path = "lib.rs"
[dependencies]
bitflags = "0.7"
brotli = "1.0.6"
content-blocker = "0.2"
cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] }
content-blocker = "0.2.1"
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
device = {git = "https://github.com/servo/devices"}
devtools_traits = {path = "../devtools_traits"}
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"
ipc-channel = "0.4.0"
ipc-channel = "0.5"
lazy_static = "0.2"
log = "0.3.5"
matches = "0.1"
@ -36,9 +37,9 @@ rustc-serialize = "0.3"
threadpool = "1.0"
time = "0.1.17"
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"}
uuid = {version = "0.2", features = ["v4"]}
uuid = {version = "0.3", features = ["v4"]}
websocket = "0.17"
[dependencies.webrender_traits]

Просмотреть файл

@ -6,6 +6,7 @@ use file_loader;
use hyper::header::ContentType;
use hyper::http::RawStatus;
use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper_serde::Serde;
use mime_classifier::MimeClassifier;
use net_traits::ProgressMsg::Done;
use net_traits::response::HttpsState;
@ -33,10 +34,11 @@ pub fn factory(mut load_data: LoadData,
"blank" => {
let metadata = Metadata {
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()),
headers: None,
status: Some(RawStatus(200, "OK".into())),
status: Some(Serde(RawStatus(200, "OK".into()))),
https_state: HttpsState::None,
referrer: None,
};

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -21,6 +21,7 @@ use http_loader::{self, HttpState};
use hyper::client::pool::Pool;
use hyper::header::{ContentType, Header, SetCookie};
use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender, IpcReceiverSet};
use mime_classifier::{ApacheBugFlag, MimeClassifier, NoSniffFlag};
use net_traits::LoadContext;
@ -115,7 +116,7 @@ pub fn start_sending_sniffed_opt(start_chan: LoadConsumer, mut metadata: Metadat
}
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))
});
let (toplevel, sublevel) = classifier.classify(context,
@ -125,7 +126,8 @@ pub fn start_sending_sniffed_opt(start_chan: LoadConsumer, mut metadata: Metadat
&partial_body);
let mime_tp: TopLevel = toplevel.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)
@ -291,7 +293,7 @@ impl ResourceChannelManager {
}
CoreResourceMsg::GetCookiesDataForUrl(url, consumer, source) => {
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();
}
CoreResourceMsg::Cancel(res_id) => {

Просмотреть файл

@ -12,17 +12,18 @@ path = "lib.rs"
[dependencies]
util = {path = "../util"}
msg = {path = "../msg"}
ipc-channel = "0.4.0"
ipc-channel = "0.5"
heapsize = "0.3.0"
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"
lazy_static = "0.2"
log = "0.3.5"
num-traits = "0.1.32"
serde = "0.7.15"
serde_macros = "0.7.15"
url = {version = "1.0.0", features = ["heap_size"]}
serde = "0.8"
serde_macros = "0.8"
url = {version = "1.2", features = ["heap_size"]}
websocket = "0.17"
uuid = { version = "0.2.2", features = ["v4", "serde"] }
cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] }
uuid = { version = "0.3", features = ["v4", "serde"] }
cookie = {version = "0.2.5", features = ["serialize-rustc"]}

Просмотреть файл

@ -15,6 +15,7 @@
extern crate cookie as cookie_rs;
extern crate heapsize;
extern crate hyper;
extern crate hyper_serde;
extern crate image as piston_image;
extern crate ipc_channel;
#[allow(unused_extern_crates)]
@ -37,6 +38,7 @@ use hyper::header::{ContentType, Headers};
use hyper::http::RawStatus;
use hyper::method::Method;
use hyper::mime::{Attr, Mime};
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
use msg::constellation_msg::{PipelineId, ReferrerPolicy};
use request::{Request, RequestInit};
@ -85,8 +87,12 @@ pub enum LoadContext {
#[derive(Clone, Debug, Deserialize, Serialize, HeapSizeOf)]
pub struct CustomResponse {
#[ignore_heap_size_of = "Defined in hyper"]
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub headers: Headers,
#[ignore_heap_size_of = "Defined in hyper"]
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub raw_status: RawStatus,
pub body: Vec<u8>
}
@ -107,11 +113,17 @@ pub struct CustomResponseMediator {
pub struct LoadData {
pub url: Url,
#[ignore_heap_size_of = "Defined in hyper"]
#[serde(deserialize_with = "::hyper_serde::deserialize",
serialize_with = "::hyper_serde::serialize")]
pub method: Method,
#[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
pub headers: Headers,
#[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
/// Unused in fetch
pub preserved_headers: Headers,
@ -378,7 +390,12 @@ pub enum WebSocketDomAction {
#[derive(Deserialize, Serialize)]
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),
Close(Option<u16>, String),
Fail,
@ -407,11 +424,17 @@ pub enum CoreResourceMsg {
/// Store a set of cookies for a given originating URL
SetCookiesForUrl(Url, String, CookieSource),
/// 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
GetCookiesForUrl(Url, IpcSender<Option<String>>, CookieSource),
/// 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(ResourceId),
/// 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"]
/// MIME type / subtype.
pub content_type: Option<(ContentType)>,
pub content_type: Option<Serde<ContentType>>,
/// Character set.
pub charset: Option<String>,
#[ignore_heap_size_of = "Defined in hyper"]
/// Headers
pub headers: Option<Headers>,
pub headers: Option<Serde<Headers>>,
#[ignore_heap_size_of = "Defined in hyper"]
/// HTTP Status
pub status: Option<RawStatus>,
pub status: Option<Serde<RawStatus>>,
/// Is successful HTTPS connection
pub https_state: HttpsState,
@ -557,7 +580,7 @@ impl Metadata {
charset: None,
headers: None,
// 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,
referrer: None,
}
@ -566,7 +589,7 @@ impl Metadata {
/// Extract the parts of a Mime that we care about.
pub fn set_content_type(&mut self, content_type: Option<&Mime>) {
match self.headers {
None => self.headers = Some(Headers::new()),
None => self.headers = Some(Serde(Headers::new())),
Some(_) => (),
}
@ -577,7 +600,7 @@ impl Metadata {
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;
for &(ref k, ref v) in parameters {
if &Attr::Charset == k {

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -22,23 +22,24 @@ video-metadata = {git = "https://github.com/GuillaumeGomez/video-metadata-rs"}
[dependencies]
angle = {git = "https://github.com/servo/angle", branch = "servo"}
app_units = "0.2.5"
app_units = "0.3"
bitflags = "0.7"
canvas_traits = {path = "../canvas_traits"}
caseless = "0.1.0"
cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] }
cssparser = {version = "0.5.4", features = ["heap_size", "serde-serialization"]}
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
cssparser = {version = "0.5.7", features = ["heap_size", "serde-serialization"]}
devtools_traits = {path = "../devtools_traits"}
encoding = "0.2"
euclid = "0.8.2"
euclid = "0.9"
fnv = "1.0"
gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.6"
heapsize_plugin = "0.1.2"
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"
ipc-channel = "0.4.0"
ipc-channel = "0.5"
js = {git = "https://github.com/servo/rust-mozjs"}
libc = "0.2"
log = "0.3.5"
@ -47,7 +48,7 @@ mime_guess = "1.8.0"
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
num-traits = "0.1.32"
offscreen_gl_context = "0.2.0"
offscreen_gl_context = "0.3"
open = "1.1.1"
phf = "0.7.16"
phf_macros = "0.7.16"
@ -62,14 +63,14 @@ rustc-serialize = "0.3"
script_layout_interface = {path = "../script_layout_interface"}
script_traits = {path = "../script_traits"}
selectors = {version = "0.8", features = ["heap_size"]}
serde = "0.7.15"
serde = "0.8"
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"}
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"}
uuid = {version = "0.2", features = ["v4"]}
uuid = {version = "0.3", features = ["v4"]}
websocket = "0.17"
xml5ever = {version = "0.1.2", features = ["unstable"]}

Просмотреть файл

@ -24,6 +24,7 @@ use encoding::all::UTF_8;
use hyper::header::ContentType;
use hyper::http::RawStatus;
use hyper::mime::{Mime, TopLevel, SubLevel};
use hyper_serde::Serde;
use ipc_channel::ipc;
use ipc_channel::router::ROUTER;
use net_traits::{AsyncResponseListener, AsyncResponseTarget, Metadata, NetworkError};
@ -282,7 +283,7 @@ impl AsyncResponseListener for StylesheetContext {
fn headers_available(&mut self, metadata: Result<Metadata, NetworkError>) {
self.metadata = metadata.ok();
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 {
self.elem.root().upcast::<EventTarget>().fire_simple_event("error");
}
@ -304,7 +305,7 @@ impl AsyncResponseListener for StylesheetContext {
Some(meta) => meta,
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);
let data = if is_css { mem::replace(&mut self.data, vec!()) } else { vec!() };
@ -334,7 +335,7 @@ impl AsyncResponseListener for StylesheetContext {
document.invalidate_stylesheets();
// 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() {

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -28,6 +28,7 @@ use html5ever::tree_builder;
use html5ever::tree_builder::{TreeBuilder, TreeBuilderOpts};
use hyper::header::ContentType;
use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper_serde::Serde;
use js::jsapi::JSTracer;
use msg::constellation_msg::{PipelineId, SubpageId};
use net_traits::{AsyncResponseListener, Metadata, NetworkError};
@ -98,7 +99,8 @@ impl AsyncResponseListener for ParserContext {
},
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,
self.subpage.as_ref(),
metadata) {

Просмотреть файл

@ -39,6 +39,7 @@ use hyper::header::{ContentLength, ContentType};
use hyper::http::RawStatus;
use hyper::method::Method;
use hyper::mime::{self, Mime, Attr as MimeAttr, Value as MimeValue};
use hyper_serde::Serde;
use ipc_channel::ipc;
use ipc_channel::router::ROUTER;
use js::jsapi::JS_ClearPendingException;
@ -875,7 +876,10 @@ impl XMLHttpRequest {
*self.response_url.borrow_mut() = metadata.final_url[..Position::AfterQuery].to_owned();
// 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(())
}

Просмотреть файл

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

Просмотреть файл

@ -55,6 +55,7 @@ use hyper::header::{ContentType, Headers, HttpDate, LastModified};
use hyper::header::{ReferrerPolicy as ReferrerPolicyHeader};
use hyper::method::Method;
use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper_serde::Serde;
use ipc_channel::ipc::{self, IpcSender};
use ipc_channel::router::ROUTER;
use js::glue::GetWindowProxyClass;
@ -1695,7 +1696,7 @@ impl ScriptThread {
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 {
Mime(TopLevel::Application, SubLevel::Xml, _) |
Mime(TopLevel::Application, SubLevel::Ext(_), _) |
@ -1710,8 +1711,8 @@ impl ScriptThread {
Some(incomplete.url.clone()));
let is_html_document = match metadata.content_type {
Some(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _))) |
Some(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _))) =>
Some(Serde(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _)))) |
Some(Serde(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _)))) =>
IsHTMLDocument::NonHTMLDocument,
_ => IsHTMLDocument::HTMLDocument,
};
@ -1797,11 +1798,11 @@ impl ScriptThread {
document.set_https_state(metadata.https_state);
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,
Some(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _))) |
Some(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _))) => true,
Some(Serde(ContentType(Mime(TopLevel::Application, SubLevel::Xml, _)))) |
Some(Serde(ContentType(Mime(TopLevel::Text, SubLevel::Xml, _)))) => true,
_ => false,
};

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -10,26 +10,27 @@ name = "script_traits"
path = "lib.rs"
[dependencies]
app_units = "0.2.5"
app_units = "0.3"
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"}
euclid = "0.8.2"
euclid = "0.9"
gfx_traits = {path = "../gfx_traits"}
heapsize = "0.3.0"
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"]}
libc = "0.2"
msg = {path = "../msg"}
net_traits = {path = "../net_traits"}
offscreen_gl_context = "0.2.0"
offscreen_gl_context = "0.3"
plugins = {path = "../plugins"}
profile_traits = {path = "../profile_traits"}
rustc-serialize = "0.3.4"
serde = "0.7.15"
serde_macros = "0.7.15"
serde = "0.8"
serde_macros = "0.8"
style_traits = {path = "../style_traits", features = ["servo"]}
time = "0.1.12"
url = {version = "1.0.0", features = ["heap_size"]}
url = {version = "1.2", features = ["heap_size"]}
util = {path = "../util"}

Просмотреть файл

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

Просмотреть файл

@ -6,6 +6,7 @@
use cookie_rs::Cookie;
use euclid::rect::Rect;
use hyper_serde::Serde;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::PipelineId;
use rustc_serialize::json::{Json, ToJson};
@ -13,15 +14,20 @@ use url::Url;
#[derive(Deserialize, Serialize)]
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>),
ExecuteAsyncScript(String, IpcSender<WebDriverJSResult>),
FindElementCSS(String, IpcSender<Result<Option<String>, ()>>),
FindElementsCSS(String, IpcSender<Result<Vec<String>, ()>>),
FocusElement(String, IpcSender<Result<(), ()>>),
GetActiveElement(IpcSender<Option<String>>),
GetCookie(String, IpcSender<Vec<Cookie>>),
GetCookies(IpcSender<Vec<Cookie>>),
GetCookie(String, IpcSender<Vec<Serde<Cookie>>>),
GetCookies(IpcSender<Vec<Serde<Cookie>>>),
GetElementAttribute(String, String, IpcSender<Result<Option<String>, ()>>),
GetElementCSS(String, String, IpcSender<Result<String, ()>>),
GetElementRect(String, IpcSender<Result<Rect<f64>, ()>>),

570
servo/components/servo/Cargo.lock сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

555
servo/ports/cef/Cargo.lock сгенерированный

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

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

48
servo/ports/geckolib/Cargo.lock сгенерированный
Просмотреть файл

@ -2,9 +2,9 @@
name = "geckoservo"
version = "0.0.1"
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)",
"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_string_cache 0.2.20",
"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)",
"style 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",
]
@ -28,13 +28,13 @@ dependencies = [
[[package]]
name = "app_units"
version = "0.2.5"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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]]
@ -49,7 +49,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cssparser"
version = "0.5.6"
version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encoding 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
@ -140,14 +140,14 @@ dependencies = [
[[package]]
name = "euclid"
version = "0.8.2"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
"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]]
@ -171,7 +171,7 @@ dependencies = [
"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)",
"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]]
@ -315,17 +315,17 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
"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]]
name = "serde"
version = "0.7.15"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -335,26 +335,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "string_cache"
version = "0.2.22"
version = "0.2.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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)",
"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)",
"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]]
name = "style"
version = "0.0.1"
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)",
"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)",
"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)",
"gecko_bindings 0.0.1",
"gecko_string_cache 0.2.20",
@ -371,7 +371,7 @@ dependencies = [
"smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
"style_traits 0.0.1",
"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",
"walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -380,8 +380,8 @@ dependencies = [
name = "style_traits"
version = "0.0.1"
dependencies = [
"cssparser 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.5.7 (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)",
]
@ -435,7 +435,7 @@ dependencies = [
[[package]]
name = "url"
version = "1.1.1"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"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"
version = "0.0.1"
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)",
"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)",
"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)",
"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)",
"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)",
]

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -11,16 +11,16 @@ path = "lib.rs"
[dependencies]
bitflags = "0.7"
compositing = {path = "../../components/compositing"}
euclid = "0.8.2"
euclid = "0.9"
gleam = "0.2.8"
layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]}
log = "0.3.5"
msg = {path = "../../components/msg"}
net_traits = {path = "../../components/net_traits"}
script_traits = {path = "../../components/script_traits"}
servo-glutin = "0.4"
servo-glutin = "0.5"
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"}
[target.'cfg(target_os = "linux")'.dependencies]

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -18,6 +18,7 @@ use hyper::http::RawStatus;
use hyper::method::Method;
use hyper::mime::{Mime, SubLevel, TopLevel};
use hyper::status::StatusCode;
use hyper_serde::Serde;
use msg::constellation_msg::{PipelineId, ReferrerPolicy};
use net::cookie::Cookie;
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) {
Err(e) => panic!("response contained error {:?}", e),
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 {
Err(e) => panic!("response contained error {:?}", e),
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() {
let expected_body = b"Yay!".to_vec();
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());
}

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

@ -10,13 +10,13 @@ path = "lib.rs"
doctest = false
[dependencies]
app_units = "0.2.5"
cssparser = {version = "0.5.4", features = ["heap_size"]}
euclid = "0.8.2"
app_units = "0.3"
cssparser = {version = "0.5.7", features = ["heap_size"]}
euclid = "0.9"
rustc-serialize = "0.3"
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_traits = {path = "../../../components/style_traits"}
url = {version = "1.0.0", features = ["heap_size"]}
url = {version = "1.2", features = ["heap_size"]}
util = {path = "../../../components/util"}