Update servo

This commit is contained in:
Jonathan Schleußer 2017-08-30 20:17:27 +02:00 committed by Joe Wilm
parent 556edd82bc
commit 967393a31c
3 changed files with 96 additions and 70 deletions

60
Cargo.lock generated
View File

@ -18,10 +18,10 @@ dependencies = [
"mio 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"notify 2.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"vte 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"x11-dl 2.14.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -506,6 +506,11 @@ name = "linked-hash-map"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "linked-hash-map"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "log"
version = "0.3.8"
@ -875,21 +880,27 @@ version = "0.9.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde_codegen_internals"
version = "0.14.2"
name = "serde"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde_derive"
version = "1.0.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_derive"
version = "0.9.15"
name = "serde_derive_internals"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_codegen_internals 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
"synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -904,12 +915,24 @@ dependencies = [
]
[[package]]
name = "serde_yaml"
version = "0.6.2"
name = "serde_json"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"linked-hash-map 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)",
"dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_yaml"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)",
"yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1309,6 +1332,7 @@ dependencies = [
"checksum libloading 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0a020ac941774eb37e9d13d418c37b522e76899bfc4e7b1a600d529a53f83a66"
"checksum libz-sys 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e5ee912a45d686d393d5ac87fac15ba0ba18daae14e8e7543c63ebf7fb7e970c"
"checksum linked-hash-map 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d262045c5b87c0861b3f004610afd0e2c851e2908d08b6c870cbb9d5f494ecd"
"checksum linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7860ec297f7008ff7a1e3382d7f7e1dcd69efc94751a2284bafc3d013c2aa939"
"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b"
"checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
"checksum matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "efd7622e3022e1a6eaa602c4cea8912254e5582c9c692e9167714182244801b1"
@ -1352,10 +1376,12 @@ dependencies = [
"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac"
"checksum semver 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2d5b7638a1f03815d94e88cb3b3c08e87f0db4d683ef499d1836aaf70a45623f"
"checksum serde 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "34b623917345a631dc9608d5194cc206b3fe6c3554cd1c75b937e55e285254af"
"checksum serde_codegen_internals 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bc888bd283bd2420b16ad0d860e35ad8acb21941180a83a189bb2046f9d00400"
"checksum serde_derive 0.9.15 (registry+https://github.com/rust-lang/crates.io-index)" = "978fd866f4d4872084a81ccc35e275158351d3b9fe620074e7d7504b816b74ba"
"checksum serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f7726f29ddf9731b17ff113c461e362c381d9d69433f79de4f3dd572488823e9"
"checksum serde_derive 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cf823e706be268e73e7747b147aa31c8f633ab4ba31f115efb57e5047c3a76dd"
"checksum serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37aee4e0da52d801acfbc0cc219eb1eda7142112339726e427926a6f6ee65d3a"
"checksum serde_json 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ad8bcf487be7d2e15d3d543f04312de991d631cfe1b43ea0ade69e6a8a5b16a1"
"checksum serde_yaml 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f8bd3f24ad8c7bcd34a6d70ba676dc11302b96f4f166aa5f947762e01098844d"
"checksum serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "48b04779552e92037212c3615370f6bd57a40ebba7f20e554ff9f55e41a69a7b"
"checksum serde_yaml 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "49d983aa39d2884a4b422bb11bb38f4f48fa05186e17469bc31e47d01e381111"
"checksum servo-fontconfig 0.2.0 (git+https://github.com/jwilm/rust-fontconfig)" = "<none>"
"checksum servo-fontconfig-sys 2.11.3 (git+https://github.com/jwilm/libfontconfig)" = "<none>"
"checksum shared_library 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fb04126b6fcfd2710fb5b6d18f4207b6c535f2850a7e1a43bcd526d44f30a79a"

View File

@ -19,12 +19,12 @@ bitflags = "0.7"
font = { path = "./font" }
errno = "0.2"
parking_lot = "0.3.1"
serde = "0.9"
serde_yaml = "0.6"
serde_derive = "0.9"
serde = "1"
serde_derive = "1"
serde_json = "1"
serde_yaml = "0.7"
vte = "0.3.0"
mio = "=0.6.2"
serde_json = "0.9"
copypasta = { path = "./copypasta" }
xdg = "2.0.0"
log = "0.3"

View File

@ -18,7 +18,7 @@ use font::Size;
use serde_yaml;
use serde::{self, de, Deserialize};
use serde::de::Error as SerdeError;
use serde::de::{Visitor, MapVisitor, Unexpected};
use serde::de::{Visitor, MapAccess, Unexpected};
use notify::{Watcher as WatcherApi, RecommendedWatcher as FileWatcher, op};
use glutin::ModifiersState;
@ -52,8 +52,8 @@ pub struct ClickHandler {
pub threshold: Duration,
}
fn deserialize_duration_ms<D>(deserializer: D) -> ::std::result::Result<Duration, D::Error>
where D: de::Deserializer
fn deserialize_duration_ms<'a, D>(deserializer: D) -> ::std::result::Result<Duration, D::Error>
where D: de::Deserializer<'a>
{
let threshold_ms = u64::deserialize(deserializer)?;
Ok(Duration::from_millis(threshold_ms))
@ -351,13 +351,13 @@ impl ModsWrapper {
}
}
impl de::Deserialize for ModsWrapper {
impl<'a> de::Deserialize<'a> for ModsWrapper {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: de::Deserializer
where D: de::Deserializer<'a>
{
struct ModsVisitor;
impl Visitor for ModsVisitor {
impl<'a> Visitor<'a> for ModsVisitor {
type Value = ModsWrapper;
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@ -394,13 +394,13 @@ impl ActionWrapper {
}
}
impl de::Deserialize for ActionWrapper {
impl<'a> de::Deserialize<'a> for ActionWrapper {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: de::Deserializer
where D: de::Deserializer<'a>
{
struct ActionVisitor;
impl Visitor for ActionVisitor {
impl<'a> Visitor<'a> for ActionVisitor {
type Value = ActionWrapper;
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@ -441,13 +441,13 @@ struct ModeWrapper {
pub not_mode: TermMode,
}
impl de::Deserialize for ModeWrapper {
impl<'a> de::Deserialize<'a> for ModeWrapper {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: de::Deserializer
where D: de::Deserializer<'a>
{
struct ModeVisitor;
impl Visitor for ModeVisitor {
impl<'a> Visitor<'a> for ModeVisitor {
type Value = ModeWrapper;
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@ -487,13 +487,13 @@ impl MouseButton {
}
}
impl de::Deserialize for MouseButton {
impl<'a> de::Deserialize<'a> for MouseButton {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: de::Deserializer
where D: de::Deserializer<'a>
{
struct MouseButtonVisitor;
impl Visitor for MouseButtonVisitor {
impl<'a> Visitor<'a> for MouseButtonVisitor {
type Value = MouseButton;
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@ -563,9 +563,9 @@ impl RawBinding {
}
}
impl de::Deserialize for RawBinding {
impl<'a> de::Deserialize<'a> for RawBinding {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: de::Deserializer
where D: de::Deserializer<'a>
{
enum Field {
Key,
@ -577,9 +577,9 @@ impl de::Deserialize for RawBinding {
Command,
}
impl de::Deserialize for Field {
impl<'a> de::Deserialize<'a> for Field {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Field, D::Error>
where D: de::Deserializer
where D: de::Deserializer<'a>
{
struct FieldVisitor;
@ -587,7 +587,7 @@ impl de::Deserialize for RawBinding {
"key", "mods", "mode", "action", "chars", "mouse", "command",
];
impl Visitor for FieldVisitor {
impl<'a> Visitor<'a> for FieldVisitor {
type Value = Field;
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@ -610,12 +610,12 @@ impl de::Deserialize for RawBinding {
}
}
deserializer.deserialize_struct_field(FieldVisitor)
deserializer.deserialize_struct("Field", FIELDS, FieldVisitor)
}
}
struct RawBindingVisitor;
impl Visitor for RawBindingVisitor {
impl<'a> Visitor<'a> for RawBindingVisitor {
type Value = RawBinding;
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@ -624,9 +624,9 @@ impl de::Deserialize for RawBinding {
fn visit_map<V>(
self,
mut visitor: V
mut map: V
) -> ::std::result::Result<RawBinding, V::Error>
where V: MapVisitor,
where V: MapAccess<'a>,
{
let mut mods: Option<ModifiersState> = None;
let mut key: Option<::glutin::VirtualKeyCode> = None;
@ -639,14 +639,14 @@ impl de::Deserialize for RawBinding {
use ::serde::de::Error;
while let Some(struct_key) = visitor.visit_key::<Field>()? {
while let Some(struct_key) = map.next_key::<Field>()? {
match struct_key {
Field::Key => {
if key.is_some() {
return Err(<V::Error as Error>::duplicate_field("key"));
}
let coherent_key = visitor.visit_value::<Key>()?;
let coherent_key = map.next_value::<Key>()?;
key = Some(coherent_key.to_glutin_key());
},
Field::Mods => {
@ -654,14 +654,14 @@ impl de::Deserialize for RawBinding {
return Err(<V::Error as Error>::duplicate_field("mods"));
}
mods = Some(visitor.visit_value::<ModsWrapper>()?.into_inner());
mods = Some(map.next_value::<ModsWrapper>()?.into_inner());
},
Field::Mode => {
if mode.is_some() {
return Err(<V::Error as Error>::duplicate_field("mode"));
}
let mode_deserializer = visitor.visit_value::<ModeWrapper>()?;
let mode_deserializer = map.next_value::<ModeWrapper>()?;
mode = Some(mode_deserializer.mode);
not_mode = Some(mode_deserializer.not_mode);
},
@ -670,28 +670,28 @@ impl de::Deserialize for RawBinding {
return Err(<V::Error as Error>::duplicate_field("action"));
}
action = Some(visitor.visit_value::<ActionWrapper>()?.into_inner());
action = Some(map.next_value::<ActionWrapper>()?.into_inner());
},
Field::Chars => {
if chars.is_some() {
return Err(<V::Error as Error>::duplicate_field("chars"));
}
chars = Some(visitor.visit_value()?);
chars = Some(map.next_value()?);
},
Field::Mouse => {
if chars.is_some() {
return Err(<V::Error as Error>::duplicate_field("mouse"));
}
mouse = Some(visitor.visit_value::<MouseButton>()?.into_inner());
mouse = Some(map.next_value::<MouseButton>()?.into_inner());
},
Field::Command => {
if command.is_some() {
return Err(<V::Error as Error>::duplicate_field("command"));
}
command = Some(visitor.visit_value::<CommandWrapper>()?);
command = Some(map.next_value::<CommandWrapper>()?);
},
}
}
@ -741,18 +741,18 @@ impl de::Deserialize for RawBinding {
}
impl de::Deserialize for Alpha {
impl<'a> de::Deserialize<'a> for Alpha {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: de::Deserializer
where D: de::Deserializer<'a>
{
let value = f32::deserialize(deserializer)?;
Ok(Alpha::new(value))
}
}
impl de::Deserialize for MouseBinding {
impl<'a> de::Deserialize<'a> for MouseBinding {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: de::Deserializer
where D: de::Deserializer<'a>
{
let raw = RawBinding::deserialize(deserializer)?;
raw.into_mouse_binding()
@ -760,9 +760,9 @@ impl de::Deserialize for MouseBinding {
}
}
impl de::Deserialize for KeyBinding {
impl<'a> de::Deserialize<'a> for KeyBinding {
fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: de::Deserializer
where D: de::Deserializer<'a>
{
let raw = RawBinding::deserialize(deserializer)?;
raw.into_key_binding()
@ -799,8 +799,8 @@ pub struct Colors {
pub dim: Option<AnsiColors>,
}
fn deserialize_cursor_colors<D>(deserializer: D) -> ::std::result::Result<CursorColors, D::Error>
where D: de::Deserializer
fn deserialize_cursor_colors<'a, D>(deserializer: D) -> ::std::result::Result<CursorColors, D::Error>
where D: de::Deserializer<'a>
{
let either = CursorOrPrimaryColors::deserialize(deserializer)?;
Ok(either.into_cursor_colors())
@ -925,12 +925,12 @@ pub struct AnsiColors {
///
/// This is *not* the deserialize impl for Rgb since we want a symmetric
/// serialize/deserialize impl for ref tests.
fn rgb_from_hex<D>(deserializer: D) -> ::std::result::Result<Rgb, D::Error>
where D: de::Deserializer
fn rgb_from_hex<'a, D>(deserializer: D) -> ::std::result::Result<Rgb, D::Error>
where D: de::Deserializer<'a>
{
struct RgbVisitor;
impl ::serde::de::Visitor for RgbVisitor {
impl<'a> Visitor<'a> for RgbVisitor {
type Value = Rgb;
fn expecting(&self, f: &mut fmt::Formatter) -> fmt::Result {
@ -1296,13 +1296,13 @@ impl Default for Delta {
}
trait DeserializeFromF32 : Sized {
fn deserialize_from_f32<D>(D) -> ::std::result::Result<Self, D::Error>
where D: serde::de::Deserializer;
fn deserialize_from_f32<'a, D>(D) -> ::std::result::Result<Self, D::Error>
where D: serde::de::Deserializer<'a>;
}
impl DeserializeFromF32 for Size {
fn deserialize_from_f32<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: serde::de::Deserializer
fn deserialize_from_f32<'a, D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
where D: serde::de::Deserializer<'a>
{
use std::marker::PhantomData;
@ -1310,8 +1310,8 @@ impl DeserializeFromF32 for Size {
_marker: PhantomData<__D>,
}
impl<__D> ::serde::de::Visitor for FloatVisitor<__D>
where __D: ::serde::de::Deserializer
impl<'a, __D> Visitor<'a> for FloatVisitor<__D>
where __D: serde::de::Deserializer<'a>
{
type Value = f64;