mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
style: Don't keep two list of stylesheets in ServoStyleSet.
Just one set of stylesheets is enough. While at it, unify SheetType and Origin. Differential Revision: https://phabricator.services.mozilla.com/D27564
This commit is contained in:
parent
098eb300ac
commit
c0b17cc844
4 changed files with 26 additions and 18 deletions
|
@ -591,6 +591,18 @@ impl Stylist {
|
|||
.remove_stylesheet(Some(&self.device), sheet, guard)
|
||||
}
|
||||
|
||||
/// Appends a new stylesheet to the current set.
|
||||
#[inline]
|
||||
pub fn sheet_count(&self, origin: Origin) -> usize {
|
||||
self.stylesheets.sheet_count(origin)
|
||||
}
|
||||
|
||||
/// Appends a new stylesheet to the current set.
|
||||
#[inline]
|
||||
pub fn sheet_at(&self, origin: Origin, index: usize) -> Option<&StylistSheet> {
|
||||
self.stylesheets.get(origin, index)
|
||||
}
|
||||
|
||||
/// Returns whether for any of the applicable style rule data a given
|
||||
/// condition is true.
|
||||
pub fn any_applicable_rule_data<E, F>(&self, element: E, mut f: F) -> bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue