pub(crate) struct ServoStylesheetInDocument {
pub(crate) sheet: Arc<Stylesheet>,
pub(crate) owner: StylesheetSource,
}
Fields§
§sheet: Arc<Stylesheet>
§owner: StylesheetSource
The object that owns this stylesheet. For constructed stylesheet, it would be the CSSOM object itself, and for stylesheet generated by an element, it would be the html element. This is used to get the CSSOM Stylesheet within a DocumentOrShadowDOM.
Trait Implementations§
Source§impl Clone for ServoStylesheetInDocument
impl Clone for ServoStylesheetInDocument
Source§fn clone(&self) -> ServoStylesheetInDocument
fn clone(&self) -> ServoStylesheetInDocument
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 Debug for ServoStylesheetInDocument
impl Debug for ServoStylesheetInDocument
Source§impl MallocSizeOf for ServoStylesheetInDocument
impl MallocSizeOf for ServoStylesheetInDocument
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl MallocSizeOf for ServoStylesheetInDocument
impl MallocSizeOf for ServoStylesheetInDocument
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl StylesheetInDocument for ServoStylesheetInDocument
impl StylesheetInDocument for ServoStylesheetInDocument
Source§fn media<'a>(
&'a self,
guard: &'a SharedRwLockReadGuard<'_>,
) -> Option<&'a MediaList>
fn media<'a>( &'a self, guard: &'a SharedRwLockReadGuard<'_>, ) -> Option<&'a MediaList>
Get the media associated with this stylesheet.
Source§fn contents(&self) -> &StylesheetContents
fn contents(&self) -> &StylesheetContents
Returns a reference to the contents of the stylesheet.
Source§fn implicit_scope_root(&self) -> Option<ImplicitScopeRoot>
fn implicit_scope_root(&self) -> Option<ImplicitScopeRoot>
Return the implicit scope root for this stylesheet, if one exists.
Source§fn rules<'a, 'b>(
&'a self,
guard: &'b SharedRwLockReadGuard<'_>,
) -> &'a [CssRule]where
'b: 'a,
fn rules<'a, 'b>(
&'a self,
guard: &'b SharedRwLockReadGuard<'_>,
) -> &'a [CssRule]where
'b: 'a,
Returns a reference to the list of rules in this stylesheet.
Source§fn iter_rules<'a, 'b, C>(
&'a self,
device: &'a Device,
guard: &'a SharedRwLockReadGuard<'b>,
) -> RulesIterator<'a, 'b, C>where
C: NestedRuleIterationCondition,
fn iter_rules<'a, 'b, C>(
&'a self,
device: &'a Device,
guard: &'a SharedRwLockReadGuard<'b>,
) -> RulesIterator<'a, 'b, C>where
C: NestedRuleIterationCondition,
Return an iterator using the condition
C
.Source§fn is_effective_for_device(
&self,
device: &Device,
guard: &SharedRwLockReadGuard<'_>,
) -> bool
fn is_effective_for_device( &self, device: &Device, guard: &SharedRwLockReadGuard<'_>, ) -> bool
Returns whether the style-sheet applies for the current device.
Source§fn effective_rules<'a, 'b>(
&'a self,
device: &'a Device,
guard: &'a SharedRwLockReadGuard<'b>,
) -> RulesIterator<'a, 'b, EffectiveRules>
fn effective_rules<'a, 'b>( &'a self, device: &'a Device, guard: &'a SharedRwLockReadGuard<'b>, ) -> RulesIterator<'a, 'b, EffectiveRules>
Return an iterator over the effective rules within the style-sheet, as
according to the supplied
Device
.Source§impl ToMediaListKey for ServoStylesheetInDocument
impl ToMediaListKey for ServoStylesheetInDocument
Source§fn to_media_list_key(&self) -> MediaListKey
fn to_media_list_key(&self) -> MediaListKey
Get a
MediaListKey
for this item. This key needs to uniquely identify
the item.Auto Trait Implementations§
impl Freeze for ServoStylesheetInDocument
impl !RefUnwindSafe for ServoStylesheetInDocument
impl !Send for ServoStylesheetInDocument
impl !Sync for ServoStylesheetInDocument
impl Unpin for ServoStylesheetInDocument
impl !UnwindSafe for ServoStylesheetInDocument
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