Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: cb035d053e086d30e72ea1a6ca09438a5e777050
      
https://github.com/WebKit/WebKit/commit/cb035d053e086d30e72ea1a6ca09438a5e777050
  Author: Basuke Suzuki <[email protected]>
  Date:   2025-11-03 (Mon, 03 Nov 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-anchor-with-target.html
    M Source/WebCore/loader/FrameLoader.cpp

  Log Message:
  -----------
  [Navigation API] NavigateEvent.sourceElement can be cross-window.
https://bugs.webkit.org/show_bug.cgi?id=301885
rdar://163962362

Reviewed by Rupin Mittal.

NavigateEvent.sourceElement should be allowed to reference elements from
different browsing contexts (e.g., when an anchor in a parent window targets
an iframe). Since navigate events only fire for same-origin navigations, there
is no security risk in exposing the source element across windows.

This aligns WebKit's behavior with the HTML specification and matches Chromium's
implementation after their fix.

Spec:
https://html.spec.whatwg.org/multipage/nav-history-apis.html#fire-a-push/replace/reload-navigate-event

* 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-anchor-with-target.html:
imported from https://github.com/web-platform-tests/wpt/pull/55760

* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::dispatchNavigateEvent):

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



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

Reply via email to