mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
style: Remove ServoStyleSet::PrependStyleSheet.
Differential Revision: https://phabricator.services.mozilla.com/D16284
This commit is contained in:
parent
2b77a29697
commit
5bf0eea1f8
2 changed files with 0 additions and 28 deletions
|
@ -345,14 +345,6 @@ where
|
||||||
self.data_validity = cmp::max(validity, self.data_validity);
|
self.data_validity = cmp::max(validity, self.data_validity);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prepend(&mut self, sheet: S) {
|
|
||||||
debug_assert!(!self.contains(&sheet));
|
|
||||||
// Inserting stylesheets somewhere but at the end changes the validity
|
|
||||||
// of the cascade data, but not the invalidation data.
|
|
||||||
self.set_data_validity_at_least(DataValidity::CascadeInvalid);
|
|
||||||
self.entries.insert(0, StylesheetSetEntry::new(sheet));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Returns an iterator over the current list of stylesheets.
|
/// Returns an iterator over the current list of stylesheets.
|
||||||
fn iter(&self) -> StylesheetCollectionIterator<S> {
|
fn iter(&self) -> StylesheetCollectionIterator<S> {
|
||||||
StylesheetCollectionIterator(self.entries.iter())
|
StylesheetCollectionIterator(self.entries.iter())
|
||||||
|
@ -417,20 +409,6 @@ macro_rules! sheet_set_methods {
|
||||||
collection.append(sheet);
|
collection.append(sheet);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Prepend a new stylesheet to the current set.
|
|
||||||
pub fn prepend_stylesheet(
|
|
||||||
&mut self,
|
|
||||||
device: Option<&Device>,
|
|
||||||
sheet: S,
|
|
||||||
guard: &SharedRwLockReadGuard,
|
|
||||||
) {
|
|
||||||
debug!(concat!($set_name, "::prepend_stylesheet"));
|
|
||||||
self.collect_invalidations_for(device, &sheet, guard);
|
|
||||||
|
|
||||||
let collection = self.collection_for(&sheet, guard);
|
|
||||||
collection.prepend(sheet);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Insert a given stylesheet before another stylesheet in the document.
|
/// Insert a given stylesheet before another stylesheet in the document.
|
||||||
pub fn insert_stylesheet_before(
|
pub fn insert_stylesheet_before(
|
||||||
&mut self,
|
&mut self,
|
||||||
|
|
|
@ -582,12 +582,6 @@ impl Stylist {
|
||||||
.append_stylesheet(Some(&self.device), sheet, guard)
|
.append_stylesheet(Some(&self.device), sheet, guard)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Appends a new stylesheet to the current set.
|
|
||||||
pub fn prepend_stylesheet(&mut self, sheet: StylistSheet, guard: &SharedRwLockReadGuard) {
|
|
||||||
self.stylesheets
|
|
||||||
.prepend_stylesheet(Some(&self.device), sheet, guard)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Remove a given stylesheet to the current set.
|
/// Remove a given stylesheet to the current set.
|
||||||
pub fn remove_stylesheet(&mut self, sheet: StylistSheet, guard: &SharedRwLockReadGuard) {
|
pub fn remove_stylesheet(&mut self, sheet: StylistSheet, guard: &SharedRwLockReadGuard) {
|
||||||
self.stylesheets
|
self.stylesheets
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue