Struct style::stylesheets::StylesheetContents
[−]
[src]
pub struct StylesheetContents { pub rules: Arc<Locked<CssRules>>, pub origin: Origin, pub url_data: RwLock<UrlExtraData>, pub namespaces: RwLock<Namespaces>, pub quirks_mode: QuirksMode, pub source_map_url: RwLock<Option<String>>, pub source_url: RwLock<Option<String>>, }
The contents of a given stylesheet. This effectively maps to a StyleSheetInner in Gecko.
Fields
rules: Arc<Locked<CssRules>>
List of rules in the order they were found (important for cascading order)
origin: Origin
The origin of this stylesheet.
url_data: RwLock<UrlExtraData>
The url data this stylesheet should use.
namespaces: RwLock<Namespaces>
The namespaces that apply to this stylesheet.
quirks_mode: QuirksMode
The quirks mode of this stylesheet.
source_map_url: RwLock<Option<String>>
This stylesheet's source map URL.
source_url: RwLock<Option<String>>
This stylesheet's source URL.
Methods
impl StylesheetContents
[src]
pub fn from_str<R: ParseErrorReporter>(
css: &str,
url_data: UrlExtraData,
origin: Origin,
shared_lock: &SharedRwLock,
stylesheet_loader: Option<&StylesheetLoader>,
error_reporter: &R,
quirks_mode: QuirksMode,
line_number_offset: u32
) -> Self
[src]
css: &str,
url_data: UrlExtraData,
origin: Origin,
shared_lock: &SharedRwLock,
stylesheet_loader: Option<&StylesheetLoader>,
error_reporter: &R,
quirks_mode: QuirksMode,
line_number_offset: u32
) -> Self
Parse a given CSS string, with a given url-data, origin, and quirks mode.
ⓘImportant traits for RulesIterator<'a, 'b, C>pub fn iter_rules<'a, 'b, C>(
&'a self,
device: &'a Device,
guard: &'a SharedRwLockReadGuard<'b>
) -> RulesIterator<'a, 'b, C> where
C: NestedRuleIterationCondition,
[src]
ⓘImportant traits for RulesIterator<'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
.
Trait Implementations
impl Debug for StylesheetContents
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl DeepCloneWithLock for StylesheetContents
[src]
fn deep_clone_with_lock(
&self,
lock: &SharedRwLock,
guard: &SharedRwLockReadGuard,
params: &DeepCloneParams
) -> Self
[src]
&self,
lock: &SharedRwLock,
guard: &SharedRwLockReadGuard,
params: &DeepCloneParams
) -> Self
Deep clones this object.