mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibWeb: Make requestAnimationFrame() callback IDs sequential
This is required by the spec, so let's stop returning random IDs in favor of a simple sequential integer sequence.
This commit is contained in:
parent
a034d1e675
commit
0e1256e5a4
Notes:
github-actions[bot]
2024-08-05 07:13:03 +00:00
Author: https://github.com/awesomekling
Commit: 0e1256e5a4
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/962
6 changed files with 32 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2023, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2020-2024, Andreas Kling <andreas@ladybird.org>
|
||||
* Copyright (c) 2021-2023, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
|
@ -27,6 +27,7 @@
|
|||
#include <LibWeb/HTML/WindowEventHandlers.h>
|
||||
#include <LibWeb/HTML/WindowOrWorkerGlobalScope.h>
|
||||
#include <LibWeb/RequestIdleCallback/IdleRequest.h>
|
||||
#include <LibWeb/WebIDL/Types.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
|
@ -201,8 +202,8 @@ public:
|
|||
i32 outer_height() const;
|
||||
double device_pixel_ratio() const;
|
||||
|
||||
i32 request_animation_frame(WebIDL::CallbackType&);
|
||||
void cancel_animation_frame(i32 handle);
|
||||
WebIDL::UnsignedLong request_animation_frame(WebIDL::CallbackType&);
|
||||
void cancel_animation_frame(WebIDL::UnsignedLong handle);
|
||||
|
||||
u32 request_idle_callback(WebIDL::CallbackType&, RequestIdleCallback::IdleRequestOptions const&);
|
||||
void cancel_idle_callback(u32 handle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue