mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove the ComputedValue traits and style_struct_traits
This commit is contained in:
parent
b2a7e44373
commit
789807b7b0
60 changed files with 589 additions and 652 deletions
|
@ -4,28 +4,28 @@
|
|||
|
||||
//! Per-node data used in style calculation.
|
||||
|
||||
use properties::ComputedValues;
|
||||
use properties::ComputedValuesStruct;
|
||||
use selectors::parser::SelectorImpl;
|
||||
use std::collections::HashMap;
|
||||
use std::hash::BuildHasherDefault;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::AtomicIsize;
|
||||
|
||||
pub struct PrivateStyleData<Impl: SelectorImpl, ConcreteComputedValues: ComputedValues> {
|
||||
pub struct PrivateStyleData<Impl: SelectorImpl> {
|
||||
/// The results of CSS styling for this node.
|
||||
pub style: Option<Arc<ConcreteComputedValues>>,
|
||||
pub style: Option<Arc<ComputedValuesStruct>>,
|
||||
|
||||
/// The results of CSS styling for each pseudo-element (if any).
|
||||
pub per_pseudo: HashMap<Impl::PseudoElement, Arc<ConcreteComputedValues>,
|
||||
pub per_pseudo: HashMap<Impl::PseudoElement, Arc<ComputedValuesStruct>,
|
||||
BuildHasherDefault<::fnv::FnvHasher>>,
|
||||
|
||||
/// Information needed during parallel traversals.
|
||||
pub parallel: DomParallelInfo,
|
||||
}
|
||||
|
||||
impl<Impl, ConcreteComputedValues> PrivateStyleData<Impl, ConcreteComputedValues>
|
||||
where Impl: SelectorImpl, ConcreteComputedValues: ComputedValues {
|
||||
pub fn new() -> PrivateStyleData<Impl, ConcreteComputedValues> {
|
||||
impl<Impl> PrivateStyleData<Impl>
|
||||
where Impl: SelectorImpl {
|
||||
pub fn new() -> Self {
|
||||
PrivateStyleData {
|
||||
style: None,
|
||||
per_pseudo: HashMap::with_hasher(Default::default()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue