Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 18a71363f39cb3f3e5c1b0750463f6db8e97ea66
https://github.com/WebKit/WebKit/commit/18a71363f39cb3f3e5c1b0750463f6db8e97ea66
Author: Franco Vieira de Souza <[email protected]>
Date: 2026-03-12 (Thu, 12 Mar 2026)
Changed paths:
A
LayoutTests/fast/events/event-timing-back-forward-cache-duration-expected.txt
A LayoutTests/fast/events/event-timing-back-forward-cache-duration.html
A LayoutTests/fast/events/resources/go-back-after-delay.html
M LayoutTests/platform/mac-site-isolation/TestExpectations
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/EventDispatcher.cpp
M Source/WebCore/page/LocalDOMWindow.cpp
M Source/WebCore/page/LocalDOMWindow.h
Log Message:
-----------
Fix high event timing presentation delay on back-forward cache restores
https://bugs.webkit.org/show_bug.cgi?id=308224
rdar://171273031
Reviewed by Ryosuke Niwa.
Finalizes and queues dispatch of event timing entries when suspending a
page to back-forward cache. This finalizes their durations before
suspension, as if they were painted (navigating occurring is some kind
of user feedback, so this is ok). This avoids unreasonable large
durations - which include all suspended time - when the events are
later resurfaced as the page is restored.
Some LocalDOMWindow methods dealing with event timing were renamed to
better reflect what they do:
* dispatchPendingEventTimingEntries() -> finalizeAndQueueEventTimingEntries()
* finalizeEventTimingEntry() -> markEndOfProcessingForEventTiming()
* initializeEventTimingEntry() -> initializeEventTiming()
A non-WPT test was added, using [ UsesBackForwardCache=true ]. I was
unable to create a WPT test for this due the simultaneous need for
back-forward navigation and trusted events.
Canonical link: https://commits.webkit.org/309144@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications