style: Don't try to go down the tree if there aren't invalidations.

This can happen when adding an empty stylesheet, for example.

Bug: 1372068
MozReview-Commit-ID: Jtm4eJBWjEA
This commit is contained in:
Emilio Cobos Álvarez 2017-06-12 04:51:00 +02:00
parent 4434509088
commit 36bac58863
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -155,6 +155,11 @@ impl StylesheetInvalidationSet {
return true;
}
if self.invalid_scopes.is_empty() {
debug!("process_invalidations_in_subtree: empty invalidation set");
return false;
}
for scope in &self.invalid_scopes {
if scope.matches(element) {
debug!("process_invalidations_in_subtree: {:?} matched {:?}",