mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
stylo: Cleanup a bit of the Stylist clear setup.
This moves us to clear on rebuild, which allows us to remove yet another place where we track stylist dirtiness. Bug: 1390255 Reviewed-by: heycam MozReview-Commit-ID: nihQbUAbh8 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
b040d79333
commit
4c80cccbd2
9 changed files with 65 additions and 195 deletions
|
@ -123,6 +123,15 @@ impl<T> SelectorMap<T> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Clears the hashmap retaining storage.
|
||||
pub fn clear(&mut self) {
|
||||
self.id_hash.clear();
|
||||
self.class_hash.clear();
|
||||
self.local_name_hash.clear();
|
||||
self.other.clear();
|
||||
self.count = 0;
|
||||
}
|
||||
|
||||
/// Returns whether there are any entries in the map.
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.count == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue