Rename PrivateStyleData to PersistentStyleData and use AtomicRefCell instead of RefCell as a container.

This allows us to eliminate the unsafe borrows. \o/

MozReview-Commit-ID: 29hpGaWUFQz
This commit is contained in:
Bobby Holley 2016-09-29 17:09:06 -07:00
parent 5bcc4192bf
commit 687e1f701c
12 changed files with 96 additions and 142 deletions

View file

@ -11,7 +11,7 @@ use std::hash::BuildHasherDefault;
use std::sync::Arc;
use std::sync::atomic::AtomicIsize;
pub struct PrivateStyleData {
pub struct PersistentStyleData {
/// The results of CSS styling for this node.
pub style: Option<Arc<ComputedValues>>,
@ -23,9 +23,9 @@ pub struct PrivateStyleData {
pub parallel: DomParallelInfo,
}
impl PrivateStyleData {
impl PersistentStyleData {
pub fn new() -> Self {
PrivateStyleData {
PersistentStyleData {
style: None,
per_pseudo: HashMap::with_hasher(Default::default()),
parallel: DomParallelInfo::new(),