aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/legacy.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2014-12-18 11:03:55 -0700
committerbors-servo <metajack+bors@gmail.com>2014-12-18 11:03:55 -0700
commit1f342638c46d6b43bca4cfbd405aceedc0465a85 (patch)
treedd6530af6b23cfe07cd1c0bcd8d7e1598c4024e7 /components/style/legacy.rs
parent7df37847d3a0a02da6917c669fe62a5e4af7efcd (diff)
parent135ee60f5a4f8676c32bef837a8c1152cd7610e4 (diff)
downloadservo-1f342638c46d6b43bca4cfbd405aceedc0465a85.tar.gz
servo-1f342638c46d6b43bca4cfbd405aceedc0465a85.zip
auto merge of #4424 : saneyuki/servo/glob_style, r=SimonSapin
#4406
Diffstat (limited to 'components/style/legacy.rs')
-rw-r--r--components/style/legacy.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/components/style/legacy.rs b/components/style/legacy.rs
index 504471d7b04..357609cc534 100644
--- a/components/style/legacy.rs
+++ b/components/style/legacy.rs
@@ -5,9 +5,6 @@
//! Legacy presentational attributes defined in the HTML5 specification: `<td width>`,
//! `<input size>`, and so forth.
-use self::UnsignedIntegerAttribute::*;
-use self::SimpleColorAttribute::*;
-
use node::{TElement, TElementAttributes, TNode};
use properties::DeclaredValue::SpecifiedValue;
use properties::PropertyDeclaration::*;
@@ -36,15 +33,15 @@ pub enum IntegerAttribute {
/// Legacy presentational attributes that take a nonnegative integer as defined in HTML5 § 2.4.4.2.
pub enum UnsignedIntegerAttribute {
/// `<td border>`
- BorderUnsignedIntegerAttribute,
+ Border,
/// `<td colspan>`
- ColSpanUnsignedIntegerAttribute,
+ ColSpan,
}
/// Legacy presentational attributes that take a simple color as defined in HTML5 § 2.4.6.
pub enum SimpleColorAttribute {
/// `<body bgcolor>`
- BgColorSimpleColorAttribute,
+ BgColor,
}
/// Extension methods for `Stylist` that cause rules to be synthesized for legacy attributes.
@@ -210,7 +207,7 @@ impl PresentationalHintSynthesis for Stylist {
TElementAttributes,
V: VecLike<
DeclarationBlock> {
- match element.get_simple_color_attribute(BgColorSimpleColorAttribute) {
+ match element.get_simple_color_attribute(SimpleColorAttribute::BgColor) {
None => {}
Some(color) => {
matching_rules_list.vec_push(DeclarationBlock::from_declaration(
@@ -229,7 +226,7 @@ impl PresentationalHintSynthesis for Stylist {
E: TElement<'a> +
TElementAttributes,
V: VecLike<DeclarationBlock> {
- match element.get_unsigned_integer_attribute(BorderUnsignedIntegerAttribute) {
+ match element.get_unsigned_integer_attribute(UnsignedIntegerAttribute::Border) {
None => {}
Some(length) => {
let width_value = specified::Length::Au(Au::from_px(length as int));