Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5c8edbf5a4795caaf9e50e5a7fbdcc301bb599e3
https://github.com/WebKit/WebKit/commit/5c8edbf5a4795caaf9e50e5a7fbdcc301bb599e3
Author: Adrian Taylor <[email protected]>
Date: 2026-02-05 (Thu, 05 Feb 2026)
Changed paths:
M Source/WebKit/UIProcess/API/C/WKAPICast.h
M Source/WebKit/UIProcess/API/Cocoa/WKBackForwardList.mm
M Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/UIProcess/ViewGestureController.cpp
M Source/WebKit/UIProcess/ViewGestureController.h
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/mac/ViewGestureControllerMac.mm
Log Message:
-----------
Swift WebBackForwardList (off by default) - C++ call tweaks
https://bugs.webkit.org/show_bug.cgi?id=306876
rdar://169533837
Reviewed by Richard Robinson.
We're introducing a Swift version of the Back Forward List. For the general
design and rationale, see
https://github.com/WebKit/WebKit/pull/55393
It will be landed as a series of separate commits in order to ease code review.
In this commit we change various bits of C++ code which call methods on
WebBackForwardList, to be aware of slightly different calling conventions
when calling APIs on the Swift version.
Specifically, we took a decision NOT to allow Swift types to be kept in
Ref<T> and RefPtr<T>, because it's redundant - the Swift type is itself
reference counted. This could have been achieved using specialized traits,
but was felt to be confusing, and that it was better to add various #ifdefs
instead - that's what this commit does.
A few specific notes:
* WTF::Functions and WTF::CompletionHandlers need to be explicitly packaged
up to pass them into Swift; this is because we can only own them as
reference-counted types in Swift.
* Often we need to use . with Swift types instead of -> with Ref.
* Instead of a RefPtr, we store a std::optional of the Swift type.
Canonical link: https://commits.webkit.org/306857@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications