Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9d6ff39de1fb63594f43dfebcc293a83b19fb114
      
https://github.com/WebKit/WebKit/commit/9d6ff39de1fb63594f43dfebcc293a83b19fb114
  Author: Charlie Wolfe <[email protected]>
  Date:   2026-01-29 (Thu, 29 Jan 2026)

  Changed paths:
    M Source/WebCore/loader/FrameLoader.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/SOAuthorizationTests.mm

  Log Message:
  -----------
  REGRESSION (288409@main) - tv.apple.com: Unexpected to see sign-in prompt 
using the forward button
https://bugs.webkit.org/show_bug.cgi?id=306473
rdar://151991688

Reviewed by Brady Eidson.

This change fixes an issue where loading a URL that triggers an 
SOAuthorizationSession into a subframe
incorrectly creates a main frame back/forward item. The bug occurs with the 
following sequence:

1. We load an initial URL into a subframe
2. This subframe load has a load type of `RedirectWithLockedBackForwardList` to 
avoid modifying the
   back/forward list
3. During policy decision, we determine that the URL should trigger an 
SOAuthorizationSession load
4. The initial load is cancelled, and we immediately begin loading the 
SubFrameSOAuthorizationSession
5. The load begins without considering the load type of the initial navigation, 
so we create a new
   back/forward item

This change fixes the issue by checking the load type of the navigation that 
was set before the previous
navigation was cancelled.

This was revealed by 288409@main because this unexpected subframe navigation 
began to be treated as a
new main frame back/forward item.

Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/SOAuthorizationTests.mm
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::load):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SOAuthorizationTests.mm:
(TestWebKitAPI::TEST(SOAuthorizationSubFrame, 
InterceptionSuccessBackForwardList)):

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



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

Reply via email to