mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 00:38:48 +00:00
LibWeb: Use "current high resolution time" AO where relevant
And updating some spec comments to latest spec where it is not relevant.
This commit is contained in:
parent
33bd6cfc2a
commit
51a52a867c
Notes:
sideshowbarker
2024-07-16 23:59:28 +09:00
Author: https://github.com/shannonbooth
Commit: 51a52a867c
Pull-request: https://github.com/SerenityOS/serenity/pull/23935
6 changed files with 13 additions and 17 deletions
|
@ -179,10 +179,7 @@ void EventLoop::process()
|
|||
// 1. Let oldestTask be null.
|
||||
JS::GCPtr<Task> oldest_task;
|
||||
|
||||
// 2. Let taskStartTime be the current high resolution time.
|
||||
// FIXME: 'current high resolution time' in hr-time-3 takes a global object,
|
||||
// the HTML spec has not been updated to reflect this, let's use the shared timer.
|
||||
// - https://github.com/whatwg/html/issues/7776
|
||||
// 2. Set taskStartTime to the unsafe shared current time.
|
||||
double task_start_time = HighResolutionTime::unsafe_shared_current_time();
|
||||
|
||||
// 3. Let taskQueue be one of the event loop's task queues, chosen in an implementation-defined manner,
|
||||
|
@ -377,7 +374,7 @@ void EventLoop::process()
|
|||
// - hasARenderingOpportunity is false
|
||||
// FIXME: has_a_rendering_opportunity is always true
|
||||
if (m_type == Type::Window && !task_queue.has_runnable_tasks() && m_microtask_queue->is_empty() /*&& !has_a_rendering_opportunity*/) {
|
||||
// 1. Set this event loop's last idle period start time to the current high resolution time.
|
||||
// 1. Set this event loop's last idle period start time to the unsafe shared current time.
|
||||
m_last_idle_period_start_time = HighResolutionTime::unsafe_shared_current_time();
|
||||
|
||||
// 2. Let computeDeadline be the following steps:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue