mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove borrow_data and mutate_data from TNode.
The new restyle architecture doesn't store these things in consistent places, so we need a more abstract API.
This commit is contained in:
parent
ddbc016f51
commit
bfbbef6ecd
9 changed files with 115 additions and 84 deletions
|
@ -10,13 +10,14 @@ use std::collections::HashMap;
|
|||
use std::hash::BuildHasherDefault;
|
||||
use std::sync::Arc;
|
||||
|
||||
pub type PseudoStyles = HashMap<PseudoElement, Arc<ComputedValues>,
|
||||
BuildHasherDefault<::fnv::FnvHasher>>;
|
||||
pub struct PersistentStyleData {
|
||||
/// The results of CSS styling for this node.
|
||||
pub style: Option<Arc<ComputedValues>>,
|
||||
|
||||
/// The results of CSS styling for each pseudo-element (if any).
|
||||
pub per_pseudo: HashMap<PseudoElement, Arc<ComputedValues>,
|
||||
BuildHasherDefault<::fnv::FnvHasher>>,
|
||||
pub per_pseudo: PseudoStyles,
|
||||
}
|
||||
|
||||
impl PersistentStyleData {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue