Eliminate RestyleData entirely.

Without this change, the previous commit increases the size of ElementData.

MozReview-Commit-ID: 87BZuXINiT9
This commit is contained in:
Bobby Holley 2017-09-11 17:44:46 -07:00
parent 61cad869d9
commit 50cee3e133
12 changed files with 66 additions and 94 deletions

View file

@ -209,7 +209,7 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E>
// We can't just return here because there may also be attribute
// changes as well that imply additional hints.
let data = self.data.as_mut().unwrap();
data.restyle.hint.insert(RestyleHint::restyle_subtree());
data.hint.insert(RestyleHint::restyle_subtree());
}
let mut classes_removed = SmallVec::<[Atom; 8]>::new();
@ -287,7 +287,7 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E>
if invalidated_self {
if let Some(ref mut data) = self.data {
data.restyle.hint.insert(RESTYLE_SELF);
data.hint.insert(RESTYLE_SELF);
}
}
@ -499,7 +499,7 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E>
Some(ref data) => {
// FIXME(emilio): Only needs to check RESTYLE_DESCENDANTS,
// really.
if data.restyle.hint.contains_subtree() {
if data.hint.contains_subtree() {
return false;
}
}
@ -507,7 +507,7 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E>
if let Some(checker) = self.stack_limit_checker {
if checker.limit_exceeded() {
self.data.as_mut().unwrap().restyle.hint.insert(RESTYLE_DESCENDANTS);
self.data.as_mut().unwrap().hint.insert(RESTYLE_DESCENDANTS);
return true;
}
}
@ -799,7 +799,7 @@ impl<'a, 'b: 'a, E> TreeStyleInvalidator<'a, 'b, E>
if invalidated_self {
if let Some(ref mut data) = self.data {
data.restyle.hint.insert(RESTYLE_SELF);
data.hint.insert(RESTYLE_SELF);
}
}

View file

@ -148,7 +148,7 @@ impl StylesheetInvalidationSet {
if self.fully_invalid {
debug!("process_invalidations: fully_invalid({:?})",
element);
data.restyle.hint.insert(RestyleHint::restyle_subtree());
data.hint.insert(RestyleHint::restyle_subtree());
return true;
}
}
@ -179,7 +179,7 @@ impl StylesheetInvalidationSet {
return false;
}
if data.restyle.hint.contains_subtree() {
if data.hint.contains_subtree() {
debug!("process_invalidations_in_subtree: {:?} was already invalid",
element);
return false;
@ -189,7 +189,7 @@ impl StylesheetInvalidationSet {
if scope.matches(element) {
debug!("process_invalidations_in_subtree: {:?} matched {:?}",
element, scope);
data.restyle.hint.insert(RestyleHint::restyle_subtree());
data.hint.insert(RestyleHint::restyle_subtree());
return true;
}
}