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

@ -52,11 +52,11 @@ use core::nonzero::NonZero;
use ipc_channel::ipc::IpcSender;
use libc::c_void;
use restyle_damage::RestyleDamage;
use style::data::PrivateStyleData;
use style::refcell::RefCell;
use style::atomic_refcell::AtomicRefCell;
use style::data::PersistentStyleData;
pub struct PartialStyleAndLayoutData {
pub style_data: PrivateStyleData,
pub struct PartialPersistentLayoutData {
pub style_data: PersistentStyleData,
pub restyle_damage: RestyleDamage,
}
@ -64,7 +64,7 @@ pub struct PartialStyleAndLayoutData {
pub struct OpaqueStyleAndLayoutData {
#[ignore_heap_size_of = "TODO(#6910) Box value that should be counted but \
the type lives in layout"]
pub ptr: NonZero<*mut RefCell<PartialStyleAndLayoutData>>
pub ptr: NonZero<*mut AtomicRefCell<PartialPersistentLayoutData>>
}
#[allow(unsafe_code)]