Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d51804111884ac3c7870c8fc24b1e5b36056aa3f
      
https://github.com/WebKit/WebKit/commit/d51804111884ac3c7870c8fc24b1e5b36056aa3f
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-08-14 (Fri, 14 Aug 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-history-pushState-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-location-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-navigation-navigate-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-nested-navigateerror-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-nested-navigateerror.html
    M Source/WebCore/page/Navigation.cpp

  Log Message:
  -----------
  [Navigation API] navigateerror is not fired for a navigation started from a 
navigateerror handler
https://bugs.webkit.org/show_bug.cgi?id=321526
rdar://184633618

Reviewed by Rupin Mittal.

The inner navigate event firing algorithm aborts the ongoing navigate event
before it starts, which fires navigateerror synchronously. A navigateerror
handler is free to start a navigation of its own, and that nested navigation 
runs
the whole algorithm to completion, leaving its own event as navigation's ongoing
navigate event.

The outer navigation then overwrote that with its own event without aborting it
first, so the nested navigation was silently dropped and never fired
navigateerror. Since the nested navigateerror handler can start yet another
navigation, aborting a second time is not enough either. Follow the spec and 
keep
aborting in a loop until there is no ongoing navigate event left, bailing out if
abortOngoingNavigation() left the event in place because there was no global
object.

* LayoutTests/TestExpectations: Unskip now passing tests
* 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-history-pushState-expected.txt:
 Progression
* 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-location-expected.txt:
 Ditto
* 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-navigation-navigate-expected.txt:
 Ditto
* 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-nested-navigateerror-expected.txt:
 Added
* 
LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigate-event/navigate-multiple-nested-navigateerror.html:
 Added
* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::abortOngoingNavigationIfNeeded):

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



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

Reply via email to