mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Semantics for ProtectedHashMap.
MozReview-Commit-ID: K0m65uZi7iw
This commit is contained in:
parent
e2c0ca5110
commit
98f370130d
9 changed files with 311 additions and 8 deletions
|
@ -299,6 +299,24 @@ impl InvalidationMap {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Allows mutation of this InvalidationMap.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub fn begin_mutation(&mut self) {
|
||||
self.class_to_selector.begin_mutation();
|
||||
self.id_to_selector.begin_mutation();
|
||||
self.state_affecting_selectors.begin_mutation();
|
||||
self.other_attribute_affecting_selectors.begin_mutation();
|
||||
}
|
||||
|
||||
/// Disallows mutation of this InvalidationMap.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub fn end_mutation(&mut self) {
|
||||
self.class_to_selector.end_mutation();
|
||||
self.id_to_selector.end_mutation();
|
||||
self.state_affecting_selectors.end_mutation();
|
||||
self.other_attribute_affecting_selectors.end_mutation();
|
||||
}
|
||||
}
|
||||
|
||||
/// A struct that collects invalidations for a given compound selector.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue