diff --git a/components/layout/incremental.rs b/components/layout/incremental.rs index e3007511f8e..4e313f088bb 100644 --- a/components/layout/incremental.rs +++ b/components/layout/incremental.rs @@ -22,13 +22,8 @@ bitflags! { } } -pub trait LayoutDamageComputation { - fn compute_layout_damage(self) -> SpecialRestyleDamage; - fn reflow_entire_document(self); -} - -impl<'a> LayoutDamageComputation for &'a mut dyn Flow { - fn compute_layout_damage(self) -> SpecialRestyleDamage { +impl dyn Flow { + pub fn compute_layout_damage(&mut self) -> SpecialRestyleDamage { let mut special_damage = SpecialRestyleDamage::empty(); let is_absolutely_positioned = self .base() @@ -91,7 +86,7 @@ impl<'a> LayoutDamageComputation for &'a mut dyn Flow { special_damage } - fn reflow_entire_document(self) { + pub fn reflow_entire_document(&mut self) { let self_base = self.mut_base(); self_base .restyle_damage diff --git a/components/layout_thread/lib.rs b/components/layout_thread/lib.rs index aebfeebe440..d0c4cd9e4da 100644 --- a/components/layout_thread/lib.rs +++ b/components/layout_thread/lib.rs @@ -45,7 +45,7 @@ use layout::display_list::items::{OpaqueNode, WebRenderImageInfo}; use layout::display_list::{IndexableText, ToLayout, WebRenderDisplayListConverter}; use layout::flow::{Flow, GetBaseFlow, ImmutableFlowUtils, MutableOwnedFlowUtils}; use layout::flow_ref::FlowRef; -use layout::incremental::{LayoutDamageComputation, RelayoutMode, SpecialRestyleDamage}; +use layout::incremental::{RelayoutMode, SpecialRestyleDamage}; use layout::layout_debug; use layout::parallel; use layout::query::{