Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5f682140ae0d0d494c57494fa5cbc6908453417b
https://github.com/WebKit/WebKit/commit/5f682140ae0d0d494c57494fa5cbc6908453417b
Author: Adrian Taylor <[email protected]>
Date: 2026-01-29 (Thu, 29 Jan 2026)
Changed paths:
M Source/WebKit/Shared/WebKit-Swift.h
Log Message:
-----------
Swift WebBackForwardList (off by default) - dependent types
https://bugs.webkit.org/show_bug.cgi?id=305483
rdar://159589815
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.
This commit adds a small set of extra #includes to WebKit-Swift.h.
Subsequent commits are going to add a substantial amount of Swift APIs which
are exposed to C++ by being placed into WebKit-Swift-Generated.h.
Those APIs may refer to C++ types (for example taking them as function
parameters).
Unfortunately, there's no way to instruct the Swift compiler to include
relevant #includes into that generated header (this is known as
rdar://165068038).
For that reason, we have to ensure that any C++ which includes
WebKit-Swift-Generated.h also #includes the headers required to declare
the types on which Swift APIs depend. To be sure this happens, nobody
includes WebKit-Swift-Generated.h directly, but instead must include
WebKit-Swift.h which adds these extra #includes.
A concrete fictional example: we add a Swift API like this
func doThing(param: Foo)
where Foo is a C++ type declared in Foo.h.
In WebKit-Swift-Generated.h, this would result in something like:
void doThing(Foo foo)
(simplifying muchly) but no #include "Foo.h". To solve this problem
we would #include "Foo.h" from WebKit-Swift.h, and encourage everyone
to #include "WebKit-Swift.h" rather than WebKit-Swift-Generated.h directly.
Canonical link: https://commits.webkit.org/306407@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications