mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Move get_attr and get_attrs into TElementAttributes.
These methods are only called on LayoutElement.
This commit is contained in:
parent
2ff18b6b95
commit
34e35df986
9 changed files with 36 additions and 45 deletions
|
@ -63,7 +63,7 @@ pub trait PresentationalHintSynthesis {
|
|||
matching_rules_list: &mut V,
|
||||
shareable: &mut bool)
|
||||
where N: TNode<'a>,
|
||||
N::Element: TElementAttributes,
|
||||
N::Element: TElementAttributes<'a>,
|
||||
V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>;
|
||||
/// Synthesizes rules for the legacy `border` attribute.
|
||||
fn synthesize_presentational_hint_for_legacy_border_attribute<'a,E,V>(
|
||||
|
@ -73,7 +73,7 @@ pub trait PresentationalHintSynthesis {
|
|||
shareable: &mut bool)
|
||||
where
|
||||
E: TElement<'a> +
|
||||
TElementAttributes,
|
||||
TElementAttributes<'a>,
|
||||
V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ impl PresentationalHintSynthesis for Stylist {
|
|||
matching_rules_list: &mut V,
|
||||
shareable: &mut bool)
|
||||
where N: TNode<'a>,
|
||||
N::Element: TElementAttributes,
|
||||
N::Element: TElementAttributes<'a>,
|
||||
V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>> {
|
||||
let element = node.as_element();
|
||||
|
||||
|
@ -199,7 +199,7 @@ impl PresentationalHintSynthesis for Stylist {
|
|||
shareable: &mut bool)
|
||||
where
|
||||
E: TElement<'a> +
|
||||
TElementAttributes,
|
||||
TElementAttributes<'a>,
|
||||
V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>> {
|
||||
match element.get_unsigned_integer_attribute(UnsignedIntegerAttribute::Border) {
|
||||
None => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue