mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Parse the legacy bgcolor
attribute per the HTML5 specification.
Additionally, this patch cleans up some miscellaneous formatting issues.
This commit is contained in:
parent
10f1ed5e31
commit
14bafb11be
19 changed files with 370 additions and 36 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue