Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c0722f0a0eda53df6c20f7d087243cd8e0abf138
      
https://github.com/WebKit/WebKit/commit/c0722f0a0eda53df6c20f7d087243cd8e0abf138
  Author: Basuke Suzuki <[email protected]>
  Date:   2026-04-05 (Sun, 05 Apr 2026)

  Changed paths:
    M Source/WebCore/page/Navigation.cpp
    M Source/WebCore/page/Navigation.h

  Log Message:
  -----------
  [Navigation API] Break up innerDispatchNavigateEvent into logical helpers
https://bugs.webkit.org/show_bug.cgi?id=311531
rdar://174120905

Reviewed by Simon Fraser.

Extract two methods from innerDispatchNavigateEvent() to improve readability:

- setupInterceptionState(): Handles NavigateEvent interception setup including
  transition creation and type-specific navigation state updates (Traverse,
  Reload, Push/Replace). ~40 lines extracted.

- handleSameDocumentNavigation(): Handles same-document navigation handler
  invocation, promise settlement via waitForAllPromises, and dispatching
  navigatesuccess/navigateerror events. ~90 lines extracted.

This is a pure structural refactoring with no behavior change. The extracted
methods are called from innerDispatchNavigateEvent() at the same points where
the inline code previously existed.

* Source/WebCore/page/Navigation.cpp:
(WebCore::Navigation::setupInterceptionState):
(WebCore::Navigation::handleSameDocumentNavigation):
(WebCore::Navigation::innerDispatchNavigateEvent):
* Source/WebCore/page/Navigation.h:

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



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

Reply via email to