aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-11-29 00:51:43 -0700
committerbors-servo <metajack+bors@gmail.com>2014-11-29 00:51:43 -0700
commite9aec8b9a730e41d87a2796a5bc2b0bbd90bd3cc (patch)
treee0b005a4db554f5b2618aa5579449a42a1f69c83
parent9c3b2ae8a58f5e3fa91a6dc164c136291765a86f (diff)
parentc6ff02199d2811ade854aa8df6b36d70429bdbea (diff)
downloadservo-e9aec8b9a730e41d87a2796a5bc2b0bbd90bd3cc.tar.gz
servo-e9aec8b9a730e41d87a2796a5bc2b0bbd90bd3cc.zip
auto merge of #4141 : SimonSapin/servo/style-cleanup, r=jdm
-rw-r--r--components/style/lib.rs2
-rw-r--r--components/style/properties/common_types.rs2
-rw-r--r--components/style/properties/mod.rs.mako31
3 files changed, 13 insertions, 22 deletions
diff --git a/components/style/lib.rs b/components/style/lib.rs
index aa9bc551dd3..e6e0e77f7a5 100644
--- a/components/style/lib.rs
+++ b/components/style/lib.rs
@@ -46,7 +46,7 @@ pub use properties::{cascade, cascade_anonymous, computed};
pub use properties::{PropertyDeclaration, ComputedValues, computed_values, style_structs};
pub use properties::{PropertyDeclarationBlock, parse_style_attribute}; // Style attributes
pub use properties::{CSSFloat, DeclaredValue, PropertyDeclarationParseResult};
-pub use properties::{longhands, Angle, AngleOrCorner, AngleAoc, CornerAoc};
+pub use properties::{Angle, AngleOrCorner, AngleAoc, CornerAoc};
pub use properties::{Left, Right, Bottom, Top};
pub use node::{TElement, TElementAttributes, TNode};
pub use selectors::{PseudoElement, Before, After, SelectorList, parse_selector_list_from_str};
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
}
}