style: Ensure we generate a ReconstructFrame hint when -moz-binding changes on a display:none root.

This commit is contained in:
Cameron McCormack 2017-07-25 11:11:47 +08:00
parent bf16b146e8
commit e36b4340e1
3 changed files with 45 additions and 3 deletions

View file

@ -783,8 +783,11 @@ pub trait MatchMethods : TElement {
// This happens with display:none elements, and not-yet-existing
// pseudo-elements.
if new_style_is_display_none && old_style_is_display_none {
// The style remains display:none. No need for damage.
return StyleDifference::new(RestyleDamage::empty(), StyleChange::Unchanged)
// The style remains display:none. The only case we need to care
// about is if -moz-binding changed, and to generate a reconstruct
// so that we can start the binding load. Otherwise, there is no
// need for damage.
return RestyleDamage::compute_undisplayed_style_difference(old_values, new_values);
}
if pseudo.map_or(false, |p| p.is_before_or_after()) {