style: Parse the legacy bgcolor attribute per the HTML5 specification.

Additionally, this patch cleans up some miscellaneous formatting issues.
This commit is contained in:
Patrick Walton 2014-12-07 22:59:38 -08:00
parent 10f1ed5e31
commit 14bafb11be
19 changed files with 370 additions and 36 deletions

View file

@ -5,9 +5,9 @@
//! Traits that nodes must implement. Breaks the otherwise-cyclic dependency between layout and
//! style.
use legacy::{IntegerAttribute, LengthAttribute, UnsignedIntegerAttribute};
use legacy::{IntegerAttribute, LengthAttribute, SimpleColorAttribute, UnsignedIntegerAttribute};
use selectors::AttrSelector;
use servo_util::str::LengthOrPercentageOrAuto;
use servo_util::str::{LengthOrPercentageOrAuto, SimpleColor};
use string_cache::{Atom, Namespace};
pub trait TNode<'a, E: TElement<'a>> : Clone + Copy {
@ -60,4 +60,5 @@ 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<SimpleColor>;
}