Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e147bdb27a590c121311316be163ef3bbcb8a24d
https://github.com/WebKit/WebKit/commit/e147bdb27a590c121311316be163ef3bbcb8a24d
Author: Ahmad Saleem <[email protected]>
Date: 2026-08-14 (Fri, 14 Aug 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-activation/activation-initial-about-blank-expected.txt
M Source/WebCore/page/Navigation.cpp
Log Message:
-----------
[Navigation API] navigation.activation.from should be null when navigating
away from the initial about:blank
https://bugs.webkit.org/show_bug.cgi?id=321514
rdar://184624752
Reviewed by Rupin Mittal.
The initial about:blank document has entries and events disabled, so it has no
NavigationHistoryEntry, and the activation for the replace navigation that
leaves it must therefore expose a null from entry.
We instead synthesized a NavigationHistoryEntry out of the about:blank history
item. That used to be what the spec asked for, and
navigation-api/navigation-activation/activation-initial-about-blank.html
asserted `activation.from.url === "about:blank"` with `from.index === -1`. The
test was changed upstream to assert `activation.from === null`, and it has been
failing since it was resynced in 316724@main.
"Update document for history step application" [1] only sets the activation's
old entry when all three of the following hold: navigationType is "replace",
previousEntryForActivation's document state's origin is same origin with the
document's origin, and previousEntryForActivation's initial about:blank is
false. We were missing that third condition, so add it. The about:blank history
item already has an opaque origin and so fails the same-origin check on its
own, but spelling the condition out keeps the code aligned with the spec and
does not rely on that.
wasAboutBlank is also still used to force the navigation type to "replace".
[1]
https://html.spec.whatwg.org/multipage/browsing-the-web.html#update-document-for-history-step-application
*
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-activation/activation-initial-about-blank-expected.txt:
Progression
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::setActivation):
Canonical link: https://commits.webkit.org/319217@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications