mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Factor out a new function to check display property is changed from 'none' to other
This commit is contained in:
parent
f90e98dcc9
commit
5ba2e874b1
2 changed files with 17 additions and 8 deletions
|
@ -176,14 +176,7 @@ trait PrivateMatchMethods: TElement {
|
|||
return;
|
||||
}
|
||||
|
||||
let display_changed_from_none = old_values.map_or(false, |old| {
|
||||
let old_display_style = old.get_box().clone_display();
|
||||
let new_display_style = new_values.get_box().clone_display();
|
||||
old_display_style == Display::None &&
|
||||
new_display_style != Display::None
|
||||
});
|
||||
|
||||
if display_changed_from_none {
|
||||
if new_values.is_display_property_changed_from_none(old_values) {
|
||||
// When display value is changed from none to other, we need to
|
||||
// traverse descendant elements in a subsequent normal
|
||||
// traversal (we can't traverse them in this animation-only restyle
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue