use crate::{ group_bounds, AnyElement, DispatchPhase, Element, IntoAnyElement, MouseMoveEvent, SharedString, Style, StyleCascade, StyleRefinement, }; use refineable::{CascadeSlot, Refineable}; use smallvec::SmallVec; use std::sync::{ atomic::{AtomicBool, Ordering::SeqCst}, Arc, }; trait LayoutNode { fn state(&mut self) -> &mut LayoutNodeState; fn child(mut self, child: impl IntoAnyElement) -> Self where Self: Sized, { self.state().children.push(child.into_any()); self } fn children(mut self, children: C) -> Self where C: IntoIterator, E: IntoAnyElement, Self: Sized, { for child in children { self.state().children.push(child.into_any()); } self } } struct LayoutNodeState { style_cascade: StyleCascade, computed_style: Option