Replace OpaqueStyleAndLayoutData by StyleAndOpaqueLayoutData

This commit is contained in:
Anthony Ramine 2020-04-06 14:42:05 +02:00
parent 88d79fe46d
commit 030a1cf8fb
12 changed files with 129 additions and 162 deletions

View file

@ -6,17 +6,7 @@ use crate::element_data::LayoutDataForElement;
use atomic_refcell::AtomicRefCell;
use script_layout_interface::StyleData;
#[repr(C)]
pub struct StyleAndLayoutData {
pub style_data: StyleData,
pub(super) layout_data: AtomicRefCell<LayoutDataForElement>,
}
impl StyleAndLayoutData {
pub fn new() -> Self {
Self {
style_data: StyleData::new(),
layout_data: Default::default(),
}
}
pub struct StyleAndLayoutData<'dom> {
pub style_data: &'dom StyleData,
pub(super) layout_data: &'dom AtomicRefCell<LayoutDataForElement>,
}