aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/node.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-12-07 22:54:56 -0800
committerPatrick Walton <pcwalton@mimiga.net>2014-12-15 17:41:37 -0800
commit10f1ed5e311e7092d3e24b58c4960f5e8a511ac0 (patch)
treeef72767ba32a4268b20002c1a80a0d13ea9b47a4 /components/style/node.rs
parente0e14c60d68474a0dec94d2ec71d979a95fbc6a6 (diff)
downloadservo-10f1ed5e311e7092d3e24b58c4960f5e8a511ac0.tar.gz
servo-10f1ed5e311e7092d3e24b58c4960f5e8a511ac0.zip
style: Parse the legacy `border` attribute per the legacy HTML specification.
Additionally, this patch cleans up some miscellaneous formatting issues and refactors files in `layout/css/` somewhat to eliminate needless levels of indirection. It also fixes our handling of presentational hints that only apply if border is nonzero.
Diffstat (limited to 'components/style/node.rs')
-rw-r--r--components/style/node.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/components/style/node.rs b/components/style/node.rs
index 5a765f2798d..3d9ad18e623 100644
--- a/components/style/node.rs
+++ b/components/style/node.rs
@@ -5,7 +5,7 @@
//! Traits that nodes must implement. Breaks the otherwise-cyclic dependency between layout and
//! style.
-use legacy::{IntegerAttribute, LengthAttribute};
+use legacy::{IntegerAttribute, LengthAttribute, UnsignedIntegerAttribute};
use selectors::AttrSelector;
use servo_util::str::LengthOrPercentageOrAuto;
use string_cache::{Atom, Namespace};
@@ -47,6 +47,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 +59,5 @@ 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>;
}