WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
300102
[EventTiming] keydown PerformanceEntry duration is always too long (waits for keyup event)
https://bugs.webkit.org/show_bug.cgi?id=300102
Summary
[EventTiming] keydown PerformanceEntry duration is always too long (waits for...
mmocny
Reported
2025-10-03 06:56:27 PDT
Created
attachment 476950
[details]
Screenshot of Event Timing entries in Safari TP for keydown keyup Safari Technology Preview Release 228 (WebKit 20623.1.7.19.1) I saw the announcement for Event Timing support in Safari Tech preview (
https://webkit.org/blog/17447/release-notes-for-safari-technology-preview-229/
). Nice work! I gave it a quick test locally. I noticed when playing with this simple INP demo page (
https://chrome.dev/inp-demo/
) that the reported duration value for `keydown` captures the amount of time my finger is pressing the key until keyup. Looking at the PerformanceEntry details, it seems the startTime, processing times, are correctly assigned, but the total duration value is too large-- suggesting that that the end time waits for the keyup event (potentially waiting for interactionID assignment?). ---
https://www.w3.org/TR/event-timing/#sec-performance-event-timing
duration The duration attribute’s getter returns the difference between the next time the update the rendering steps are completed for the associated event’s Document after the associated event has been dispatched, and the startTime, rounded to the nearest 8ms. ---
https://www.w3.org/TR/event-timing/#sec-dispatch-pending
Step 6. For each pendingKeyDownEntry in the values from window’s pending key downs: Set event timing entry duration passing pendingKeyDownEntry, window, and renderingTimestamp.
Attachments
Screenshot of Event Timing entries in Safari TP for keydown keyup
(94.18 KB, image/webp)
2025-10-03 06:56 PDT
,
mmocny
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-10-03 12:03:48 PDT
<
rdar://problem/161911473
>
Franco Vieira de Souza
Comment 2
2025-10-03 16:15:10 PDT
Thank you for the bug report!
> suggesting that that the end time waits for the keyup event
This is spot on; duration of keydowns is currently being assigned when the entries are queued.
Franco Vieira de Souza
Comment 3
2025-10-03 16:22:03 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/51788
EWS
Comment 4
2025-10-24 12:33:02 PDT
Committed
302107@main
(1337f64ad120): <
https://commits.webkit.org/302107@main
> Reviewed commits have been landed. Closing PR #51788 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug