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:
Shannon Booth 2024-04-11 22:42:35 +02:00 committed by Andreas Kling
parent 33bd6cfc2a
commit 51a52a867c
Notes: sideshowbarker 2024-07-16 23:59:28 +09:00
6 changed files with 13 additions and 17 deletions

View file

@ -604,8 +604,7 @@ bool Window::has_transient_activation() const
static constexpr HighResolutionTime::DOMHighResTimeStamp transient_activation_duration_ms = 5000;
// When the current high resolution time given W
auto unsafe_shared_time = HighResolutionTime::unsafe_shared_current_time();
auto current_time = HighResolutionTime::relative_high_resolution_time(unsafe_shared_time, realm().global_object());
auto current_time = HighResolutionTime::current_high_resolution_time(*this);
// is greater than or equal to the last activation timestamp in W
if (current_time >= m_last_activation_timestamp) {