mirror of
https://github.com/servo/servo.git
synced 2025-08-16 19:05:33 +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
|
@ -168,20 +168,6 @@ impl<T> PerOrigin<T> {
|
|||
}
|
||||
}
|
||||
|
||||
/// An object that can be cleared.
|
||||
pub trait PerOriginClear {
|
||||
/// Clears the object.
|
||||
fn clear(&mut self);
|
||||
}
|
||||
|
||||
impl<T> PerOriginClear for PerOrigin<T> where T: PerOriginClear {
|
||||
fn clear(&mut self) {
|
||||
self.user_agent.clear();
|
||||
self.user.clear();
|
||||
self.author.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/// Iterator over `PerOrigin<T>`, from highest level (author) to lowest
|
||||
/// (user agent).
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue