Move bgcolor over to the new infrastructure.

Note that I call is_htmltabledatacellelement in
synthesize_presentational_hints_for_legacy_attributes, rather than
is_htmltablecellelement (which was used in
get_simple_color_attribute_for_layout), because that function was never called
for th elements.
This commit is contained in:
Ms2ger 2015-04-26 22:22:12 +02:00
parent 582ee1c2b3
commit e3440c8a59
4 changed files with 33 additions and 102 deletions

View file

@ -39,7 +39,6 @@ use incremental::RestyleDamage;
use data::{LayoutDataAccess, LayoutDataFlags, LayoutDataWrapper, PrivateLayoutData};
use opaque_node::OpaqueNodeMethods;
use cssparser::RGBA;
use gfx::display_list::OpaqueNode;
use script::dom::bindings::codegen::InheritTypes::{CharacterDataCast, ElementCast};
use script::dom::bindings::codegen::InheritTypes::{HTMLIFrameElementCast, HTMLCanvasElementCast};
@ -73,7 +72,7 @@ use style::computed_values::{content, display, white_space};
use selectors::matching::DeclarationBlock;
use selectors::parser::{NamespaceConstraint, AttrSelector};
use selectors::smallvec::VecLike;
use style::legacy::{IntegerAttribute, LengthAttribute, SimpleColorAttribute};
use style::legacy::{IntegerAttribute, LengthAttribute};
use style::legacy::{UnsignedIntegerAttribute};
use style::node::{TElement, TElementAttributes, TNode};
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
@ -686,12 +685,6 @@ impl<'le> TElementAttributes for LayoutElement<'le> {
self.element.get_unsigned_integer_attribute_for_layout(attribute)
}
}
fn get_simple_color_attribute(self, attribute: SimpleColorAttribute) -> Option<RGBA> {
unsafe {
self.element.get_simple_color_attribute_for_layout(attribute)
}
}
}
fn get_content(content_list: &content::T) -> Vec<ContentItem> {