diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index fc8ef438041..d2e503df3fb 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -4131,6 +4131,9 @@ macro_rules! longhand_properties_idents { % for effect_name in ["repaint", "reflow_out_of_flow", "reflow", "rebuild_and_reflow_inline", "rebuild_and_reflow"]: macro_rules! restyle_damage_${effect_name} { ($old: ident, $new: ident, $damage: ident, [ $($effect:expr),* ]) => ({ + restyle_damage_${effect_name}!($old, $new, $damage, [$($effect),*], false) + }); + ($old: ident, $new: ident, $damage: ident, [ $($effect:expr),* ], $extra:expr) => ({ if % for style_struct in data.active_style_structs(): % for longhand in style_struct.longhands: @@ -4141,13 +4144,13 @@ macro_rules! longhand_properties_idents { % endfor % endfor - false { + $extra || false { $damage.insert($($effect)|*); true } else { false } - }) + }); } % endfor % endif diff --git a/components/style/servo/restyle_damage.rs b/components/style/servo/restyle_damage.rs index fe17fa6198b..628a1533a68 100644 --- a/components/style/servo/restyle_damage.rs +++ b/components/style/servo/restyle_damage.rs @@ -210,7 +210,8 @@ fn compute_damage(old: &ComputedValues, new: &ComputedValues) -> ServoRestyleDam ServoRestyleDamage::REFLOW_OUT_OF_FLOW, ServoRestyleDamage::REFLOW, ServoRestyleDamage::RECONSTRUCT_FLOW - ] + ], + old.get_box().original_display != new.get_box().original_display ) || (new.get_box().display == Display::Inline && restyle_damage_rebuild_and_reflow_inline!( old, diff --git a/tests/wpt/metadata/css/CSS2/abspos/hypothetical-box-dynamic.html.ini b/tests/wpt/metadata/css/CSS2/abspos/hypothetical-box-dynamic.html.ini deleted file mode 100644 index 8291ece4c89..00000000000 --- a/tests/wpt/metadata/css/CSS2/abspos/hypothetical-box-dynamic.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[hypothetical-box-dynamic.html] - expected: FAIL