mirror of
https://github.com/servo/servo.git
synced 2025-06-21 15:49:04 +01:00
The util component specified fnv and smallvec as dependencies and publicly reexported both of them. Several other components utilized these reexports, presumably because fnv and smallvec used to live in the tree so reexporting made the transition easier. These indirect dependencies through the util component are unnecessary. This commit removes the fnv & smallvec crate reexports in the util component. It exchange, it adds fnv & smallvec as dependencies to non-util components wherever needed. Finally, it removes the fnv dependency from util as it is not utilized anywhere in the util component.
23 lines
959 B
Rust
23 lines
959 B
Rust
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
//! Traits that nodes must implement. Breaks the otherwise-cyclic dependency between layout and
|
|
//! style.
|
|
|
|
use legacy::UnsignedIntegerAttribute;
|
|
use properties::PropertyDeclaration;
|
|
use smallvec::VecLike;
|
|
|
|
use selectors::matching::DeclarationBlock;
|
|
pub use selectors::tree::{TNode, TElement};
|
|
use string_cache::{Atom, Namespace};
|
|
|
|
pub trait TElementAttributes<'a> : Copy {
|
|
fn synthesize_presentational_hints_for_legacy_attributes<V>(self, &mut V)
|
|
where V: VecLike<DeclarationBlock<Vec<PropertyDeclaration>>>;
|
|
fn get_unsigned_integer_attribute(self, attribute: UnsignedIntegerAttribute) -> Option<u32>;
|
|
|
|
fn get_attr(self, namespace: &Namespace, attr: &Atom) -> Option<&'a str>;
|
|
fn get_attrs(self, attr: &Atom) -> Vec<&'a str>;
|
|
}
|