diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs index 6e085ebb66c..9d2c3c46848 100644 --- a/components/gfx/display_list/mod.rs +++ b/components/gfx/display_list/mod.rs @@ -24,7 +24,7 @@ use text::glyph::CharIndex; use text::TextRun; use azure::azure::AzFloat; -use azure::azure_hl::{Color}; +use azure::azure_hl::Color; use collections::linked_list::{self, LinkedList}; use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D}; @@ -798,7 +798,6 @@ pub struct SolidColorDisplayItem { pub base: BaseDisplayItem, /// The color. - #[ignore_heap_size] pub color: Color, } @@ -813,11 +812,9 @@ pub struct TextDisplayItem { pub text_run: Arc>, /// The range of text within the text run. - #[ignore_heap_size] pub range: Range, /// The color of the text. - #[ignore_heap_size] pub text_color: Color, /// The position of the start of the baseline of this text. @@ -897,11 +894,9 @@ pub struct BorderDisplayItem { pub border_widths: SideOffsets2D, /// Border colors. - #[ignore_heap_size] pub color: SideOffsets2D, /// Border styles. - #[ignore_heap_size] pub style: SideOffsets2D, /// Border radii. @@ -948,11 +943,9 @@ pub struct LineDisplayItem { pub base: BaseDisplayItem, /// The line segment color. - #[ignore_heap_size] pub color: Color, /// The line segment style. - #[ignore_heap_size] pub style: border_style::T } @@ -969,7 +962,6 @@ pub struct BoxShadowDisplayItem { pub offset: Point2D, /// The color of this shadow. - #[ignore_heap_size] pub color: Color, /// The blur radius for this shadow. diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs index 0edddf87459..bc900960be9 100644 --- a/components/gfx/text/glyph.rs +++ b/components/gfx/text/glyph.rs @@ -519,6 +519,7 @@ int_range_index! { #[derive(RustcEncodable)] #[doc = "An index that refers to a character in a text run. This could \ point to the middle of a glyph."] + #[derive(HeapSizeOf)] struct CharIndex(isize) } diff --git a/components/style/lib.rs b/components/style/lib.rs index 9469d021196..7fa25ac8fad 100644 --- a/components/style/lib.rs +++ b/components/style/lib.rs @@ -9,8 +9,9 @@ #![feature(collections)] #![feature(hash)] #![feature(rustc_private)] - +#![feature(custom_attribute, custom_derive)] #![plugin(string_cache_plugin)] +#![plugin(plugins)] #[macro_use] extern crate log; #[macro_use] extern crate bitflags; diff --git a/components/style/properties.mako.rs b/components/style/properties.mako.rs index 01ee1f884e2..0e630183801 100644 --- a/components/style/properties.mako.rs +++ b/components/style/properties.mako.rs @@ -1027,8 +1027,8 @@ pub mod longhands { #[inline] pub fn get_initial_value() -> computed_value::T { computed_value::T(vec![ - ("\u{201c}".to_string(), "\u{201d}".to_string()), - ("\u{2018}".to_string(), "\u{2019}".to_string()), + ("\u{201c}".to_owned(), "\u{201d}".to_owned()), + ("\u{2018}".to_owned(), "\u{2019}".to_owned()), ]) } diff --git a/components/style/values.rs b/components/style/values.rs index 5c2c29f7aef..f1d9a9df9fa 100644 --- a/components/style/values.rs +++ b/components/style/values.rs @@ -43,7 +43,7 @@ macro_rules! define_numbered_css_keyword_enum { }; ($name: ident: $( $css: expr => $variant: ident = $value: expr ),+) => { #[allow(non_camel_case_types)] - #[derive(Clone, Eq, PartialEq, PartialOrd, Ord, Copy, RustcEncodable, Debug)] + #[derive(Clone, Eq, PartialEq, PartialOrd, Ord, Copy, RustcEncodable, Debug, HeapSizeOf)] pub enum $name { $( $variant = $value ),+ } diff --git a/components/util/mem.rs b/components/util/mem.rs index 6c9f04af984..3575627d46a 100644 --- a/components/util/mem.rs +++ b/components/util/mem.rs @@ -13,6 +13,7 @@ use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D}; use geometry::Au; use range::Range; +use azure::azure_hl::Color; extern { // Get the size of a heap block. @@ -196,5 +197,5 @@ known_heap_size!(0, bool, f32, f64); known_heap_size!(0, Rect, Point2D, Size2D, Matrix2D, SideOffsets2D); -known_heap_size!(0, Au); -known_heap_size!(0, Range); \ No newline at end of file +known_heap_size!(0, Au, Color); +known_heap_size!(0, Range);