Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8c4af2a37e7525e33230dbb8a3df10c3b2a3838a
      
https://github.com/WebKit/WebKit/commit/8c4af2a37e7525e33230dbb8a3df10c3b2a3838a
  Author: Anne van Kesteren <[email protected]>
  Date:   2026-10-15 (Thu, 15 Oct 2026)

  Changed paths:
    A 
LayoutTests/http/tests/site-isolation/navigate-event-for-cross-site-fragment-navigation-expected.txt
    A 
LayoutTests/http/tests/site-isolation/navigate-event-for-cross-site-fragment-navigation.html
    A LayoutTests/http/tests/site-isolation/resources/post-navigate-event.html
    M Source/WebCore/loader/FrameLoader.cpp
    M Source/WebCore/loader/FrameLoader.h
    M Tools/Scripts/webkitpy/api_tests/allowlist.txt
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

  Log Message:
  -----------
  [Site Isolation] Navigations that a document in another process starts don't 
fire navigate
https://bugs.webkit.org/show_bug.cgi?id=327515
rdar://189991882

Reviewed by Basuke Suzuki.

When a document navigates a frame in another process, for example through a
link that targets the frame by name, the UI process continues the navigation in
the frame's process. FrameLoader only fires navigate in loadURL(), which that
path doesn't use, so the frame's document never got a navigate event.

It now fires when the navigation arrives in the frame's process: for every
fragment navigation, and, following HTML, for a cross-document navigation
started by a same origin-domain document. With site isolation alone the latter
can't happen yet, but it will once same-origin documents with different
Document-Isolation-Policy values are in different processes. sourceElement is
null, as the element is in another process.

A navigation that a listener starts is a new navigation, so it gets its own
policy decision instead of continuing as part of the one that fired the event,
and that one stops. When a listener cancels the event, the frame no longer
keeps the navigation's document loader as its policy document loader, which
kept its parent from finishing loading.

Not covered yet:
- When the navigation moves to yet another process, navigate still doesn't
  fire.
- formData is null for a form submission, and location.replace() gives
  navigationType "push".

Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm
       
http/tests/site-isolation/navigate-event-for-cross-site-fragment-navigation.html

Canonical link: https://commits.webkit.org/323812@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to