style: Inline RestyleData.

Bug: 1368236
MozReview-Commit-ID: 49s3SO0PMHf
This commit is contained in:
Emilio Cobos Álvarez 2017-06-13 15:04:18 +02:00
parent 0c53ba318a
commit ffc45e9aaa
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
11 changed files with 183 additions and 202 deletions

View file

@ -134,7 +134,7 @@ impl StylesheetInvalidationSet {
if self.fully_invalid {
debug!("process_invalidations: fully_invalid({:?})",
element);
data.ensure_restyle().hint.insert(RestyleHint::restyle_subtree());
data.restyle.hint.insert(RestyleHint::restyle_subtree());
return true;
}
}
@ -165,19 +165,17 @@ impl StylesheetInvalidationSet {
return false;
}
if let Some(ref r) = data.get_restyle() {
if r.hint.contains_subtree() {
debug!("process_invalidations_in_subtree: {:?} was already invalid",
element);
return false;
}
if data.restyle.hint.contains_subtree() {
debug!("process_invalidations_in_subtree: {:?} was already invalid",
element);
return false;
}
for scope in &self.invalid_scopes {
if scope.matches(element) {
debug!("process_invalidations_in_subtree: {:?} matched {:?}",
element, scope);
data.ensure_restyle().hint.insert(RestyleHint::restyle_subtree());
data.restyle.hint.insert(RestyleHint::restyle_subtree());
return true;
}
}