diff --git a/components/layout_2020/dom_traversal.rs b/components/layout_2020/dom_traversal.rs index 1a3a969919c0..d60e779e6658 100644 --- a/components/layout_2020/dom_traversal.rs +++ b/components/layout_2020/dom_traversal.rs @@ -2,13 +2,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ +use crate::cell::ArcRefCell; use crate::context::LayoutContext; use crate::element_data::{LayoutBox, LayoutDataForElement}; use crate::geom::PhysicalSize; use crate::replaced::{CanvasInfo, CanvasSource, ReplacedContent}; use crate::style_ext::{Display, DisplayGeneratingBox, DisplayInside, DisplayOutside}; use crate::wrapper::GetRawData; -use atomic_refcell::{AtomicRefCell, AtomicRefMut}; +use atomic_refcell::AtomicRefMut; use html5ever::LocalName; use net_traits::image::base::Image as NetImage; use script_layout_interface::wrapper_traits::{ @@ -317,12 +318,12 @@ where } pub struct BoxSlot<'dom> { - slot: Option>>>, + slot: Option>>, marker: marker<&'dom ()>, } impl BoxSlot<'_> { - pub(crate) fn new(slot: ServoArc>>) -> Self { + pub(crate) fn new(slot: ArcRefCell>) -> Self { *slot.borrow_mut() = None; let slot = Some(slot); Self { slot, marker } diff --git a/components/layout_2020/element_data.rs b/components/layout_2020/element_data.rs index e8afab10bc76..7385b7d84f04 100644 --- a/components/layout_2020/element_data.rs +++ b/components/layout_2020/element_data.rs @@ -5,19 +5,17 @@ use crate::cell::ArcRefCell; use crate::flow::inline::InlineLevelBox; use crate::flow::BlockLevelBox; -use atomic_refcell::AtomicRefCell; -use servo_arc::Arc; #[derive(Default)] pub struct LayoutDataForElement { - pub(super) self_box: Arc>>, + pub(super) self_box: ArcRefCell>, pub(super) pseudo_elements: Option>, } #[derive(Default)] pub(super) struct PseudoElementBoxes { - pub before: Arc>>, - pub after: Arc>>, + pub before: ArcRefCell>, + pub after: ArcRefCell>, } pub(super) enum LayoutBox {