Create a new infrastructure for presentational hints.

This commit is contained in:
Ms2ger 2015-04-26 19:34:26 +02:00
parent 852d973a70
commit 582ee1c2b3
5 changed files with 41 additions and 3 deletions

View file

@ -7,11 +7,16 @@
use cssparser::RGBA;
use legacy::{IntegerAttribute, LengthAttribute, SimpleColorAttribute, UnsignedIntegerAttribute};
use properties::PropertyDeclaration;
use util::str::LengthOrPercentageOrAuto;
use selectors::matching::DeclarationBlock;
use selectors::smallvec::VecLike;
pub use selectors::tree::{TNode, TElement};
pub trait TElementAttributes : Copy {
fn synthesize_presentational_hints_for_legacy_attributes<V>(self, &mut V)
where V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>;
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>;