mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Update serde to 0.9 (fixes #15325)
This commit is contained in:
parent
26d6c96b18
commit
fe3f4ff0c2
73 changed files with 630 additions and 604 deletions
618
Cargo.lock
generated
618
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -11,7 +11,7 @@ workspace = "../.."
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
string_cache = {version = "0.3", features = ["heap_size"]}
|
||||
string_cache = {version = "0.4", features = ["heapsize"]}
|
||||
|
||||
[build-dependencies]
|
||||
string_cache_codegen = "0.3"
|
||||
|
|
|
@ -13,9 +13,9 @@ path = "lib.rs"
|
|||
bitflags = "0.7"
|
||||
bluetooth_traits = {path = "../bluetooth_traits"}
|
||||
device = {git = "https://github.com/servo/devices", features = ["bluetooth-test"]}
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
servo_rand = {path = "../rand"}
|
||||
uuid = {version = "0.3.1", features = ["v4"]}
|
||||
uuid = {version = "0.4", features = ["v4"]}
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
tinyfiledialogs = "2.5.9"
|
||||
|
|
|
@ -10,8 +10,8 @@ name = "bluetooth_traits"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
regex = "0.2"
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
servo_config = {path = "../config"}
|
||||
|
|
|
@ -12,13 +12,13 @@ path = "lib.rs"
|
|||
[dependencies]
|
||||
azure = {git = "https://github.com/servo/rust-azure", features = ["plugins"]}
|
||||
canvas_traits = {path = "../canvas_traits"}
|
||||
cssparser = {version = "0.9", features = ["heap_size", "serde-serialization"]}
|
||||
euclid = "0.10.1"
|
||||
cssparser = {version = "0.10", features = ["heapsize", "serde"]}
|
||||
euclid = "0.11"
|
||||
gleam = "0.2.8"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
log = "0.3.5"
|
||||
num-traits = "0.1.32"
|
||||
offscreen_gl_context = "0.5.0"
|
||||
offscreen_gl_context = "0.6"
|
||||
plugins = {path = "../plugins"}
|
||||
servo_config = {path = "../config"}
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@ name = "canvas_traits"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
cssparser = {version = "0.9", features = ["heap_size", "serde-serialization"]}
|
||||
euclid = "0.10.1"
|
||||
cssparser = {version = "0.10", features = ["heapsize", "serde"]}
|
||||
euclid = "0.11"
|
||||
heapsize = "0.3.0"
|
||||
heapsize_derive = "0.1"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
plugins = {path = "../plugins"}
|
||||
serde = {version = "0.8", features = ["unstable"]}
|
||||
serde_derive = "0.8"
|
||||
serde = {version = "0.9", features = ["unstable"]}
|
||||
serde_derive = "0.9"
|
||||
|
||||
[dependencies.webrender_traits]
|
||||
git = "https://github.com/servo/webrender"
|
||||
|
|
|
@ -10,11 +10,11 @@ name = "compositing"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
gleam = "0.2.8"
|
||||
image = "0.12"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
log = "0.3.5"
|
||||
msg = {path = "../msg"}
|
||||
net_traits = {path = "../net_traits"}
|
||||
|
|
|
@ -11,18 +11,18 @@ path = "lib.rs"
|
|||
|
||||
[features]
|
||||
# servo as opposed to geckolib
|
||||
servo = ["serde", "serde_derive", "url/heap_size", "url/serde", "plugins"]
|
||||
servo = ["plugins", "serde", "serde_derive", "servo_url/servo"]
|
||||
|
||||
[dependencies]
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
getopts = "0.2.11"
|
||||
lazy_static = "0.2"
|
||||
log = "0.3.5"
|
||||
num_cpus = "1.1.0"
|
||||
plugins = {path = "../plugins", optional = true}
|
||||
rustc-serialize = "0.3"
|
||||
serde = {version = "0.8", optional = true}
|
||||
serde_derive = {version = "0.8", optional = true}
|
||||
serde = {version = "0.9", optional = true}
|
||||
serde_derive = {version = "0.9", optional = true}
|
||||
servo_geometry = {path = "../geometry"}
|
||||
servo_url = {path = "../url"}
|
||||
url = "1.2"
|
||||
|
|
|
@ -17,20 +17,20 @@ canvas_traits = {path = "../canvas_traits"}
|
|||
compositing = {path = "../compositing"}
|
||||
debugger = {path = "../debugger"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
gfx = {path = "../gfx"}
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
layout_traits = {path = "../layout_traits"}
|
||||
log = "0.3.5"
|
||||
msg = {path = "../msg"}
|
||||
net_traits = {path = "../net_traits"}
|
||||
offscreen_gl_context = "0.5.0"
|
||||
offscreen_gl_context = "0.6"
|
||||
plugins = {path = "../plugins"}
|
||||
profile_traits = {path = "../profile_traits"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
style_traits = {path = "../style_traits"}
|
||||
servo_config = {path = "../config", features = ["servo"]}
|
||||
servo_rand = {path = "../rand"}
|
||||
|
|
|
@ -78,7 +78,7 @@ use event_loop::EventLoop;
|
|||
use frame::{Frame, FrameChange, FrameState, FrameTreeIterator, FullFrameTreeIterator};
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::SerializeError;
|
||||
use ipc_channel::Error;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use layout_traits::LayoutThreadFactory;
|
||||
|
@ -1228,7 +1228,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
|
|||
self.pipelines.remove(&pipeline_id);
|
||||
}
|
||||
|
||||
fn handle_send_error(&mut self, pipeline_id: PipelineId, err: SerializeError) {
|
||||
fn handle_send_error(&mut self, pipeline_id: PipelineId, err: Error) {
|
||||
// Treat send error the same as receiving a panic message
|
||||
debug!("Pipeline {:?} send error ({}).", pipeline_id, err);
|
||||
let top_level_frame_id = self.get_top_level_frame_for_pipeline(pipeline_id);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
//! view of a script thread. When an `EventLoop` is dropped, an `ExitScriptThread`
|
||||
//! message is sent to the script thread, asking it to shut down.
|
||||
|
||||
use ipc_channel::SerializeError;
|
||||
use ipc_channel::Error;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use script_traits::ConstellationControlMsg;
|
||||
use std::marker::PhantomData;
|
||||
|
@ -34,7 +34,7 @@ impl EventLoop {
|
|||
}
|
||||
|
||||
/// Send a message to the event loop.
|
||||
pub fn send(&self, msg: ConstellationControlMsg) -> Result<(), SerializeError> {
|
||||
pub fn send(&self, msg: ConstellationControlMsg) -> Result<(), Error> {
|
||||
self.script_chan.send(msg)
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ use euclid::scale_factor::ScaleFactor;
|
|||
use euclid::size::TypedSize2D;
|
||||
use event_loop::EventLoop;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use ipc_channel::SerializeError;
|
||||
use ipc_channel::Error;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use layout_traits::LayoutThreadFactory;
|
||||
|
@ -178,7 +178,7 @@ pub struct InitialPipelineState {
|
|||
impl Pipeline {
|
||||
/// Starts a layout thread, and possibly a script thread, in
|
||||
/// a new process if requested.
|
||||
pub fn spawn<Message, LTF, STF>(state: InitialPipelineState) -> Result<Pipeline, SerializeError>
|
||||
pub fn spawn<Message, LTF, STF>(state: InitialPipelineState) -> Result<Pipeline, Error>
|
||||
where LTF: LayoutThreadFactory<Message=Message>,
|
||||
STF: ScriptThreadFactory<Message=Message>
|
||||
{
|
||||
|
@ -523,7 +523,7 @@ impl UnprivilegedPipelineContent {
|
|||
}
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
pub fn spawn_multiprocess(self) -> Result<(), SerializeError> {
|
||||
pub fn spawn_multiprocess(self) -> Result<(), Error> {
|
||||
use gaol::sandbox::{self, Sandbox, SandboxMethods};
|
||||
use ipc_channel::ipc::IpcOneShotServer;
|
||||
use sandboxing::content_process_sandbox_profile;
|
||||
|
@ -571,7 +571,7 @@ impl UnprivilegedPipelineContent {
|
|||
}
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
pub fn spawn_multiprocess(self) -> Result<(), SerializeError> {
|
||||
pub fn spawn_multiprocess(self) -> Result<(), Error> {
|
||||
error!("Multiprocess is not supported on Windows.");
|
||||
process::exit(1);
|
||||
}
|
||||
|
|
|
@ -13,12 +13,12 @@ path = "lib.rs"
|
|||
devtools_traits = {path = "../devtools_traits"}
|
||||
encoding = "0.2"
|
||||
hyper = "0.9.9"
|
||||
hyper_serde = "0.1.4"
|
||||
ipc-channel = "0.6.3"
|
||||
hyper_serde = "0.5"
|
||||
ipc-channel = "0.7"
|
||||
log = "0.3.5"
|
||||
msg = {path = "../msg"}
|
||||
plugins = {path = "../plugins"}
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde_json = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
serde_json = "0.9"
|
||||
time = "0.1"
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
/// General actor system infrastructure.
|
||||
|
||||
use devtools_traits::PreciseTime;
|
||||
use serde_json::Value;
|
||||
use serde_json::{Map, Value};
|
||||
use std::any::Any;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::collections::{BTreeMap, HashMap};
|
||||
use std::collections::HashMap;
|
||||
use std::mem::replace;
|
||||
use std::net::TcpStream;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
@ -26,7 +26,7 @@ pub trait Actor: Any + ActorAsAny {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
msg: &BTreeMap<String, Value>,
|
||||
msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()>;
|
||||
fn name(&self) -> String;
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ impl ActorRegistry {
|
|||
/// Attempt to process a message as directed by its `to` property. If the actor is not
|
||||
/// found or does not indicate that it knew how to process the message, ignore the failure.
|
||||
pub fn handle_message(&mut self,
|
||||
msg: &BTreeMap<String, Value>,
|
||||
msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream)
|
||||
-> Result<(), ()> {
|
||||
let to = msg.get("to").unwrap().as_str().unwrap();
|
||||
|
|
|
@ -16,9 +16,8 @@ use devtools_traits::EvaluateJSReply::{NullValue, NumberValue, VoidValue};
|
|||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use protocol::JsonPacketStream;
|
||||
use serde_json::{self, Value};
|
||||
use serde_json::{self, Map, Number, Value};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::BTreeMap;
|
||||
use std::net::TcpStream;
|
||||
|
||||
trait EncodableConsoleMessage {
|
||||
|
@ -50,7 +49,7 @@ struct StartedListenersReply {
|
|||
#[derive(Serialize)]
|
||||
struct GetCachedMessagesReply {
|
||||
from: String,
|
||||
messages: Vec<BTreeMap<String, Value>>,
|
||||
messages: Vec<Map<String, Value>>,
|
||||
}
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
@ -98,7 +97,7 @@ impl Actor for ConsoleActor {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
msg: &BTreeMap<String, Value>,
|
||||
msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"getCachedMessages" => {
|
||||
|
@ -182,46 +181,46 @@ impl Actor for ConsoleActor {
|
|||
//TODO: extract conversion into protocol module or some other useful place
|
||||
let result = match try!(port.recv().map_err(|_| ())) {
|
||||
VoidValue => {
|
||||
let mut m = BTreeMap::new();
|
||||
m.insert("type".to_owned(), serde_json::to_value("undefined"));
|
||||
let mut m = Map::new();
|
||||
m.insert("type".to_owned(), Value::String("undefined".to_owned()));
|
||||
Value::Object(m)
|
||||
}
|
||||
NullValue => {
|
||||
let mut m = BTreeMap::new();
|
||||
m.insert("type".to_owned(), serde_json::to_value("null"));
|
||||
let mut m = Map::new();
|
||||
m.insert("type".to_owned(), Value::String("null".to_owned()));
|
||||
Value::Object(m)
|
||||
}
|
||||
BooleanValue(val) => Value::Bool(val),
|
||||
NumberValue(val) => {
|
||||
if val.is_nan() {
|
||||
let mut m = BTreeMap::new();
|
||||
m.insert("type".to_owned(), serde_json::to_value("NaN"));
|
||||
let mut m = Map::new();
|
||||
m.insert("type".to_owned(), Value::String("NaN".to_owned()));
|
||||
Value::Object(m)
|
||||
} else if val.is_infinite() {
|
||||
let mut m = BTreeMap::new();
|
||||
let mut m = Map::new();
|
||||
if val < 0. {
|
||||
m.insert("type".to_owned(), serde_json::to_value("-Infinity"));
|
||||
m.insert("type".to_owned(), Value::String("-Infinity".to_owned()));
|
||||
} else {
|
||||
m.insert("type".to_owned(), serde_json::to_value("Infinity"));
|
||||
m.insert("type".to_owned(), Value::String("Infinity".to_owned()));
|
||||
}
|
||||
Value::Object(m)
|
||||
} else if val == 0. && val.is_sign_negative() {
|
||||
let mut m = BTreeMap::new();
|
||||
m.insert("type".to_owned(), serde_json::to_value("-0"));
|
||||
let mut m = Map::new();
|
||||
m.insert("type".to_owned(), Value::String("-0".to_owned()));
|
||||
Value::Object(m)
|
||||
} else {
|
||||
serde_json::to_value(&val)
|
||||
Value::Number(Number::from_f64(val).unwrap())
|
||||
}
|
||||
}
|
||||
StringValue(s) => Value::String(s),
|
||||
ActorValue { class, uuid } => {
|
||||
//TODO: make initial ActorValue message include these properties?
|
||||
let mut m = BTreeMap::new();
|
||||
let mut m = Map::new();
|
||||
let actor = ObjectActor::new(registry, uuid);
|
||||
|
||||
m.insert("type".to_owned(), serde_json::to_value("object"));
|
||||
m.insert("class".to_owned(), serde_json::to_value(&class));
|
||||
m.insert("actor".to_owned(), serde_json::to_value(&actor));
|
||||
m.insert("type".to_owned(), Value::String("object".to_owned()));
|
||||
m.insert("class".to_owned(), Value::String(class));
|
||||
m.insert("actor".to_owned(), Value::String(actor));
|
||||
m.insert("extensible".to_owned(), Value::Bool(true));
|
||||
m.insert("frozen".to_owned(), Value::Bool(false));
|
||||
m.insert("sealed".to_owned(), Value::Bool(false));
|
||||
|
@ -235,9 +234,9 @@ impl Actor for ConsoleActor {
|
|||
input: input,
|
||||
result: result,
|
||||
timestamp: 0,
|
||||
exception: Value::Object(BTreeMap::new()),
|
||||
exception: Value::Object(Map::new()),
|
||||
exceptionMessage: "".to_owned(),
|
||||
helperResult: Value::Object(BTreeMap::new()),
|
||||
helperResult: Value::Object(Map::new()),
|
||||
};
|
||||
stream.write_json_packet(&msg);
|
||||
ActorMessageStatus::Processed
|
||||
|
|
|
@ -7,8 +7,7 @@ use actors::timeline::HighResolutionStamp;
|
|||
use devtools_traits::DevtoolScriptControlMsg;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
use serde_json::{Map, Value};
|
||||
use std::mem;
|
||||
use std::net::TcpStream;
|
||||
use time::precise_time_ns;
|
||||
|
@ -31,7 +30,7 @@ impl Actor for FramerateActor {
|
|||
fn handle_message(&self,
|
||||
_registry: &ActorRegistry,
|
||||
_msg_type: &str,
|
||||
_msg: &BTreeMap<String, Value>,
|
||||
_msg: &Map<String, Value>,
|
||||
_stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(ActorMessageStatus::Ignored)
|
||||
}
|
||||
|
|
|
@ -12,9 +12,8 @@ use devtools_traits::DevtoolScriptControlMsg::{GetLayout, ModifyAttribute};
|
|||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use msg::constellation_msg::PipelineId;
|
||||
use protocol::JsonPacketStream;
|
||||
use serde_json::{self, Value};
|
||||
use serde_json::{self, Map, Value};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::BTreeMap;
|
||||
use std::net::TcpStream;
|
||||
|
||||
pub struct InspectorActor {
|
||||
|
@ -65,7 +64,7 @@ impl Actor for HighlighterActor {
|
|||
fn handle_message(&self,
|
||||
_registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
_msg: &BTreeMap<String, Value>,
|
||||
_msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"showBoxModel" => {
|
||||
|
@ -102,7 +101,7 @@ impl Actor for NodeActor {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
msg: &BTreeMap<String, Value>,
|
||||
msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"modifyAttributes" => {
|
||||
|
@ -276,7 +275,7 @@ impl Actor for WalkerActor {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
msg: &BTreeMap<String, Value>,
|
||||
msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"querySelector" => {
|
||||
|
@ -451,7 +450,7 @@ impl Actor for PageStyleActor {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
msg: &BTreeMap<String, Value>,
|
||||
msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"getApplied" => {
|
||||
|
@ -503,7 +502,7 @@ impl Actor for PageStyleActor {
|
|||
zIndex: zIndex,
|
||||
boxSizing: boxSizing,
|
||||
autoMargins: if auto_margins {
|
||||
let mut m = BTreeMap::new();
|
||||
let mut m = Map::new();
|
||||
let auto = serde_json::value::Value::String("auto".to_owned());
|
||||
if autoMargins.top { m.insert("top".to_owned(), auto.clone()); }
|
||||
if autoMargins.right { m.insert("right".to_owned(), auto.clone()); }
|
||||
|
@ -547,7 +546,7 @@ impl Actor for InspectorActor {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
_msg: &BTreeMap<String, Value>,
|
||||
_msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"getWalker" => {
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
@ -32,7 +31,7 @@ impl Actor for MemoryActor {
|
|||
fn handle_message(&self,
|
||||
_registry: &ActorRegistry,
|
||||
_msg_type: &str,
|
||||
_msg: &BTreeMap<String, Value>,
|
||||
_msg: &Map<String, Value>,
|
||||
_stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(ActorMessageStatus::Ignored)
|
||||
}
|
||||
|
|
|
@ -16,9 +16,8 @@ use hyper::header::Headers;
|
|||
use hyper::http::RawStatus;
|
||||
use hyper::method::Method;
|
||||
use protocol::JsonPacketStream;
|
||||
use serde_json::Value;
|
||||
use serde_json::{Map, Value};
|
||||
use std::borrow::Cow;
|
||||
use std::collections::BTreeMap;
|
||||
use std::net::TcpStream;
|
||||
use time;
|
||||
use time::Tm;
|
||||
|
@ -185,7 +184,7 @@ impl Actor for NetworkEventActor {
|
|||
fn handle_message(&self,
|
||||
_registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
_msg: &BTreeMap<String, Value>,
|
||||
_msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"getRequestHeaders" => {
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
pub struct ObjectActor {
|
||||
|
@ -19,7 +18,7 @@ impl Actor for ObjectActor {
|
|||
fn handle_message(&self,
|
||||
_: &ActorRegistry,
|
||||
_: &str,
|
||||
_: &BTreeMap<String, Value>,
|
||||
_: &Map<String, Value>,
|
||||
_: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(ActorMessageStatus::Ignored)
|
||||
}
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
use actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use protocol::{ActorDescription, JsonPacketStream, Method};
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
pub struct PerformanceActor {
|
||||
|
@ -55,7 +54,7 @@ impl Actor for PerformanceActor {
|
|||
fn handle_message(&self,
|
||||
_registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
_msg: &BTreeMap<String, Value>,
|
||||
_msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"connect" => {
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
pub struct ProfilerActor {
|
||||
|
@ -19,7 +18,7 @@ impl Actor for ProfilerActor {
|
|||
fn handle_message(&self,
|
||||
_registry: &ActorRegistry,
|
||||
_msg_type: &str,
|
||||
_msg: &BTreeMap<String, Value>,
|
||||
_msg: &Map<String, Value>,
|
||||
_stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(ActorMessageStatus::Ignored)
|
||||
}
|
||||
|
|
|
@ -11,8 +11,7 @@ use actor::{Actor, ActorMessageStatus, ActorRegistry};
|
|||
use actors::performance::PerformanceActor;
|
||||
use actors::tab::{TabActor, TabActorMsg};
|
||||
use protocol::{ActorDescription, JsonPacketStream};
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
@ -69,7 +68,7 @@ impl Actor for RootActor {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
_msg: &BTreeMap<String, Value>,
|
||||
_msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"listAddons" => {
|
||||
|
|
|
@ -11,8 +11,7 @@ use actor::{Actor, ActorMessageStatus, ActorRegistry};
|
|||
use actors::console::ConsoleActor;
|
||||
use devtools_traits::DevtoolScriptControlMsg::{self, WantsLiveNotifications};
|
||||
use protocol::JsonPacketStream;
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
@ -88,7 +87,7 @@ impl Actor for TabActor {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
msg: &BTreeMap<String, Value>,
|
||||
msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"reconfigure" => {
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
use actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use protocol::JsonPacketStream;
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
#[derive(Serialize)]
|
||||
|
@ -68,7 +67,7 @@ impl Actor for ThreadActor {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
_msg: &BTreeMap<String, Value>,
|
||||
_msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"attach" => {
|
||||
|
|
|
@ -12,9 +12,8 @@ use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
|||
use msg::constellation_msg::PipelineId;
|
||||
use protocol::JsonPacketStream;
|
||||
use serde::{Serialize, Serializer};
|
||||
use serde_json::Value;
|
||||
use serde_json::{Map, Value};
|
||||
use std::cell::RefCell;
|
||||
use std::collections::BTreeMap;
|
||||
use std::net::TcpStream;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
|
@ -115,7 +114,7 @@ impl HighResolutionStamp {
|
|||
}
|
||||
|
||||
impl Serialize for HighResolutionStamp {
|
||||
fn serialize<S: Serializer>(&self, s: &mut S) -> Result<(), S::Error> {
|
||||
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
|
||||
self.0.serialize(s)
|
||||
}
|
||||
}
|
||||
|
@ -175,7 +174,7 @@ impl Actor for TimelineActor {
|
|||
fn handle_message(&self,
|
||||
registry: &ActorRegistry,
|
||||
msg_type: &str,
|
||||
msg: &BTreeMap<String, Value>,
|
||||
msg: &Map<String, Value>,
|
||||
stream: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(match msg_type {
|
||||
"start" => {
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
use actor::{Actor, ActorMessageStatus, ActorRegistry};
|
||||
use devtools_traits::WorkerId;
|
||||
use serde_json::Value;
|
||||
use std::collections::BTreeMap;
|
||||
use serde_json::{Map, Value};
|
||||
use std::net::TcpStream;
|
||||
|
||||
pub struct WorkerActor {
|
||||
|
@ -21,7 +20,7 @@ impl Actor for WorkerActor {
|
|||
fn handle_message(&self,
|
||||
_: &ActorRegistry,
|
||||
_: &str,
|
||||
_: &BTreeMap<String, Value>,
|
||||
_: &Map<String, Value>,
|
||||
_: &mut TcpStream) -> Result<ActorMessageStatus, ()> {
|
||||
Ok(ActorMessageStatus::Processed)
|
||||
}
|
||||
|
|
|
@ -40,9 +40,9 @@ impl JsonPacketStream for TcpStream {
|
|||
}
|
||||
|
||||
fn write_merged_json_packet<T: Serialize, U: Serialize>(&mut self, base: &T, extra: &U) {
|
||||
let mut obj = serde_json::to_value(base);
|
||||
let mut obj = serde_json::to_value(base).unwrap();
|
||||
let obj = obj.as_object_mut().unwrap();
|
||||
let extra = serde_json::to_value(extra);
|
||||
let extra = serde_json::to_value(extra).unwrap();
|
||||
let extra = extra.as_object().unwrap();
|
||||
|
||||
for (key, value) in extra {
|
||||
|
@ -79,14 +79,7 @@ impl JsonPacketStream for TcpStream {
|
|||
debug!("{}", packet);
|
||||
return match serde_json::from_str(&packet) {
|
||||
Ok(json) => Ok(Some(json)),
|
||||
Err(err) => match err {
|
||||
serde_json::Error::Io(ioerr) => {
|
||||
return Err(ioerr.description().to_owned())
|
||||
},
|
||||
serde_json::Error::Syntax(_, l, c) => {
|
||||
return Err(format!("syntax at {}:{}", l, c))
|
||||
},
|
||||
},
|
||||
Err(err) => Err(err.description().to_owned()),
|
||||
};
|
||||
},
|
||||
c => buffer.push(c),
|
||||
|
|
|
@ -14,10 +14,10 @@ bitflags = "0.7"
|
|||
heapsize = "0.3.0"
|
||||
heapsize_derive = "0.1"
|
||||
hyper = "0.9.9"
|
||||
hyper_serde = "0.1.4"
|
||||
ipc-channel = "0.6.3"
|
||||
hyper_serde = "0.5"
|
||||
ipc-channel = "0.7"
|
||||
msg = {path = "../msg"}
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
servo_url = {path = "../url"}
|
||||
time = "0.1"
|
||||
|
|
|
@ -11,9 +11,9 @@ path = "lib.rs"
|
|||
|
||||
[features]
|
||||
# servo as opposed to geckolib
|
||||
servo = ["app_units/plugins", "euclid/unstable"]
|
||||
servo = ["euclid/unstable"]
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
euclid = "0.10.1"
|
||||
app_units = "0.4"
|
||||
euclid = "0.11"
|
||||
heapsize = "0.3.0"
|
||||
|
|
|
@ -11,16 +11,16 @@ name = "gfx"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
app_units = "0.4"
|
||||
bitflags = "0.7"
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
fnv = "1.0"
|
||||
fontsan = {git = "https://github.com/servo/fontsan"}
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
harfbuzz-sys = "0.1"
|
||||
heapsize = "0.3.0"
|
||||
heapsize_derive = "0.1"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
lazy_static = "0.2"
|
||||
libc = "0.2"
|
||||
log = "0.3.5"
|
||||
|
@ -29,8 +29,8 @@ net_traits = {path = "../net_traits"}
|
|||
ordered-float = "0.4"
|
||||
plugins = {path = "../plugins"}
|
||||
range = {path = "../range"}
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
servo_atoms = {path = "../atoms"}
|
||||
servo_geometry = {path = "../geometry"}
|
||||
servo_url = {path = "../url"}
|
||||
|
@ -49,8 +49,8 @@ features = ["serde_derive", "ipc"]
|
|||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
byteorder = "1.0"
|
||||
core-foundation = "0.3"
|
||||
core-graphics = "0.6"
|
||||
core-text = "3.0"
|
||||
core-graphics = "0.7"
|
||||
core-text = "4.0"
|
||||
|
||||
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
|
||||
freetype = "0.2"
|
||||
|
@ -60,5 +60,5 @@ servo-fontconfig = "0.2.1"
|
|||
simd = "0.2.0"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
dwrote = "0.1.5"
|
||||
dwrote = {git = "https://github.com/servo/dwrote-rs.git", rev = "servo"}
|
||||
truetype = "0.26"
|
||||
|
|
|
@ -13,6 +13,7 @@ use servo_atoms::Atom;
|
|||
use servo_url::ServoUrl;
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::HashMap;
|
||||
use std::fmt;
|
||||
use std::fs::File;
|
||||
use std::io::{Read, Error as IoError};
|
||||
use std::ops::Deref;
|
||||
|
@ -121,21 +122,25 @@ impl Deref for CachedCTFont {
|
|||
}
|
||||
|
||||
impl Serialize for CachedCTFont {
|
||||
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error> where S: Serializer {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer {
|
||||
serializer.serialize_none()
|
||||
}
|
||||
}
|
||||
|
||||
impl Deserialize for CachedCTFont {
|
||||
fn deserialize<D>(deserializer: &mut D) -> Result<CachedCTFont, D::Error>
|
||||
fn deserialize<D>(deserializer: D) -> Result<CachedCTFont, D::Error>
|
||||
where D: Deserializer {
|
||||
struct NoneOptionVisitor;
|
||||
|
||||
impl Visitor for NoneOptionVisitor {
|
||||
type Value = CachedCTFont;
|
||||
|
||||
fn expecting(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(fmt, "none")
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn visit_none<E>(&mut self) -> Result<CachedCTFont, E> where E: Error {
|
||||
fn visit_none<E>(self) -> Result<CachedCTFont, E> where E: Error {
|
||||
Ok(CachedCTFont(Mutex::new(HashMap::new())))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ heapsize = "0.3.0"
|
|||
heapsize_derive = "0.1"
|
||||
plugins = {path = "../plugins"}
|
||||
range = {path = "../range"}
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
|
|
|
@ -10,18 +10,18 @@ name = "layout"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
app_units = "0.4"
|
||||
atomic_refcell = "0.1"
|
||||
bitflags = "0.7"
|
||||
canvas_traits = {path = "../canvas_traits"}
|
||||
cssparser = {version = "0.9", features = ["heap_size", "serde-serialization"]}
|
||||
euclid = "0.10.1"
|
||||
cssparser = {version = "0.10", features = ["heapsize", "serde"]}
|
||||
euclid = "0.11"
|
||||
fnv = "1.0"
|
||||
gfx = {path = "../gfx"}
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
heapsize = "0.3.0"
|
||||
html5ever-atoms = "0.1"
|
||||
ipc-channel = "0.6.3"
|
||||
html5ever-atoms = "0.2"
|
||||
ipc-channel = "0.7"
|
||||
libc = "0.2"
|
||||
log = "0.3.5"
|
||||
msg = {path = "../msg"}
|
||||
|
@ -35,10 +35,10 @@ rayon = "0.6"
|
|||
script_layout_interface = {path = "../script_layout_interface"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
selectors = { path = "../selectors" }
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
servo_geometry = {path = "../geometry"}
|
||||
serde_json = "0.8"
|
||||
serde_json = "0.9"
|
||||
servo_config = {path = "../config"}
|
||||
servo_url = {path = "../url"}
|
||||
smallvec = "0.1"
|
||||
|
|
|
@ -524,7 +524,7 @@ bitflags! {
|
|||
}
|
||||
|
||||
impl Serialize for BlockFlowFlags {
|
||||
fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
self.bits().serialize(serializer)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ use inline::InlineFlow;
|
|||
use model::{CollapsibleMargins, IntrinsicISizes, MarginCollapseInfo};
|
||||
use multicol::MulticolFlow;
|
||||
use parallel::FlowParallelInfo;
|
||||
use serde::{Serialize, Serializer};
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use servo_geometry::{au_rect_to_f32_rect, f32_rect_to_au_rect};
|
||||
use std::{fmt, mem, raw};
|
||||
use std::iter::Zip;
|
||||
|
@ -1013,16 +1013,16 @@ impl fmt::Debug for BaseFlow {
|
|||
}
|
||||
|
||||
impl Serialize for BaseFlow {
|
||||
fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error> {
|
||||
let mut state = try!(serializer.serialize_struct("base", 5));
|
||||
try!(serializer.serialize_struct_elt(&mut state, "id", self.debug_id()));
|
||||
try!(serializer.serialize_struct_elt(&mut state, "stacking_relative_position",
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let mut serializer = try!(serializer.serialize_struct("base", 5));
|
||||
try!(serializer.serialize_field("id", &self.debug_id()));
|
||||
try!(serializer.serialize_field("stacking_relative_position",
|
||||
&self.stacking_relative_position));
|
||||
try!(serializer.serialize_struct_elt(&mut state, "intrinsic_inline_sizes",
|
||||
try!(serializer.serialize_field("intrinsic_inline_sizes",
|
||||
&self.intrinsic_inline_sizes));
|
||||
try!(serializer.serialize_struct_elt(&mut state, "position", &self.position));
|
||||
try!(serializer.serialize_struct_elt(&mut state, "children", &self.children));
|
||||
serializer.serialize_struct_end(state)
|
||||
try!(serializer.serialize_field("position", &self.position));
|
||||
try!(serializer.serialize_field("children", &self.children));
|
||||
serializer.end()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,9 +4,8 @@
|
|||
|
||||
use flow::{Flow, FlowClass};
|
||||
use flow_ref::FlowRef;
|
||||
use serde::{Serialize, Serializer};
|
||||
use serde_json::{to_value, Value};
|
||||
use serde_json::builder::ObjectBuilder;
|
||||
use serde::ser::{Serialize, SerializeSeq, Serializer};
|
||||
use serde_json::{Map, Value, to_value};
|
||||
use std::collections::{LinkedList, linked_list};
|
||||
use std::sync::Arc;
|
||||
|
||||
|
@ -24,30 +23,29 @@ pub struct FlowList {
|
|||
}
|
||||
|
||||
impl Serialize for FlowList {
|
||||
fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error> {
|
||||
let mut state = try!(serializer.serialize_seq(Some(self.len())));
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let mut serializer = try!(serializer.serialize_seq(Some(self.len())));
|
||||
for f in self.iter() {
|
||||
let flow_val = ObjectBuilder::new()
|
||||
.insert("class", f.class())
|
||||
.insert("data", match f.class() {
|
||||
FlowClass::Block => to_value(f.as_block()),
|
||||
FlowClass::Inline => to_value(f.as_inline()),
|
||||
FlowClass::Table => to_value(f.as_table()),
|
||||
FlowClass::TableWrapper => to_value(f.as_table_wrapper()),
|
||||
FlowClass::TableRowGroup => to_value(f.as_table_rowgroup()),
|
||||
FlowClass::TableRow => to_value(f.as_table_row()),
|
||||
FlowClass::TableCell => to_value(f.as_table_cell()),
|
||||
FlowClass::Flex => to_value(f.as_flex()),
|
||||
let mut flow_val = Map::new();
|
||||
flow_val.insert("class".to_owned(), to_value(f.class()).unwrap());
|
||||
let data = match f.class() {
|
||||
FlowClass::Block => to_value(f.as_block()).unwrap(),
|
||||
FlowClass::Inline => to_value(f.as_inline()).unwrap(),
|
||||
FlowClass::Table => to_value(f.as_table()).unwrap(),
|
||||
FlowClass::TableWrapper => to_value(f.as_table_wrapper()).unwrap(),
|
||||
FlowClass::TableRowGroup => to_value(f.as_table_rowgroup()).unwrap(),
|
||||
FlowClass::TableRow => to_value(f.as_table_row()).unwrap(),
|
||||
FlowClass::TableCell => to_value(f.as_table_cell()).unwrap(),
|
||||
FlowClass::Flex => to_value(f.as_flex()).unwrap(),
|
||||
FlowClass::ListItem | FlowClass::TableColGroup | FlowClass::TableCaption |
|
||||
FlowClass::Multicol | FlowClass::MulticolColumn => {
|
||||
Value::Null // Not implemented yet
|
||||
}
|
||||
})
|
||||
.build();
|
||||
|
||||
try!(serializer.serialize_seq_elt(&mut state, flow_val));
|
||||
};
|
||||
flow_val.insert("data".to_owned(), data);
|
||||
try!(serializer.serialize_element(&flow_val));
|
||||
}
|
||||
serializer.serialize_seq_end(state)
|
||||
serializer.end()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ use range::*;
|
|||
use script_layout_interface::HTMLCanvasData;
|
||||
use script_layout_interface::SVGSVGData;
|
||||
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
|
||||
use serde::{Serialize, Serializer};
|
||||
use serde::ser::{Serialize, SerializeStruct, Serializer};
|
||||
use servo_url::ServoUrl;
|
||||
use std::{f32, fmt};
|
||||
use std::borrow::ToOwned;
|
||||
|
@ -142,12 +142,12 @@ pub struct Fragment {
|
|||
}
|
||||
|
||||
impl Serialize for Fragment {
|
||||
fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error> {
|
||||
let mut state = try!(serializer.serialize_struct("fragment", 3));
|
||||
try!(serializer.serialize_struct_elt(&mut state, "id", &self.debug_id));
|
||||
try!(serializer.serialize_struct_elt(&mut state, "border_box", &self.border_box));
|
||||
try!(serializer.serialize_struct_elt(&mut state, "margin", &self.margin));
|
||||
serializer.serialize_struct_end(state)
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let mut serializer = try!(serializer.serialize_struct("fragment", 3));
|
||||
try!(serializer.serialize_field("id", &self.debug_id));
|
||||
try!(serializer.serialize_field("border_box", &self.border_box));
|
||||
try!(serializer.serialize_field("margin", &self.margin));
|
||||
serializer.end()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3179,14 +3179,14 @@ impl fmt::Display for DebugId {
|
|||
|
||||
#[cfg(not(debug_assertions))]
|
||||
impl Serialize for DebugId {
|
||||
fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
serializer.serialize_str(&format!("{:p}", &self))
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
impl Serialize for DebugId {
|
||||
fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
serializer.serialize_u16(self.0)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ impl Scope {
|
|||
pub fn new(name: String) -> Scope {
|
||||
STATE_KEY.with(|ref r| {
|
||||
if let Some(ref mut state) = *r.borrow_mut() {
|
||||
let flow_trace = to_value(&flow::base(&*state.flow_root));
|
||||
let flow_trace = to_value(&flow::base(&*state.flow_root)).unwrap();
|
||||
let data = box ScopeData::new(name.clone(), flow_trace);
|
||||
state.scope_stack.push(data);
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ impl Drop for Scope {
|
|||
STATE_KEY.with(|ref r| {
|
||||
if let Some(ref mut state) = *r.borrow_mut() {
|
||||
let mut current_scope = state.scope_stack.pop().unwrap();
|
||||
current_scope.post = to_value(&flow::base(&*state.flow_root));
|
||||
current_scope.post = to_value(&flow::base(&*state.flow_root)).unwrap();
|
||||
let previous_scope = state.scope_stack.last_mut().unwrap();
|
||||
previous_scope.children.push(current_scope);
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ pub fn begin_trace(flow_root: FlowRef) {
|
|||
assert!(STATE_KEY.with(|ref r| r.borrow().is_none()));
|
||||
|
||||
STATE_KEY.with(|ref r| {
|
||||
let flow_trace = to_value(&flow::base(&*flow_root));
|
||||
let flow_trace = to_value(&flow::base(&*flow_root)).unwrap();
|
||||
let state = State {
|
||||
scope_stack: vec![box ScopeData::new("root".to_owned(), flow_trace)],
|
||||
flow_root: flow_root.clone(),
|
||||
|
@ -116,7 +116,7 @@ pub fn end_trace(generation: u32) {
|
|||
let mut thread_state = STATE_KEY.with(|ref r| r.borrow_mut().take().unwrap());
|
||||
assert!(thread_state.scope_stack.len() == 1);
|
||||
let mut root_scope = thread_state.scope_stack.pop().unwrap();
|
||||
root_scope.post = to_value(&flow::base(&*thread_state.flow_root));
|
||||
root_scope.post = to_value(&flow::base(&*thread_state.flow_root)).unwrap();
|
||||
|
||||
let result = to_string(&root_scope).unwrap();
|
||||
let mut file = File::create(format!("layout_trace-{}.json", generation)).unwrap();
|
||||
|
|
|
@ -69,7 +69,7 @@ pub struct TableRowFlow {
|
|||
}
|
||||
|
||||
impl Serialize for TableRowFlow {
|
||||
fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
self.block_flow.serialize(serializer)
|
||||
}
|
||||
}
|
||||
|
@ -578,8 +578,8 @@ pub struct CollapsedBorder {
|
|||
}
|
||||
|
||||
impl Serialize for CollapsedBorder {
|
||||
fn serialize<S: Serializer>(&self, _: &mut S) -> Result<(), S::Error> {
|
||||
Ok(())
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
serializer.serialize_unit()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ pub struct TableRowGroupFlow {
|
|||
}
|
||||
|
||||
impl Serialize for TableRowGroupFlow {
|
||||
fn serialize<S: Serializer>(&self, serializer: &mut S) -> Result<(), S::Error> {
|
||||
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
self.block_flow.serialize(serializer)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,13 +10,13 @@ name = "layout_thread"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
euclid = "0.10.1"
|
||||
app_units = "0.4"
|
||||
euclid = "0.11"
|
||||
fnv = "1.0"
|
||||
gfx = {path = "../gfx"}
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
heapsize = "0.3.0"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
layout = {path = "../layout"}
|
||||
layout_traits = {path = "../layout_traits"}
|
||||
lazy_static = "0.2"
|
||||
|
@ -31,8 +31,8 @@ script = {path = "../script"}
|
|||
script_layout_interface = {path = "../script_layout_interface"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
selectors = { path = "../selectors" }
|
||||
serde_derive = "0.8"
|
||||
serde_json = "0.8"
|
||||
serde_derive = "0.9"
|
||||
serde_json = "0.9"
|
||||
servo_config = {path = "../config"}
|
||||
servo_geometry = {path = "../geometry"}
|
||||
servo_url = {path = "../url"}
|
||||
|
|
|
@ -11,7 +11,7 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
gfx = {path = "../gfx"}
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
msg = {path = "../msg"}
|
||||
net_traits = {path = "../net_traits"}
|
||||
profile_traits = {path = "../profile_traits"}
|
||||
|
|
|
@ -11,12 +11,12 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
bitflags = "0.7"
|
||||
cssparser = {version = "0.9", features = ["heap_size", "serde-serialization"]}
|
||||
cssparser = {version = "0.10", features = ["heapsize", "serde"]}
|
||||
heapsize = "0.3.0"
|
||||
heapsize_derive = "0.1"
|
||||
plugins = {path = "../plugins"}
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
|
||||
[dependencies.webrender_traits]
|
||||
git = "https://github.com/servo/webrender"
|
||||
|
|
|
@ -11,14 +11,14 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
brotli = "1.0.6"
|
||||
content-blocker = "0.2.1"
|
||||
content-blocker = "0.2.3"
|
||||
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
flate2 = "0.2.0"
|
||||
hyper = "0.9.9"
|
||||
hyper_serde = "0.1.4"
|
||||
hyper_serde = "0.5"
|
||||
immeta = "0.3.1"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
lazy_static = "0.2"
|
||||
log = "0.3.5"
|
||||
matches = "0.1"
|
||||
|
@ -37,7 +37,7 @@ threadpool = "1.0"
|
|||
time = "0.1.17"
|
||||
unicase = "1.4.0"
|
||||
url = {version = "1.2", features = ["heap_size", "rustc-serialize"]}
|
||||
uuid = {version = "0.3.1", features = ["v4"]}
|
||||
uuid = {version = "0.4", features = ["v4"]}
|
||||
websocket = "0.17"
|
||||
|
||||
[dependencies.webrender_traits]
|
||||
|
|
|
@ -14,19 +14,19 @@ cookie = {version = "0.2.5", features = ["serialize-rustc"]}
|
|||
heapsize = "0.3.0"
|
||||
heapsize_derive = "0.1"
|
||||
hyper = "0.9.9"
|
||||
hyper_serde = "0.1.4"
|
||||
hyper_serde = "0.5"
|
||||
image = "0.12"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
lazy_static = "0.2"
|
||||
log = "0.3.5"
|
||||
msg = {path = "../msg"}
|
||||
num-traits = "0.1.32"
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
servo_config = {path = "../config", features = ["servo"]}
|
||||
servo_url = {path = "../url", features = ["servo"]}
|
||||
url = {version = "1.2", features = ["heap_size"]}
|
||||
uuid = { version = "0.3.1", features = ["v4", "serde"] }
|
||||
uuid = {version = "0.4", features = ["v4", "serde"]}
|
||||
websocket = "0.17"
|
||||
|
||||
[dependencies.webrender_traits]
|
||||
|
|
|
@ -39,7 +39,7 @@ use hyper::header::{ContentType, Headers, ReferrerPolicy as ReferrerPolicyHeader
|
|||
use hyper::http::RawStatus;
|
||||
use hyper::mime::{Attr, Mime};
|
||||
use hyper_serde::Serde;
|
||||
use ipc_channel::SerializeError;
|
||||
use ipc_channel::Error;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use request::{Request, RequestInit};
|
||||
|
@ -266,7 +266,7 @@ impl<T: FetchResponseListener> Action<T> for FetchResponseMsg {
|
|||
/// Handle to a resource thread
|
||||
pub type CoreResourceThread = IpcSender<CoreResourceMsg>;
|
||||
|
||||
pub type IpcSendResult = Result<(), SerializeError>;
|
||||
pub type IpcSendResult = Result<(), Error>;
|
||||
|
||||
/// Abstraction of the ability to send a particular type of message,
|
||||
/// used by net_traits::ResourceThreads to ease the use its IpcSender sub-fields
|
||||
|
|
|
@ -12,12 +12,12 @@ path = "lib.rs"
|
|||
[dependencies]
|
||||
profile_traits = {path = "../profile_traits"}
|
||||
plugins = {path = "../plugins"}
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
heartbeats-simple = "0.4"
|
||||
log = "0.3.5"
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde_json = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
serde_json = "0.9"
|
||||
servo_config = {path = "../config", features = ["servo"]}
|
||||
time = "0.1.12"
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@ energy-profiling = ["energymon", "energy-monitor"]
|
|||
[dependencies]
|
||||
energy-monitor = {version = "0.2.0", optional = true}
|
||||
energymon = {git = "https://github.com/energymon/energymon-rust.git", optional = true}
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
log = "0.3.5"
|
||||
plugins = {path = "../plugins"}
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
servo_config = {path = "../config"}
|
||||
signpost = {git = "https://github.com/pcwalton/signpost.git"}
|
||||
time = "0.1.12"
|
||||
|
|
|
@ -14,5 +14,5 @@ path = "lib.rs"
|
|||
heapsize = "0.3.0"
|
||||
heapsize_derive = "0.1"
|
||||
num-traits = "0.1.32"
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
|
|
|
@ -18,14 +18,14 @@ debugmozjs = ['js/debugmozjs']
|
|||
cmake = "0.1"
|
||||
phf_codegen = "0.7.18"
|
||||
phf_shared = "0.7.18"
|
||||
serde_json = "0.8"
|
||||
serde_json = "0.9"
|
||||
|
||||
[target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies]
|
||||
tinyfiledialogs = "2.5.9"
|
||||
|
||||
[dependencies]
|
||||
angle = {git = "https://github.com/servo/angle", branch = "servo"}
|
||||
app_units = "0.3"
|
||||
app_units = "0.4"
|
||||
audio-video-metadata = "0.1.2"
|
||||
atomic_refcell = "0.1"
|
||||
bitflags = "0.7"
|
||||
|
@ -34,22 +34,22 @@ byteorder = "1.0"
|
|||
canvas_traits = {path = "../canvas_traits"}
|
||||
caseless = "0.1.0"
|
||||
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
|
||||
cssparser = {version = "0.9", features = ["heap_size", "serde-serialization"]}
|
||||
cssparser = {version = "0.10", features = ["heapsize", "serde"]}
|
||||
deny_public_fields = {path = "../deny_public_fields"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
domobject_derive = {path = "../domobject_derive"}
|
||||
encoding = "0.2"
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
fnv = "1.0"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
heapsize = "0.3.6"
|
||||
heapsize_derive = "0.1"
|
||||
html5ever = {version = "0.12.1", features = ["heap_size", "unstable"]}
|
||||
html5ever-atoms = {version = "0.1", features = ["heap_size"]}
|
||||
html5ever = {version = "0.13", features = ["heap_size", "unstable"]}
|
||||
html5ever-atoms = {version = "0.2", features = ["heap_size"]}
|
||||
hyper = "0.9.9"
|
||||
hyper_serde = "0.1.4"
|
||||
hyper_serde = "0.5"
|
||||
image = "0.12"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
js = {git = "https://github.com/servo/rust-mozjs", features = ["promises"]}
|
||||
jstraceable_derive = {path = "../jstraceable_derive"}
|
||||
libc = "0.2"
|
||||
|
@ -59,7 +59,7 @@ mime_guess = "1.8.0"
|
|||
msg = {path = "../msg"}
|
||||
net_traits = {path = "../net_traits"}
|
||||
num-traits = "0.1.32"
|
||||
offscreen_gl_context = "0.5.0"
|
||||
offscreen_gl_context = "0.6"
|
||||
open = "1.1.1"
|
||||
parking_lot = "0.3"
|
||||
phf = "0.7.18"
|
||||
|
@ -74,7 +74,7 @@ script_layout_interface = {path = "../script_layout_interface"}
|
|||
script_plugins = {path = "../script_plugins"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
selectors = { path = "../selectors" }
|
||||
serde = "0.8"
|
||||
serde = "0.9"
|
||||
servo_atoms = {path = "../atoms"}
|
||||
servo_config = {path = "../config", features = ["servo"] }
|
||||
servo_geometry = {path = "../geometry" }
|
||||
|
@ -85,9 +85,9 @@ style = {path = "../style"}
|
|||
style_traits = {path = "../style_traits"}
|
||||
time = "0.1.12"
|
||||
url = {version = "1.2", features = ["heap_size", "query_encoding"]}
|
||||
uuid = {version = "0.3.1", features = ["v4"]}
|
||||
uuid = {version = "0.4", features = ["v4"]}
|
||||
websocket = "0.17"
|
||||
xml5ever = {version = "0.3.1", features = ["unstable"]}
|
||||
xml5ever = {version = "0.4", features = ["unstable"]}
|
||||
webvr = {path = "../webvr"}
|
||||
webvr_traits = {path = "../webvr_traits"}
|
||||
|
||||
|
|
|
@ -10,16 +10,16 @@ name = "script_layout_interface"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
app_units = "0.4"
|
||||
atomic_refcell = "0.1"
|
||||
canvas_traits = {path = "../canvas_traits"}
|
||||
cssparser = {version = "0.9", features = ["heap_size", "serde-serialization"]}
|
||||
euclid = "0.10.1"
|
||||
cssparser = {version = "0.10", features = ["heapsize", "serde"]}
|
||||
euclid = "0.11"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
heapsize = "0.3.0"
|
||||
heapsize_derive = "0.1"
|
||||
html5ever-atoms = "0.1"
|
||||
ipc-channel = "0.6.3"
|
||||
html5ever-atoms = "0.2"
|
||||
ipc-channel = "0.7"
|
||||
libc = "0.2"
|
||||
log = "0.3.5"
|
||||
msg = {path = "../msg"}
|
||||
|
|
|
@ -10,27 +10,27 @@ name = "script_traits"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
app_units = "0.4"
|
||||
bluetooth_traits = {path = "../bluetooth_traits"}
|
||||
canvas_traits = {path = "../canvas_traits"}
|
||||
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
gfx_traits = {path = "../gfx_traits"}
|
||||
heapsize = "0.3.0"
|
||||
heapsize_derive = "0.1"
|
||||
hyper = "0.9.9"
|
||||
hyper_serde = "0.1.4"
|
||||
ipc-channel = "0.6.3"
|
||||
hyper_serde = "0.5"
|
||||
ipc-channel = "0.7"
|
||||
libc = "0.2"
|
||||
msg = {path = "../msg"}
|
||||
net_traits = {path = "../net_traits"}
|
||||
offscreen_gl_context = "0.5.0"
|
||||
offscreen_gl_context = "0.6"
|
||||
plugins = {path = "../plugins"}
|
||||
profile_traits = {path = "../profile_traits"}
|
||||
rustc-serialize = "0.3.4"
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
servo_url = {path = "../url", features = ["servo"]}
|
||||
style_traits = {path = "../style_traits", features = ["servo"]}
|
||||
time = "0.1.12"
|
||||
|
|
|
@ -91,13 +91,13 @@ impl HeapSizeOf for UntrustedNodeAddress {
|
|||
unsafe impl Send for UntrustedNodeAddress {}
|
||||
|
||||
impl Serialize for UntrustedNodeAddress {
|
||||
fn serialize<S: Serializer>(&self, s: &mut S) -> Result<(), S::Error> {
|
||||
fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
|
||||
(self.0 as usize).serialize(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl Deserialize for UntrustedNodeAddress {
|
||||
fn deserialize<D: Deserializer>(d: &mut D) -> Result<UntrustedNodeAddress, D::Error> {
|
||||
fn deserialize<D: Deserializer>(d: D) -> Result<UntrustedNodeAddress, D::Error> {
|
||||
let value: usize = try!(Deserialize::deserialize(d));
|
||||
Ok(UntrustedNodeAddress::from_id(value))
|
||||
}
|
||||
|
|
|
@ -18,5 +18,5 @@ path = "lib.rs"
|
|||
[dependencies]
|
||||
bitflags = "0.7"
|
||||
matches = "0.1"
|
||||
cssparser = "0.9"
|
||||
cssparser = "0.10"
|
||||
fnv = "1.0"
|
||||
|
|
|
@ -31,10 +31,10 @@ debugger = {path = "../debugger"}
|
|||
devtools = {path = "../devtools"}
|
||||
devtools_traits = {path = "../devtools_traits"}
|
||||
env_logger = "0.4"
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
gfx = {path = "../gfx"}
|
||||
gleam = "0.2"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
layout_thread = {path = "../layout_thread"}
|
||||
log = "0.3"
|
||||
msg = {path = "../msg"}
|
||||
|
|
|
@ -16,23 +16,23 @@ doctest = false
|
|||
gecko = ["nsstring_vendor", "num_cpus", "rayon/unstable"]
|
||||
use_bindgen = ["bindgen", "regex"]
|
||||
servo = ["serde/unstable", "serde", "serde_derive", "heapsize_derive",
|
||||
"style_traits/servo", "app_units/plugins", "servo_atoms", "html5ever-atoms",
|
||||
"cssparser/heap_size", "cssparser/serde-serialization",
|
||||
"style_traits/servo", "servo_atoms", "html5ever-atoms",
|
||||
"cssparser/heapsize", "cssparser/serde",
|
||||
"rayon/unstable", "servo_url/servo"]
|
||||
testing = []
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
app_units = "0.4"
|
||||
atomic_refcell = "0.1"
|
||||
bitflags = "0.7"
|
||||
cfg-if = "0.1.0"
|
||||
cssparser = "0.9"
|
||||
cssparser = "0.10"
|
||||
encoding = "0.2"
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
fnv = "1.0"
|
||||
heapsize = "0.3.0"
|
||||
heapsize_derive = {version = "0.1", optional = true}
|
||||
html5ever-atoms = {version = "0.1", optional = true}
|
||||
html5ever-atoms = {version = "0.2", optional = true}
|
||||
lazy_static = "0.2"
|
||||
log = "0.3.5"
|
||||
matches = "0.1"
|
||||
|
@ -47,8 +47,8 @@ pdqsort = "0.1.0"
|
|||
rayon = "0.6"
|
||||
rustc-serialize = "0.3"
|
||||
selectors = { path = "../selectors" }
|
||||
serde = {version = "0.8", optional = true}
|
||||
serde_derive = {version = "0.8", optional = true}
|
||||
serde = {version = "0.9", optional = true}
|
||||
serde_derive = {version = "0.9", optional = true}
|
||||
servo_atoms = {path = "../atoms", optional = true}
|
||||
servo_config = {path = "../config"}
|
||||
smallvec = "0.1"
|
||||
|
|
|
@ -11,14 +11,14 @@ path = "lib.rs"
|
|||
|
||||
[features]
|
||||
servo = ["heapsize", "heapsize_derive", "serde", "serde_derive",
|
||||
"cssparser/heap_size", "cssparser/serde-serialization"]
|
||||
"cssparser/heapsize", "cssparser/serde"]
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
cssparser = "0.9"
|
||||
euclid = "0.10.1"
|
||||
app_units = "0.4"
|
||||
cssparser = "0.10"
|
||||
euclid = "0.11"
|
||||
heapsize = {version = "0.3.0", optional = true}
|
||||
heapsize_derive = {version = "0.1", optional = true}
|
||||
rustc-serialize = "0.3"
|
||||
serde = {version = "0.8", optional = true}
|
||||
serde_derive = {version = "0.8", optional = true}
|
||||
serde = {version = "0.9", optional = true}
|
||||
serde_derive = {version = "0.9", optional = true}
|
||||
|
|
|
@ -10,13 +10,11 @@ name = "servo_url"
|
|||
path = "lib.rs"
|
||||
|
||||
[features]
|
||||
servo = ["heapsize", "heapsize_derive", "serde", "serde_derive",
|
||||
"url/heap_size", "url/serde"]
|
||||
|
||||
servo = ["heapsize", "heapsize_derive", "serde", "url/heap_size", "url_serde"]
|
||||
|
||||
[dependencies]
|
||||
heapsize = {version = "0.3.0", optional = true}
|
||||
heapsize_derive = {version = "0.1", optional = true}
|
||||
serde = {version = "0.8", optional = true}
|
||||
serde_derive = {version = "0.8", optional = true}
|
||||
serde = {version = "0.9", optional = true}
|
||||
url = "1.2"
|
||||
url_serde = {version = "0.1", optional = true}
|
||||
|
|
|
@ -7,11 +7,10 @@
|
|||
#![crate_name = "servo_url"]
|
||||
#![crate_type = "rlib"]
|
||||
|
||||
#![cfg_attr(feature = "servo", feature(plugin))]
|
||||
|
||||
#[cfg(feature = "servo")] #[macro_use] extern crate serde_derive;
|
||||
#[cfg(feature = "servo")] extern crate heapsize;
|
||||
#[cfg(feature = "servo")] #[macro_use] extern crate heapsize_derive;
|
||||
#[cfg(feature = "servo")] extern crate serde;
|
||||
#[cfg(feature = "servo")] extern crate url_serde;
|
||||
|
||||
extern crate url;
|
||||
|
||||
|
@ -23,7 +22,7 @@ use std::sync::Arc;
|
|||
use url::{Url, Origin, Position};
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf, Serialize, Deserialize))]
|
||||
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
|
||||
pub struct ServoUrl(Arc<Url>);
|
||||
|
||||
impl ServoUrl {
|
||||
|
@ -196,3 +195,21 @@ impl From<Url> for ServoUrl {
|
|||
ServoUrl::from_url(url)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
impl serde::Serialize for ServoUrl {
|
||||
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
|
||||
where S: serde::Serializer,
|
||||
{
|
||||
url_serde::serialize(&*self.0, serializer)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
impl serde::Deserialize for ServoUrl {
|
||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||
where D: serde::Deserializer,
|
||||
{
|
||||
url_serde::deserialize(deserializer).map(Self::from_url)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,10 +11,10 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
cookie = {version = "0.2.5", features = ["serialize-rustc"]}
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
hyper = "0.9.9"
|
||||
image = "0.12"
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
log = "0.3.5"
|
||||
msg = {path = "../msg"}
|
||||
net_traits = {path = "../net_traits"}
|
||||
|
@ -25,5 +25,5 @@ script_traits = {path = "../script_traits"}
|
|||
servo_config = {path = "../config", features = ["servo"]}
|
||||
servo_url = {path = "../url", features = ["servo"]}
|
||||
url = {version = "1.2", features = ["heap_size"]}
|
||||
uuid = { version = "0.3.1", features = ["v4"] }
|
||||
uuid = {version = "0.4", features = ["v4"]}
|
||||
webdriver = "0.20"
|
||||
|
|
|
@ -10,7 +10,7 @@ name = "webvr"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
log = "0.3"
|
||||
msg = {path = "../msg"}
|
||||
script_traits = {path = "../script_traits"}
|
||||
|
|
|
@ -10,8 +10,8 @@ name = "webvr_traits"
|
|||
path = "lib.rs"
|
||||
|
||||
[dependencies]
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
msg = {path = "../msg"}
|
||||
rust-webvr = {version = "0.1", features = ["serde-serialization"]}
|
||||
serde = "0.8"
|
||||
serde_derive = "0.8"
|
||||
rust-webvr = {version = "0.2", features = ["serde-serialization"]}
|
||||
serde = "0.9"
|
||||
serde_derive = "0.9"
|
||||
|
|
|
@ -20,7 +20,7 @@ debugmozjs = ["libservo/debugmozjs"]
|
|||
[dependencies]
|
||||
compositing = {path = "../../components/compositing"}
|
||||
devtools = {path = "../../components/devtools"}
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
gleam = "0.2.8"
|
||||
glutin_app = {path = "../glutin"}
|
||||
libc = "0.2"
|
||||
|
@ -42,7 +42,7 @@ features = ["serde_derive", "ipc"]
|
|||
|
||||
[target.'cfg(target_os="macos")'.dependencies]
|
||||
objc = "0.2"
|
||||
cocoa = "0.7"
|
||||
cocoa = "0.8"
|
||||
|
||||
[target.'cfg(target_os="linux")'.dependencies]
|
||||
x11 = "2.3"
|
||||
|
|
|
@ -13,11 +13,11 @@ crate-type = ["staticlib", "rlib"]
|
|||
bindgen = ["style/use_bindgen"]
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
app_units = "0.4"
|
||||
atomic_refcell = "0.1"
|
||||
cssparser = {version = "0.9"}
|
||||
cssparser = "0.10"
|
||||
env_logger = {version = "0.4", default-features = false} # disable `regex` to reduce code size
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
lazy_static = "0.2"
|
||||
libc = "0.2"
|
||||
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
|
|
|
@ -11,13 +11,13 @@ path = "lib.rs"
|
|||
[dependencies]
|
||||
bitflags = "0.7"
|
||||
compositing = {path = "../../components/compositing"}
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
gleam = "0.2.8"
|
||||
log = "0.3.5"
|
||||
msg = {path = "../../components/msg"}
|
||||
net_traits = {path = "../../components/net_traits"}
|
||||
script_traits = {path = "../../components/script_traits"}
|
||||
servo-glutin = "0.8"
|
||||
servo-glutin = "0.9"
|
||||
servo_geometry = {path = "../../components/geometry"}
|
||||
servo_config = {path = "../../components/config"}
|
||||
servo_url = {path = "../../components/url"}
|
||||
|
|
|
@ -31,7 +31,7 @@ num = []
|
|||
|
||||
[ignore]
|
||||
# Ignored packages with duplicated versions
|
||||
packages = ["byteorder", "semver"]
|
||||
packages = ["byteorder", "semver", "serde_codegen_internals", "syn"]
|
||||
# Files that are ignored for all tidy and lint checks.
|
||||
files = [
|
||||
# Generated and upstream code combined with our own. Could use cleanup
|
||||
|
|
|
@ -11,5 +11,5 @@ doctest = false
|
|||
|
||||
[dependencies]
|
||||
gfx = {path = "../../../components/gfx"}
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
style = {path = "../../../components/style"}
|
||||
|
|
|
@ -10,13 +10,13 @@ path = "lib.rs"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
content-blocker = "0.2.1"
|
||||
content-blocker = "0.2.3"
|
||||
cookie = "0.2"
|
||||
devtools_traits = {path = "../../../components/devtools_traits"}
|
||||
flate2 = "0.2.0"
|
||||
hyper = "0.9.9"
|
||||
hyper_serde = "0.1.4"
|
||||
ipc-channel = "0.6.3"
|
||||
hyper_serde = "0.5"
|
||||
ipc-channel = "0.7"
|
||||
msg = {path = "../../../components/msg"}
|
||||
net = {path = "../../../components/net"}
|
||||
net_traits = {path = "../../../components/net_traits"}
|
||||
|
|
|
@ -10,6 +10,6 @@ path = "lib.rs"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
ipc-channel = "0.6.3"
|
||||
ipc-channel = "0.7"
|
||||
profile = {path = "../../../components/profile"}
|
||||
profile_traits = {path = "../../../components/profile_traits"}
|
||||
|
|
|
@ -10,7 +10,7 @@ path = "lib.rs"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
euclid = "0.10.2"
|
||||
euclid = "0.11"
|
||||
msg = {path = "../../../components/msg"}
|
||||
plugins = {path = "../../../components/plugins"}
|
||||
script = {path = "../../../components/script"}
|
||||
|
|
|
@ -13,10 +13,10 @@ doctest = false
|
|||
testing = ["style/testing"]
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
cssparser = {version = "0.9", features = ["heap_size"]}
|
||||
euclid = "0.10.1"
|
||||
html5ever-atoms = "0.1"
|
||||
app_units = "0.4"
|
||||
cssparser = {version = "0.10", features = ["heapsize"]}
|
||||
euclid = "0.11"
|
||||
html5ever-atoms = "0.2"
|
||||
matches = "0.1"
|
||||
owning_ref = "0.2.2"
|
||||
parking_lot = "0.3"
|
||||
|
|
|
@ -12,11 +12,11 @@ path = "lib.rs"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
app_units = "0.3"
|
||||
app_units = "0.4"
|
||||
atomic_refcell = "0.1"
|
||||
cssparser = "0.9"
|
||||
cssparser = "0.10"
|
||||
env_logger = "0.4"
|
||||
euclid = "0.10.1"
|
||||
euclid = "0.11"
|
||||
lazy_static = "0.2"
|
||||
libc = "0.2"
|
||||
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue