mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Remove glob imports added in #4405
This commit is contained in:
parent
d7f38a8973
commit
135ee60f5a
7 changed files with 53 additions and 58 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue