mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Move the StyleSheetSet into the Stylist.
This will allow tracking whether there have been only additions to the stylesheet set, and in that case don't destroy and completely rebuild the invalidation map.
This commit is contained in:
parent
02b203891f
commit
cbf388a5fd
7 changed files with 399 additions and 316 deletions
|
@ -106,9 +106,6 @@ where
|
|||
}
|
||||
|
||||
/// Appends a new stylesheet to the current set.
|
||||
///
|
||||
/// FIXME(emilio): `device` shouldn't be optional, but a bunch of work needs
|
||||
/// to happen to make the invalidations work properly in servo.
|
||||
pub fn append_stylesheet(
|
||||
&mut self,
|
||||
device: Option<&Device>,
|
||||
|
@ -122,9 +119,6 @@ where
|
|||
}
|
||||
|
||||
/// Prepend a new stylesheet to the current set.
|
||||
///
|
||||
/// FIXME(emilio): `device` shouldn't be optional, but a bunch of work needs
|
||||
/// to happen to make the invalidations work properly in servo.
|
||||
pub fn prepend_stylesheet(
|
||||
&mut self,
|
||||
device: Option<&Device>,
|
||||
|
@ -138,15 +132,12 @@ where
|
|||
}
|
||||
|
||||
/// Insert a given stylesheet before another stylesheet in the document.
|
||||
///
|
||||
/// FIXME(emilio): `device` shouldn't be optional, but a bunch of work needs
|
||||
/// to happen to make the invalidations work properly in servo.
|
||||
pub fn insert_stylesheet_before(
|
||||
&mut self,
|
||||
device: Option<&Device>,
|
||||
sheet: S,
|
||||
before_sheet: S,
|
||||
guard: &SharedRwLockReadGuard
|
||||
guard: &SharedRwLockReadGuard,
|
||||
) {
|
||||
debug!("StylesheetSet::insert_stylesheet_before");
|
||||
self.remove_stylesheet_if_present(&sheet);
|
||||
|
@ -158,9 +149,6 @@ where
|
|||
}
|
||||
|
||||
/// Remove a given stylesheet from the set.
|
||||
///
|
||||
/// FIXME(emilio): `device` shouldn't be optional, but a bunch of work needs
|
||||
/// to happen to make the invalidations work properly in servo.
|
||||
pub fn remove_stylesheet(
|
||||
&mut self,
|
||||
device: Option<&Device>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue