From cfa9aaac081a5c33b5b31b82ef578c1c26e253b0 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 4 Jul 2014 11:56:18 +0200 Subject: [PATCH] Remove some unused fields. --- .../compositing/platform/common/glfw_windowing.rs | 4 ---- src/components/gfx/text/shaping/harfbuzz.rs | 2 -- src/components/layout/flow_list.rs | 11 ----------- src/components/style/stylesheets.rs | 5 +---- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/components/compositing/platform/common/glfw_windowing.rs b/src/components/compositing/platform/common/glfw_windowing.rs index ae4eaf57bb6..8fea3535fc9 100644 --- a/src/components/compositing/platform/common/glfw_windowing.rs +++ b/src/components/compositing/platform/common/glfw_windowing.rs @@ -92,8 +92,6 @@ pub struct Window { event_queue: RefCell>, - drag_origin: Point2D, - mouse_down_button: Cell>, mouse_down_point: Cell>, @@ -121,8 +119,6 @@ impl WindowMethods for Window { event_queue: RefCell::new(vec!()), - drag_origin: Point2D(0 as c_int, 0), - mouse_down_button: Cell::new(None), mouse_down_point: Cell::new(Point2D(0 as c_int, 0)), diff --git a/src/components/gfx/text/shaping/harfbuzz.rs b/src/components/gfx/text/shaping/harfbuzz.rs index 251ddb8ab36..b6646db771a 100644 --- a/src/components/gfx/text/shaping/harfbuzz.rs +++ b/src/components/gfx/text/shaping/harfbuzz.rs @@ -53,7 +53,6 @@ pub struct ShapedGlyphData { } pub struct ShapedGlyphEntry { - cluster: int, codepoint: GlyphId, advance: Au, offset: Option>, @@ -123,7 +122,6 @@ impl ShapedGlyphData { }; ShapedGlyphEntry { - cluster: (*glyph_info_i).cluster as int, codepoint: (*glyph_info_i).codepoint as GlyphId, advance: x_advance, offset: offset, diff --git a/src/components/layout/flow_list.rs b/src/components/layout/flow_list.rs index e136c29282f..1bb30572da9 100644 --- a/src/components/layout/flow_list.rs +++ b/src/components/layout/flow_list.rs @@ -33,7 +33,6 @@ pub struct FlowList { /// Double-ended FlowList iterator pub struct FlowListIterator<'a> { head: &'a Link, - tail: Rawlink, nelem: uint, } @@ -41,7 +40,6 @@ pub struct FlowListIterator<'a> { pub struct MutFlowListIterator<'a> { list: &'a mut FlowList, head: Rawlink, - tail: Rawlink, nelem: uint, } @@ -59,13 +57,6 @@ impl Rawlink { unsafe { mem::transmute(n) } } - fn from_optional_flow_ref(flow_ref: &Option) -> Rawlink { - match *flow_ref { - None => Rawlink::none(), - Some(ref flow_ref) => Rawlink::some(flow_ref.get()), - } - } - pub unsafe fn resolve_mut(&self) -> Option<&mut Flow> { if self.obj.is_null() { None @@ -204,7 +195,6 @@ impl FlowList { FlowListIterator { nelem: self.len(), head: &self.list_head, - tail: Rawlink::from_optional_flow_ref(&self.list_tail) } } @@ -218,7 +208,6 @@ impl FlowList { MutFlowListIterator { nelem: self.len(), head: head_raw, - tail: Rawlink::from_optional_flow_ref(&self.list_tail), list: self } } diff --git a/src/components/style/stylesheets.rs b/src/components/style/stylesheets.rs index cfe1c52a1c4..801fa70d095 100644 --- a/src/components/style/stylesheets.rs +++ b/src/components/style/stylesheets.rs @@ -22,9 +22,6 @@ pub struct Stylesheet { /// List of rules in the order they were found (important for /// cascading order) pub rules: Vec, - namespaces: NamespaceMap, - encoding: EncodingRef, - base_url: Url, } @@ -120,7 +117,7 @@ impl Stylesheet { } state = next_state; } - Stylesheet{ rules: rules, namespaces: namespaces, encoding: encoding, base_url: base_url } + Stylesheet{ rules: rules } } }