aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-08-12 14:46:25 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-08-12 18:37:27 +0200
commit7ad51dcd7aff7658914bcbdde0800fc2f87d9fa5 (patch)
tree7c3323204e3fb5d85edcb95b97748962e3978ae1 /components/gfx
parenta22913569c2fa917015b23c27cb2f55de2a69ff2 (diff)
downloadservo-7ad51dcd7aff7658914bcbdde0800fc2f87d9fa5.tar.gz
servo-7ad51dcd7aff7658914bcbdde0800fc2f87d9fa5.zip
Update serde to 0.8 (fixes #12659)
Diffstat (limited to 'components/gfx')
-rw-r--r--components/gfx/Cargo.toml18
-rw-r--r--components/gfx/display_list/mod.rs8
-rw-r--r--components/gfx/font_cache_thread.rs2
3 files changed, 16 insertions, 12 deletions
diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml
index cbfabf787ae..9e1eaa1725e 100644
--- a/components/gfx/Cargo.toml
+++ b/components/gfx/Cargo.toml
@@ -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"}
diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs
index a9a8a194312..0e16da27133 100644
--- a/components/gfx/display_list/mod.rs
+++ b/components/gfx/display_list/mod.rs
@@ -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)
}
}
diff --git a/components/gfx/font_cache_thread.rs b/components/gfx/font_cache_thread.rs
index 4ba4af2b39f..9b761900a80 100644
--- a/components/gfx/font_cache_thread.rs
+++ b/components/gfx/font_cache_thread.rs
@@ -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,