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:
Emilio Cobos Álvarez 2017-08-14 16:27:00 +02:00
parent b040d79333
commit 4c80cccbd2
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
9 changed files with 65 additions and 195 deletions

View file

@ -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).
///