remove more heapsize ignores

This commit is contained in:
Manish Goregaokar 2015-05-27 22:24:49 +05:30
parent a5975e8f33
commit 5447d2af3d
6 changed files with 10 additions and 15 deletions

View file

@ -24,7 +24,7 @@ use text::glyph::CharIndex;
use text::TextRun; use text::TextRun;
use azure::azure::AzFloat; use azure::azure::AzFloat;
use azure::azure_hl::{Color}; use azure::azure_hl::Color;
use collections::linked_list::{self, LinkedList}; use collections::linked_list::{self, LinkedList};
use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D}; use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D};
@ -798,7 +798,6 @@ pub struct SolidColorDisplayItem {
pub base: BaseDisplayItem, pub base: BaseDisplayItem,
/// The color. /// The color.
#[ignore_heap_size]
pub color: Color, pub color: Color,
} }
@ -813,11 +812,9 @@ pub struct TextDisplayItem {
pub text_run: Arc<Box<TextRun>>, pub text_run: Arc<Box<TextRun>>,
/// The range of text within the text run. /// The range of text within the text run.
#[ignore_heap_size]
pub range: Range<CharIndex>, pub range: Range<CharIndex>,
/// The color of the text. /// The color of the text.
#[ignore_heap_size]
pub text_color: Color, pub text_color: Color,
/// The position of the start of the baseline of this text. /// The position of the start of the baseline of this text.
@ -897,11 +894,9 @@ pub struct BorderDisplayItem {
pub border_widths: SideOffsets2D<Au>, pub border_widths: SideOffsets2D<Au>,
/// Border colors. /// Border colors.
#[ignore_heap_size]
pub color: SideOffsets2D<Color>, pub color: SideOffsets2D<Color>,
/// Border styles. /// Border styles.
#[ignore_heap_size]
pub style: SideOffsets2D<border_style::T>, pub style: SideOffsets2D<border_style::T>,
/// Border radii. /// Border radii.
@ -948,11 +943,9 @@ pub struct LineDisplayItem {
pub base: BaseDisplayItem, pub base: BaseDisplayItem,
/// The line segment color. /// The line segment color.
#[ignore_heap_size]
pub color: Color, pub color: Color,
/// The line segment style. /// The line segment style.
#[ignore_heap_size]
pub style: border_style::T pub style: border_style::T
} }
@ -969,7 +962,6 @@ pub struct BoxShadowDisplayItem {
pub offset: Point2D<Au>, pub offset: Point2D<Au>,
/// The color of this shadow. /// The color of this shadow.
#[ignore_heap_size]
pub color: Color, pub color: Color,
/// The blur radius for this shadow. /// The blur radius for this shadow.

View file

@ -519,6 +519,7 @@ int_range_index! {
#[derive(RustcEncodable)] #[derive(RustcEncodable)]
#[doc = "An index that refers to a character in a text run. This could \ #[doc = "An index that refers to a character in a text run. This could \
point to the middle of a glyph."] point to the middle of a glyph."]
#[derive(HeapSizeOf)]
struct CharIndex(isize) struct CharIndex(isize)
} }

View file

@ -9,8 +9,9 @@
#![feature(collections)] #![feature(collections)]
#![feature(hash)] #![feature(hash)]
#![feature(rustc_private)] #![feature(rustc_private)]
#![feature(custom_attribute, custom_derive)]
#![plugin(string_cache_plugin)] #![plugin(string_cache_plugin)]
#![plugin(plugins)]
#[macro_use] extern crate log; #[macro_use] extern crate log;
#[macro_use] extern crate bitflags; #[macro_use] extern crate bitflags;

View file

@ -1027,8 +1027,8 @@ pub mod longhands {
#[inline] #[inline]
pub fn get_initial_value() -> computed_value::T { pub fn get_initial_value() -> computed_value::T {
computed_value::T(vec![ computed_value::T(vec![
("\u{201c}".to_string(), "\u{201d}".to_string()), ("\u{201c}".to_owned(), "\u{201d}".to_owned()),
("\u{2018}".to_string(), "\u{2019}".to_string()), ("\u{2018}".to_owned(), "\u{2019}".to_owned()),
]) ])
} }

View file

@ -43,7 +43,7 @@ macro_rules! define_numbered_css_keyword_enum {
}; };
($name: ident: $( $css: expr => $variant: ident = $value: expr ),+) => { ($name: ident: $( $css: expr => $variant: ident = $value: expr ),+) => {
#[allow(non_camel_case_types)] #[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 { pub enum $name {
$( $variant = $value ),+ $( $variant = $value ),+
} }

View file

@ -13,6 +13,7 @@ use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D};
use geometry::Au; use geometry::Au;
use range::Range; use range::Range;
use azure::azure_hl::Color;
extern { extern {
// Get the size of a heap block. // Get the size of a heap block.
@ -196,5 +197,5 @@ known_heap_size!(0, bool, f32, f64);
known_heap_size!(0, Rect<T>, Point2D<T>, Size2D<T>, Matrix2D<T>, SideOffsets2D<T>); known_heap_size!(0, Rect<T>, Point2D<T>, Size2D<T>, Matrix2D<T>, SideOffsets2D<T>);
known_heap_size!(0, Au); known_heap_size!(0, Au, Color);
known_heap_size!(0, Range<T>); known_heap_size!(0, Range<T>);