mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Fix requestAnimationFrame timestamps in queue
This resolves #7044 which involved callbacks in a queue not receiving the same timestamp despite the specification saying they should. An extra test was added to verify the correct behavior.
This commit is contained in:
parent
0a0fd30eb3
commit
e40b141409
4 changed files with 40 additions and 2 deletions
|
@ -957,9 +957,10 @@ impl<'a> DocumentHelpers<'a> for &'a Document {
|
|||
let window = window.r();
|
||||
let performance = window.Performance();
|
||||
let performance = performance.r();
|
||||
let timing = performance.Now();
|
||||
|
||||
for (_, callback) in animation_frame_list {
|
||||
callback(*performance.Now());
|
||||
callback(*timing);
|
||||
}
|
||||
|
||||
window.reflow(ReflowGoal::ForDisplay,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue