mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
parent
3cdc412a4c
commit
94fa868d2b
4 changed files with 84 additions and 68 deletions
|
@ -68,6 +68,7 @@ pub fn process_new_animations(rw_data: &mut LayoutTaskData, pipeline_id: Pipelin
|
|||
|
||||
/// Recalculates style for an animation. This does *not* run with the DOM lock held.
|
||||
pub fn recalc_style_for_animation(flow: &mut Flow, animation: &Animation) {
|
||||
#![allow(unsafe_code)] // #6376
|
||||
let mut damage = RestyleDamage::empty();
|
||||
flow.mutate_fragments(&mut |fragment| {
|
||||
if fragment.node.id() != animation.node {
|
||||
|
@ -84,7 +85,7 @@ pub fn recalc_style_for_animation(flow: &mut Flow, animation: &Animation) {
|
|||
}
|
||||
|
||||
let mut new_style = fragment.style.clone();
|
||||
animation.property_animation.update(&mut *new_style.make_unique(), progress);
|
||||
animation.property_animation.update(&mut *unsafe { new_style.make_unique() }, progress);
|
||||
damage.insert(incremental::compute_damage(&Some(fragment.style.clone()), &new_style));
|
||||
fragment.style = new_style
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue