summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-10-03 12:48:15 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-03 13:36:40 +0200
commit97ea277f8f837d2b2409d7de42535398aa2bc1c2 (patch)
tree6518c5eb895feced5e78d23b33398dcae02d6c92 /Userland/Libraries/LibWeb
parent5cf439cce0115578d2b45164dd6c3a41714a4692 (diff)
downloadserenity-97ea277f8f837d2b2409d7de42535398aa2bc1c2.zip
LibWeb: Pass the correct timestamp to requestAnimationFrame callbacks
The timestamp needs to be consistent with the "current high resolution time" as reflected by window.performance.now
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Window.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Window.cpp b/Userland/Libraries/LibWeb/DOM/Window.cpp
index 45e544f140..a3c47f081c 100644
--- a/Userland/Libraries/LibWeb/DOM/Window.cpp
+++ b/Userland/Libraries/LibWeb/DOM/Window.cpp
@@ -188,7 +188,7 @@ i32 Window::request_animation_frame(JS::FunctionObject& js_callback)
auto callback = request_animation_frame_driver().add([this, handle = JS::make_handle(&js_callback)](i32 id) mutable {
auto& function = *handle.cell();
auto& vm = function.vm();
- (void)vm.call(function, JS::js_undefined(), JS::Value((double)Core::DateTime::now().timestamp()));
+ (void)vm.call(function, JS::js_undefined(), JS::Value(performance().now()));
if (vm.exception())
vm.clear_exception();
m_request_animation_frame_callbacks.remove(id);