From 61149b316a1be95f3346b7c790558a28036ffafd Mon Sep 17 00:00:00 2001 From: Olaf Buddenhagen Date: Fri, 25 Dec 2015 23:28:06 +0100 Subject: [PATCH 1/3] cargo-update ipc-channel to get --- components/servo/Cargo.lock | 2 +- ports/cef/Cargo.lock | 4 ++-- ports/gonk/Cargo.lock | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index fcd8f6f4026..d606fd768fd 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -871,7 +871,7 @@ dependencies = [ [[package]] name = "ipc-channel" version = "0.1.0" -source = "git+https://github.com/servo/ipc-channel#6900611d5f00c7405ae886d75841fe37df6bfc38" +source = "git+https://github.com/servo/ipc-channel#1b95d5490d7b7f49576577315bdb5b4c834d08d0" dependencies = [ "bincode 0.4.0 (git+https://github.com/TyOverby/bincode)", "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 973e4838b73..b3f5a8cfe8a 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -831,12 +831,12 @@ dependencies = [ [[package]] name = "ipc-channel" version = "0.1.0" -source = "git+https://github.com/servo/ipc-channel#6900611d5f00c7405ae886d75841fe37df6bfc38" +source = "git+https://github.com/servo/ipc-channel#1b95d5490d7b7f49576577315bdb5b4c834d08d0" dependencies = [ "bincode 0.4.0 (git+https://github.com/TyOverby/bincode)", "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 3e2b19169ad..73e20f9022a 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -799,12 +799,12 @@ dependencies = [ [[package]] name = "ipc-channel" version = "0.1.0" -source = "git+https://github.com/servo/ipc-channel#6900611d5f00c7405ae886d75841fe37df6bfc38" +source = "git+https://github.com/servo/ipc-channel#1b95d5490d7b7f49576577315bdb5b4c834d08d0" dependencies = [ "bincode 0.4.0 (git+https://github.com/TyOverby/bincode)", "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "serde_macros 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", From 7197e7f311a0d28110d417309f45eec733cff442 Mon Sep 17 00:00:00 2001 From: Olaf Buddenhagen Date: Fri, 25 Dec 2015 23:41:29 +0100 Subject: [PATCH 2/3] cargo-update azure to get --- components/servo/Cargo.lock | 2 +- ports/cef/Cargo.lock | 2 +- ports/gonk/Cargo.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index d606fd768fd..802c50db0d3 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -92,7 +92,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "azure" version = "0.2.1" -source = "git+https://github.com/servo/rust-azure#b05ba4bb70aefb319c7f168fc83a9fd04a1aa1ef" +source = "git+https://github.com/servo/rust-azure#7662f94f0b8c368134a04edac936328d603c7ad8" dependencies = [ "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index b3f5a8cfe8a..3086170b49c 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -81,7 +81,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "azure" version = "0.2.1" -source = "git+https://github.com/servo/rust-azure#b05ba4bb70aefb319c7f168fc83a9fd04a1aa1ef" +source = "git+https://github.com/servo/rust-azure#7662f94f0b8c368134a04edac936328d603c7ad8" dependencies = [ "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 73e20f9022a..f500ad3f63c 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -72,7 +72,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "azure" version = "0.2.1" -source = "git+https://github.com/servo/rust-azure#b05ba4bb70aefb319c7f168fc83a9fd04a1aa1ef" +source = "git+https://github.com/servo/rust-azure#7662f94f0b8c368134a04edac936328d603c7ad8" dependencies = [ "core-foundation 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-graphics 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", From 3c5a3ca4ff9c559495a8a9e65458a369b7f906d8 Mon Sep 17 00:00:00 2001 From: Olaf Buddenhagen Date: Fri, 25 Dec 2015 22:30:08 +0100 Subject: [PATCH 3/3] Derive Debug for more font-related types --- components/gfx/font_cache_task.rs | 6 +++--- components/gfx/font_context.rs | 5 +++++ components/style/properties.mako.rs | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components/gfx/font_cache_task.rs b/components/gfx/font_cache_task.rs index af528ee5c3b..5332fbde69a 100644 --- a/components/gfx/font_cache_task.rs +++ b/components/gfx/font_cache_task.rs @@ -77,7 +77,7 @@ impl FontFamily { } /// Commands that the FontContext sends to the font cache task. -#[derive(Deserialize, Serialize)] +#[derive(Deserialize, Serialize, Debug)] pub enum Command { GetFontTemplate(String, FontTemplateDescriptor, IpcSender), GetLastResortFontTemplate(FontTemplateDescriptor, IpcSender), @@ -87,7 +87,7 @@ pub enum Command { } /// Reply messages sent from the font cache task to the FontContext caller. -#[derive(Deserialize, Serialize)] +#[derive(Deserialize, Serialize, Debug)] pub enum Reply { GetFontTemplateReply(Option>), } @@ -271,7 +271,7 @@ impl FontCache { /// The public interface to the font cache task, used exclusively by /// the per-thread/task FontContext structures. -#[derive(Clone, Deserialize, Serialize)] +#[derive(Clone, Deserialize, Serialize, Debug)] pub struct FontCacheTask { chan: IpcSender, } diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs index facd815f9c7..52ad5220124 100644 --- a/components/gfx/font_context.rs +++ b/components/gfx/font_context.rs @@ -44,17 +44,20 @@ fn create_scaled_font(template: &Arc, pt_size: Au) -> ScaledFo static SMALL_CAPS_SCALE_FACTOR: f32 = 0.8; // Matches FireFox (see gfxFont.h) +#[derive(Debug)] struct LayoutFontCacheEntry { family: String, font: Option>>, } +#[derive(Debug)] struct FallbackFontCacheEntry { font: Rc>, } /// A cached azure font (per paint task) that /// can be shared by multiple text runs. +#[derive(Debug)] struct PaintFontCacheEntry { pt_size: Au, identifier: Atom, @@ -69,6 +72,7 @@ static FONT_CACHE_EPOCH: AtomicUsize = ATOMIC_USIZE_INIT; /// working with fonts. It is the public API used by the layout and /// paint code. It talks directly to the font cache task where /// required. +#[derive(Debug)] pub struct FontContext { platform_handle: FontContextHandle, font_cache_task: FontCacheTask, @@ -317,6 +321,7 @@ impl HeapSizeOf for FontContext { } } +#[derive(Debug)] struct LayoutFontGroupCacheKey { pointer: Arc, size: Au, diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 5076f9e77e1..65fd8b6084d 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -6115,7 +6115,7 @@ pub mod style_structs { % for style_struct in STYLE_STRUCTS: % if style_struct.name == "Font": - #[derive(Clone, HeapSizeOf)] + #[derive(Clone, HeapSizeOf, Debug)] % else: #[derive(PartialEq, Clone, HeapSizeOf)] % endif