Struct script::layout_dom::ServoShadowRoot
source · pub struct ServoShadowRoot<'dom> {
shadow_root: LayoutDom<'dom, ShadowRoot>,
}
Fields§
§shadow_root: LayoutDom<'dom, ShadowRoot>
The wrapped private DOM ShadowRoot.
Implementations§
source§impl<'dom> ServoShadowRoot<'dom>
impl<'dom> ServoShadowRoot<'dom>
pub(super) fn from_layout_js(shadow_root: LayoutDom<'dom, ShadowRoot>) -> Self
sourcepub unsafe fn flush_stylesheets(
&self,
stylist: &mut Stylist,
guard: &StyleSharedRwLockReadGuard<'_>,
)
pub unsafe fn flush_stylesheets( &self, stylist: &mut Stylist, guard: &StyleSharedRwLockReadGuard<'_>, )
Flush the stylesheets for the underlying shadow root.
§Safety
This modifies a DOM object, so should care should be taken that only one thread has a reference to this object.
Trait Implementations§
source§impl<'dom> Clone for ServoShadowRoot<'dom>
impl<'dom> Clone for ServoShadowRoot<'dom>
source§fn clone(&self) -> ServoShadowRoot<'dom>
fn clone(&self) -> ServoShadowRoot<'dom>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'dom> Debug for ServoShadowRoot<'dom>
impl<'dom> Debug for ServoShadowRoot<'dom>
source§impl<'dom> PartialEq for ServoShadowRoot<'dom>
impl<'dom> PartialEq for ServoShadowRoot<'dom>
source§fn eq(&self, other: &ServoShadowRoot<'dom>) -> bool
fn eq(&self, other: &ServoShadowRoot<'dom>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'dom> TShadowRoot for ServoShadowRoot<'dom>
impl<'dom> TShadowRoot for ServoShadowRoot<'dom>
§type ConcreteNode = ServoLayoutNode<'dom>
type ConcreteNode = ServoLayoutNode<'dom>
The concrete node type.
source§fn as_node(&self) -> Self::ConcreteNode
fn as_node(&self) -> Self::ConcreteNode
Get this ShadowRoot as a node.
source§fn host(&self) -> ServoLayoutElement<'dom>
fn host(&self) -> ServoLayoutElement<'dom>
Get the shadow host that hosts this ShadowRoot.
source§fn style_data<'a>(&self) -> Option<&'a CascadeData>where
Self: 'a,
fn style_data<'a>(&self) -> Option<&'a CascadeData>where
Self: 'a,
Get the style data for this ShadowRoot.
source§fn parts<'a>(&self) -> &[<Self::ConcreteNode as TNode>::ConcreteElement]where
Self: 'a,
fn parts<'a>(&self) -> &[<Self::ConcreteNode as TNode>::ConcreteElement]where
Self: 'a,
Get the list of shadow parts for this shadow root.
source§fn elements_with_id<'a>(
&self,
_id: &GenericAtomIdent<AtomStaticSet>,
) -> Result<&'a [<Self::ConcreteNode as TNode>::ConcreteElement], ()>where
Self: 'a,
fn elements_with_id<'a>(
&self,
_id: &GenericAtomIdent<AtomStaticSet>,
) -> Result<&'a [<Self::ConcreteNode as TNode>::ConcreteElement], ()>where
Self: 'a,
Get a list of elements with a given ID in this shadow root, sorted by
tree position. Read more
source§fn implicit_scope_for_sheet(
&self,
_sheet_index: usize,
) -> Option<ImplicitScopeRoot>
fn implicit_scope_for_sheet( &self, _sheet_index: usize, ) -> Option<ImplicitScopeRoot>
Get the implicit scope for a stylesheet in given index.
impl<'dom> Copy for ServoShadowRoot<'dom>
impl<'dom> StructuralPartialEq for ServoShadowRoot<'dom>
Auto Trait Implementations§
impl<'dom> Freeze for ServoShadowRoot<'dom>
impl<'dom> !RefUnwindSafe for ServoShadowRoot<'dom>
impl<'dom> !Send for ServoShadowRoot<'dom>
impl<'dom> !Sync for ServoShadowRoot<'dom>
impl<'dom> Unpin for ServoShadowRoot<'dom>
impl<'dom> !UnwindSafe for ServoShadowRoot<'dom>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert