diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2014-12-07 22:59:38 -0800 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2014-12-15 17:41:44 -0800 |
commit | 14bafb11bec973cd1362ff38a8e4aa2385c6ff37 (patch) | |
tree | e1dd41c6f1a2829e2be800cb27e7bdd4ee5f0a4f /components/layout | |
parent | 10f1ed5e311e7092d3e24b58c4960f5e8a511ac0 (diff) | |
download | servo-14bafb11bec973cd1362ff38a8e4aa2385c6ff37.tar.gz servo-14bafb11bec973cd1362ff38a8e4aa2385c6ff37.zip |
style: Parse the legacy `bgcolor` attribute per the HTML5 specification.
Additionally, this patch cleans up some miscellaneous formatting issues.
Diffstat (limited to 'components/layout')
-rw-r--r-- | components/layout/wrapper.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/components/layout/wrapper.rs b/components/layout/wrapper.rs index ba16eb885a9..41c05e1646c 100644 --- a/components/layout/wrapper.rs +++ b/components/layout/wrapper.rs @@ -53,14 +53,14 @@ use script::dom::node::{HAS_CHANGED, IS_DIRTY, HAS_DIRTY_SIBLINGS, HAS_DIRTY_DES use script::dom::text::Text; use script::layout_interface::LayoutChan; use servo_msg::constellation_msg::{PipelineId, SubpageId}; -use servo_util::str::{LengthOrPercentageOrAuto, is_whitespace}; +use servo_util::str::{LengthOrPercentageOrAuto, SimpleColor, is_whitespace}; use std::kinds::marker::ContravariantLifetime; use std::mem; use string_cache::{Atom, Namespace}; use style::computed_values::{content, display, white_space}; use style::{AnyNamespace, AttrSelector, BorderUnsignedIntegerAttribute, IntegerAttribute}; -use style::{LengthAttribute, PropertyDeclarationBlock, SpecificNamespace, TElement}; -use style::{TElementAttributes, TNode, UnsignedIntegerAttribute}; +use style::{LengthAttribute, PropertyDeclarationBlock, SimpleColorAttribute, SpecificNamespace}; +use style::{TElement, TElementAttributes, TNode, UnsignedIntegerAttribute}; use url::Url; use std::cell::{Ref, RefMut}; @@ -612,6 +612,12 @@ impl<'le> TElementAttributes for LayoutElement<'le> { self.element.get_unsigned_integer_attribute_for_layout(attribute) } } + + fn get_simple_color_attribute(self, attribute: SimpleColorAttribute) -> Option<SimpleColor> { + unsafe { + self.element.get_simple_color_attribute_for_layout(attribute) + } + } } fn get_content(content_list: &content::T) -> String { |