mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
style: Refactor RestyleHint to be a struct.
Later PRs will add additional data to it that is not so easy to represent using bitflags.
This commit is contained in:
parent
c13be5cd13
commit
a397590838
9 changed files with 294 additions and 111 deletions
|
@ -1100,7 +1100,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(&StoredRestyleHint::subtree());
|
||||
d.ensure_restyle().hint.insert(StoredRestyleHint::subtree());
|
||||
}
|
||||
}
|
||||
if let Some(p) = el.parent_element() {
|
||||
|
@ -1136,7 +1136,7 @@ impl LayoutThread {
|
|||
if needs_dirtying {
|
||||
if let Some(mut d) = element.mutate_data() {
|
||||
if d.has_styles() {
|
||||
d.ensure_restyle().hint.insert(&StoredRestyleHint::subtree());
|
||||
d.ensure_restyle().hint.insert(StoredRestyleHint::subtree());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1184,7 +1184,7 @@ impl LayoutThread {
|
|||
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.hint.insert(restyle.hint.into());
|
||||
restyle_data.damage = restyle.damage;
|
||||
debug!("Noting restyle for {:?}: {:?}", el, restyle_data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue