From c6ff02199d2811ade854aa8df6b36d70429bdbea Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 28 Nov 2014 17:44:00 +0000 Subject: [PATCH] Remove dead code --- components/style/properties/common_types.rs | 2 -- components/style/properties/mod.rs.mako | 31 ++++++++------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/components/style/properties/common_types.rs b/components/style/properties/common_types.rs index d527e024929..4f68f77bcd0 100644 --- a/components/style/properties/common_types.rs +++ b/components/style/properties/common_types.rs @@ -10,8 +10,6 @@ pub use servo_util::geometry::Au; pub type CSSFloat = f64; -pub static DEFAULT_LINE_HEIGHT: CSSFloat = 1.14; - pub mod specified { use std::ascii::AsciiExt; use std::f64::consts::PI; diff --git a/components/style/properties/mod.rs.mako b/components/style/properties/mod.rs.mako index dabf5452c9b..789dc14f45f 100644 --- a/components/style/properties/mod.rs.mako +++ b/components/style/properties/mod.rs.mako @@ -1487,26 +1487,19 @@ mod property_bit_field { fn set(&mut self, bit: uint) { self.storage[bit / uint::BITS] |= 1 << (bit % uint::BITS) } - #[inline] - fn clear(&mut self, bit: uint) { - self.storage[bit / uint::BITS] &= !(1 << (bit % uint::BITS)) - } % for i, property in enumerate(LONGHANDS): - #[allow(non_snake_case)] - #[inline] - pub fn get_${property.ident}(&self) -> bool { - self.get(${i}) - } - #[allow(non_snake_case)] - #[inline] - pub fn set_${property.ident}(&mut self) { - self.set(${i}) - } - #[allow(non_snake_case)] - #[inline] - pub fn clear_${property.ident}(&mut self) { - self.clear(${i}) - } + % if property.derived_from is None: + #[allow(non_snake_case)] + #[inline] + pub fn get_${property.ident}(&self) -> bool { + self.get(${i}) + } + #[allow(non_snake_case)] + #[inline] + pub fn set_${property.ident}(&mut self) { + self.set(${i}) + } + % endif % endfor } }