Fix flakiness in animation tests

1. When updating the animation timeline, ensure that nodes that are
   animating are marked dirty, if necessary, so any style queries will
   force an layout flush.
2. Disable the problematic transition test suites, as they are in Gecko.
   These suites often fail when Servo is so overloaded that it cannot
   deliver frames fast enough to get more than two samples during the
   animation lifecycle.

Fixes #28334.
Fixes #26435.
Fixes #21486.
This commit is contained in:
Martin Robinson 2023-04-25 10:48:13 +02:00
parent 2691d2a8f3
commit 17e3f34e65
19 changed files with 51 additions and 4359 deletions

View file

@ -3852,6 +3852,18 @@ impl Document {
.update_for_new_timeline_value(&self.window, current_timeline_value);
}
pub(crate) fn maybe_mark_animating_nodes_as_dirty(&self) {
let current_timeline_value = self.current_animation_timeline_value();
let marked_dirty = self
.animations
.borrow()
.mark_animating_nodes_as_dirty(current_timeline_value);
if marked_dirty {
self.window().add_pending_reflow();
}
}
pub(crate) fn current_animation_timeline_value(&self) -> f64 {
self.animation_timeline.borrow().current_value()
}