diff options
Diffstat (limited to 'components/style/node.rs')
-rw-r--r-- | components/style/node.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/style/node.rs b/components/style/node.rs index 5a765f2798d..a1c9a8071c4 100644 --- a/components/style/node.rs +++ b/components/style/node.rs @@ -5,7 +5,8 @@ //! Traits that nodes must implement. Breaks the otherwise-cyclic dependency between layout and //! style. -use legacy::{IntegerAttribute, LengthAttribute}; +use cssparser::RGBA; +use legacy::{IntegerAttribute, LengthAttribute, SimpleColorAttribute, UnsignedIntegerAttribute}; use selectors::AttrSelector; use servo_util::str::LengthOrPercentageOrAuto; use string_cache::{Atom, Namespace}; @@ -47,6 +48,7 @@ pub trait TElement<'a> : Copy { fn get_enabled_state(self) -> bool; fn get_checked_state(self) -> bool; fn has_class(self, name: &Atom) -> bool; + fn has_nonzero_border(self) -> bool; // Ordinarily I wouldn't use callbacks like this, but the alternative is // really messy, since there is a `JSRef` and a `RefCell` involved. Maybe @@ -58,4 +60,6 @@ pub trait TElement<'a> : Copy { pub trait TElementAttributes : Copy { fn get_length_attribute(self, attribute: LengthAttribute) -> LengthOrPercentageOrAuto; fn get_integer_attribute(self, attribute: IntegerAttribute) -> Option<i32>; + fn get_unsigned_integer_attribute(self, attribute: UnsignedIntegerAttribute) -> Option<u32>; + fn get_simple_color_attribute(self, attribute: SimpleColorAttribute) -> Option<RGBA>; } |