mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
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:
parent
5bcc4192bf
commit
687e1f701c
12 changed files with 96 additions and 142 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue