mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Ensure reflow damage is calculated when hypothetical box changes.
This commit is contained in:
parent
58920c7550
commit
3058bf9aeb
3 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[hypothetical-box-dynamic.html]
|
||||
expected: FAIL
|
Loading…
Add table
Add a link
Reference in a new issue