diff --git a/components/layout_2020/dom_traversal.rs b/components/layout_2020/dom_traversal.rs index 236e69b3d19..67d616df787 100644 --- a/components/layout_2020/dom_traversal.rs +++ b/components/layout_2020/dom_traversal.rs @@ -8,7 +8,7 @@ use crate::style_ext::{Display, DisplayGeneratingBox, DisplayInside, DisplayOuts use crate::wrapper::GetRawData; use atomic_refcell::{AtomicRefCell, AtomicRefMut}; use script_layout_interface::wrapper_traits::{LayoutNode, ThreadSafeLayoutNode}; -use servo_arc::Arc; +use servo_arc::Arc as ServoArc; use std::convert::TryInto; use std::marker::PhantomData as marker; use style::context::SharedStyleContext; @@ -49,12 +49,12 @@ pub(super) trait TraversalHandler<'dom, Node> where Node: 'dom, { - fn handle_text(&mut self, text: String, parent_style: &Arc); + fn handle_text(&mut self, text: String, parent_style: &ServoArc); /// Or pseudo-element fn handle_element( &mut self, - style: &Arc, + style: &ServoArc, display: DisplayGeneratingBox, contents: Contents, box_slot: BoxSlot<'dom>, @@ -144,7 +144,7 @@ fn traverse_pseudo_element<'dom, Node>( } fn traverse_pseudo_element_contents<'dom, Node>( - pseudo_element_style: &Arc, + pseudo_element_style: &ServoArc, context: &SharedStyleContext, handler: &mut impl TraversalHandler<'dom, Node>, items: Vec, @@ -213,7 +213,7 @@ where { pub(crate) fn traverse( self, - inherited_style: &Arc, + inherited_style: &ServoArc, context: &SharedStyleContext, handler: &mut impl TraversalHandler<'dom, Node>, ) { @@ -230,7 +230,7 @@ fn pseudo_element_style<'dom, Node>( _which: WhichPseudoElement, _element: Node, _context: &SharedStyleContext, -) -> Option> +) -> Option> where Node: NodeExt<'dom>, { @@ -253,12 +253,12 @@ where } pub struct BoxSlot<'dom> { - slot: Option>>>, + slot: Option>>>, marker: marker<&'dom ()>, } impl BoxSlot<'_> { - pub(crate) fn new(slot: Arc>>) -> Self { + pub(crate) fn new(slot: ServoArc>>) -> Self { *slot.borrow_mut() = None; let slot = Some(slot); Self { slot, marker } @@ -290,7 +290,7 @@ pub trait NodeExt<'dom>: 'dom + Copy + LayoutNode + Send + Sync { fn first_child(self) -> Option; fn next_sibling(self) -> Option; fn parent_node(self) -> Option; - fn style(self, context: &SharedStyleContext) -> Arc; + fn style(self, context: &SharedStyleContext) -> ServoArc; fn layout_data_mut(&self) -> AtomicRefMut; fn element_box_slot(&self) -> BoxSlot<'dom>; @@ -327,7 +327,7 @@ where TNode::parent_node(&self) } - fn style(self, context: &SharedStyleContext) -> Arc { + fn style(self, context: &SharedStyleContext) -> ServoArc { self.to_threadsafe().style(context) }