pub struct ServoDangerousStyleDocument<'dom> {
document: LayoutDom<'dom, Document>,
}Expand description
A wrapper around documents that ensures layout can only ever access safe properties.
TODO: This should become a trait like LayoutNode.
Fields§
§document: LayoutDom<'dom, Document>The wrapped private DOM Document
Implementations§
Source§impl<'dom> ServoDangerousStyleDocument<'dom>
impl<'dom> ServoDangerousStyleDocument<'dom>
Sourcepub fn root_element(&self) -> Option<ServoLayoutElement<'dom>>
pub fn root_element(&self) -> Option<ServoLayoutElement<'dom>>
Get the root node for this ServoDangerousStyleDocument.
Get the shared style lock for styling with Stylo for this ServoDangerousStyleDocument.
Sourcepub fn flush_shadow_root_stylesheets_if_necessary(
&self,
stylist: &mut Stylist,
guard: &StyleSharedRwLockReadGuard<'_>,
)
pub fn flush_shadow_root_stylesheets_if_necessary( &self, stylist: &mut Stylist, guard: &StyleSharedRwLockReadGuard<'_>, )
Flush the the stylesheets of all descendant shadow roots.
Trait Implementations§
Source§impl<'dom> Clone for ServoDangerousStyleDocument<'dom>
impl<'dom> Clone for ServoDangerousStyleDocument<'dom>
Source§fn clone(&self) -> ServoDangerousStyleDocument<'dom>
fn clone(&self) -> ServoDangerousStyleDocument<'dom>
Returns a duplicate 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> TDocument for ServoDangerousStyleDocument<'dom>
impl<'dom> TDocument for ServoDangerousStyleDocument<'dom>
Source§type ConcreteNode = ServoDangerousStyleNode<'dom>
type ConcreteNode = ServoDangerousStyleNode<'dom>
The concrete
TNode type.Source§fn as_node(&self) -> ServoDangerousStyleNode<'dom>
fn as_node(&self) -> ServoDangerousStyleNode<'dom>
Get this document as a
TNode.Source§fn quirks_mode(&self) -> QuirksMode
fn quirks_mode(&self) -> QuirksMode
Returns the quirks mode of this document.
Source§fn is_html_document(&self) -> bool
fn is_html_document(&self) -> bool
Returns whether this document is an HTML document.
This document’s shared lock.
Source§fn elements_with_id<'a>(
&self,
id: &AtomIdent,
) -> Result<&'a [ServoDangerousStyleElement<'dom>], ()>where
Self: 'a,
fn elements_with_id<'a>(
&self,
id: &AtomIdent,
) -> Result<&'a [ServoDangerousStyleElement<'dom>], ()>where
Self: 'a,
Get a list of elements with a given ID in this document, sorted by
tree position. Read more
impl<'dom> Copy for ServoDangerousStyleDocument<'dom>
Auto Trait Implementations§
impl<'dom> Freeze for ServoDangerousStyleDocument<'dom>
impl<'dom> !RefUnwindSafe for ServoDangerousStyleDocument<'dom>
impl<'dom> !Send for ServoDangerousStyleDocument<'dom>
impl<'dom> !Sync for ServoDangerousStyleDocument<'dom>
impl<'dom> Unpin for ServoDangerousStyleDocument<'dom>
impl<'dom> !UnwindSafe for ServoDangerousStyleDocument<'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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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