aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2023-04-25 10:48:13 +0200
committerMartin Robinson <mrobinson@igalia.com>2023-05-02 08:37:15 +0200
commit17e3f34e65052d6f34450e9c9b0248b793c68753 (patch)
tree16c1393efe8feac4c8a9d93ed880cd64be818e10 /components/script/script_thread.rs
parent2691d2a8f3a9d899b4ec6a9d061b8ffd733c76dd (diff)
downloadservo-17e3f34e65052d6f34450e9c9b0248b793c68753.tar.gz
servo-17e3f34e65052d6f34450e9c9b0248b793c68753.zip
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.
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index b417f453cdf..f52fc0d777a 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -1702,10 +1702,12 @@ impl ScriptThread {
true
}
- // Perform step 11.10 from https://html.spec.whatwg.org/multipage/#event-loops.
+ // Perform step 7.10 from https://html.spec.whatwg.org/multipage/#event-loop-processing-model.
+ // Described at: https://drafts.csswg.org/web-animations-1/#update-animations-and-send-events
fn update_animations_and_send_events(&self) {
for (_, document) in self.documents.borrow().iter() {
document.update_animation_timeline();
+ document.maybe_mark_animating_nodes_as_dirty();
}
for (_, document) in self.documents.borrow().iter() {
@@ -3012,8 +3014,7 @@ impl ScriptThread {
document.run_the_animation_frame_callbacks();
}
if tick_type.contains(AnimationTickType::CSS_ANIMATIONS_AND_TRANSITIONS) {
- document.animations().mark_animating_nodes_as_dirty();
- document.window().add_pending_reflow();
+ document.maybe_mark_animating_nodes_as_dirty();
}
}