Struct style::stylesheet_set::StylesheetSet
[−]
[src]
pub struct StylesheetSet<S> where
S: StylesheetInDocument + PartialEq + 'static, { /* fields omitted */ }The set of stylesheets effective for a given document.
Methods
impl<S> StylesheetSet<S> where
S: StylesheetInDocument + PartialEq + 'static, [src]
S: StylesheetInDocument + PartialEq + 'static,
pub fn new() -> Self[src]
Create a new empty StylesheetSet.
pub fn len(&self) -> usize[src]
Returns the number of stylesheets in the set.
pub fn get(&self, origin: Origin, index: usize) -> Option<&S>[src]
Returns the indexth stylesheet in the set for the given origin.
[src]
Returns whether author styles have been disabled for the current stylesheet set.
pub fn append_stylesheet(
&mut self,
device: Option<&Device>,
sheet: S,
guard: &SharedRwLockReadGuard
)[src]
&mut self,
device: Option<&Device>,
sheet: S,
guard: &SharedRwLockReadGuard
)
Appends a new stylesheet to the current set.
No device implies not computing invalidations.
pub fn prepend_stylesheet(
&mut self,
device: Option<&Device>,
sheet: S,
guard: &SharedRwLockReadGuard
)[src]
&mut self,
device: Option<&Device>,
sheet: S,
guard: &SharedRwLockReadGuard
)
Prepend a new stylesheet to the current set.
pub fn insert_stylesheet_before(
&mut self,
device: Option<&Device>,
sheet: S,
before_sheet: S,
guard: &SharedRwLockReadGuard
)[src]
&mut self,
device: Option<&Device>,
sheet: S,
before_sheet: S,
guard: &SharedRwLockReadGuard
)
Insert a given stylesheet before another stylesheet in the document.
pub fn remove_stylesheet(
&mut self,
device: Option<&Device>,
sheet: S,
guard: &SharedRwLockReadGuard
)[src]
&mut self,
device: Option<&Device>,
sheet: S,
guard: &SharedRwLockReadGuard
)
Remove a given stylesheet from the set.
[src]
Notes that the author style has been disabled for this document.
pub fn has_changed(&self) -> bool[src]
Returns whether the given set has changed from the last flush.
pub fn flush<'a, E>(
&'a mut self,
document_element: Option<E>
) -> StylesheetFlusher<'a, S> where
E: TElement, [src]
&'a mut self,
document_element: Option<E>
) -> StylesheetFlusher<'a, S> where
E: TElement,
Flush the current set, unmarking it as dirty, and returns a
StylesheetFlusher in order to rebuild the stylist.
pub fn flush_without_invalidation(&mut self) -> OriginSet[src]
Flush stylesheets, but without running any of the invalidation passes.
ⓘImportant traits for StylesheetIterator<'a, S>pub fn iter(&self) -> StylesheetIterator<S>[src]
Return an iterator over the flattened view of all the stylesheets.
pub fn force_dirty(&mut self, origins: OriginSet)[src]
Mark the stylesheets for the specified origin as dirty, because something external may have invalidated it.
Trait Implementations
impl<S> MallocSizeOf for StylesheetSet<S> where
S: StylesheetInDocument + PartialEq + 'static,
S: MallocSizeOf, [src]
S: StylesheetInDocument + PartialEq + 'static,
S: MallocSizeOf,
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[src]
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more