mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Store stylesheets per origin.
This will allow us to cache UA sheets across documents. MozReview-Commit-ID: 5rYIKTmC6iw Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
a373ed3f9d
commit
02d1264047
3 changed files with 205 additions and 93 deletions
|
@ -41,7 +41,7 @@ use smallvec::VecLike;
|
|||
use std::fmt::Debug;
|
||||
use std::ops;
|
||||
use style_traits::viewport::ViewportConstraints;
|
||||
use stylesheet_set::{OriginValidity, SheetRebuildKind, StylesheetSet, StylesheetIterator, StylesheetFlusher};
|
||||
use stylesheet_set::{OriginValidity, SheetRebuildKind, StylesheetSet, StylesheetFlusher};
|
||||
#[cfg(feature = "gecko")]
|
||||
use stylesheets::{CounterStyleRule, FontFaceRule, FontFeatureValuesRule, PageRule};
|
||||
use stylesheets::{CssRule, Origin, OriginSet, PerOrigin, PerOriginIter};
|
||||
|
@ -634,14 +634,6 @@ impl Stylist {
|
|||
self.stylesheets.force_dirty(origins)
|
||||
}
|
||||
|
||||
/// Iterate over the given set of stylesheets.
|
||||
///
|
||||
/// This is very intentionally exposed only on `&mut self`, since we don't
|
||||
/// want to give access to the stylesheet list from worker threads.
|
||||
pub fn iter_stylesheets(&mut self) -> StylesheetIterator<StylistSheet> {
|
||||
self.stylesheets.iter()
|
||||
}
|
||||
|
||||
/// Sets whether author style is enabled or not.
|
||||
pub fn set_author_style_disabled(&mut self, disabled: bool) {
|
||||
self.stylesheets.set_author_style_disabled(disabled);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue