aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout_2020
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2020-03-13 19:30:08 -0700
committerPatrick Walton <pcwalton@mimiga.net>2020-03-17 11:15:17 -0700
commit1d9f669cf0b19de339692729b4c49971aa338147 (patch)
treed47438398f8eaf93d73184d4f8d784c43550114d /components/layout_2020
parent5b3f27746529c746231d1d1ddef83b5c4e0b2160 (diff)
downloadservo-1d9f669cf0b19de339692729b4c49971aa338147.tar.gz
servo-1d9f669cf0b19de339692729b4c49971aa338147.zip
Switch some uses of `Arc<AtomicRefCell<T>>` over to `ArcRefCell<T>`
Diffstat (limited to 'components/layout_2020')
-rw-r--r--components/layout_2020/dom_traversal.rs7
-rw-r--r--components/layout_2020/element_data.rs8
2 files changed, 7 insertions, 8 deletions
diff --git a/components/layout_2020/dom_traversal.rs b/components/layout_2020/dom_traversal.rs
index 1a3a969919c..d60e779e665 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<ServoArc<AtomicRefCell<Option<LayoutBox>>>>,
+ slot: Option<ArcRefCell<Option<LayoutBox>>>,
marker: marker<&'dom ()>,
}
impl BoxSlot<'_> {
- pub(crate) fn new(slot: ServoArc<AtomicRefCell<Option<LayoutBox>>>) -> Self {
+ pub(crate) fn new(slot: ArcRefCell<Option<LayoutBox>>) -> 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 e8afab10bc7..7385b7d84f0 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<AtomicRefCell<Option<LayoutBox>>>,
+ pub(super) self_box: ArcRefCell<Option<LayoutBox>>,
pub(super) pseudo_elements: Option<Box<PseudoElementBoxes>>,
}
#[derive(Default)]
pub(super) struct PseudoElementBoxes {
- pub before: Arc<AtomicRefCell<Option<LayoutBox>>>,
- pub after: Arc<AtomicRefCell<Option<LayoutBox>>>,
+ pub before: ArcRefCell<Option<LayoutBox>>,
+ pub after: ArcRefCell<Option<LayoutBox>>,
}
pub(super) enum LayoutBox {