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

@ -1116,7 +1116,7 @@ impl LayoutThread {
let el = node.as_element().unwrap();
if let Some(mut d) = element.mutate_data() {
if d.has_styles() {
d.ensure_restyle().hint.insert(RestyleHint::restyle_subtree());
d.restyle.hint.insert(RestyleHint::restyle_subtree());
}
}
if let Some(p) = el.parent_element() {
@ -1152,7 +1152,7 @@ impl LayoutThread {
if needs_dirtying {
if let Some(mut d) = element.mutate_data() {
if d.has_styles() {
d.ensure_restyle().hint.insert(RestyleHint::restyle_subtree());
d.restyle.hint.insert(RestyleHint::restyle_subtree());
}
}
}
@ -1197,12 +1197,11 @@ impl LayoutThread {
}
let mut style_data = style_data.borrow_mut();
let mut restyle_data = style_data.ensure_restyle();
// Stash the data on the element for processing by the style system.
restyle_data.hint.insert(restyle.hint.into());
restyle_data.damage = restyle.damage;
debug!("Noting restyle for {:?}: {:?}", el, restyle_data);
style_data.restyle.hint.insert(restyle.hint.into());
style_data.restyle.damage = restyle.damage;
debug!("Noting restyle for {:?}: {:?}", el, style_data.restyle);
}
// Create a layout context for use throughout the following passes.