Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff933d97cec7db5b7e11bdc9417a95f1564dc796
      
https://github.com/WebKit/WebKit/commit/ff933d97cec7db5b7e11bdc9417a95f1564dc796
  Author: Ronan Turner <[email protected]>
  Date:   2026-07-31 (Fri, 31 Jul 2026)

  Changed paths:
    M Source/WebKit/UIProcess/EnhancedSecurityTracking.cpp
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EnhancedSecurityPolicies.mm

  Log Message:
  -----------
  Track the latest navigation action when considering Enhanced Security state 
changes
https://bugs.webkit.org/show_bug.cgi?id=320638
rdar://183480452

Reviewed by Simon Fraser.

When performing a same-document fragment navigation, the UI process still 
receives a
policy decision call from WebContent. For same-document navigations, the same 
navigation
object is used as in the original load, which retains state on whether this was 
a
UI-driven navigation.

When considering Enhanced Security state changes, instead of consulting the 
navigation
object, which may have this older state, we should consult the latest 
navigation action
which is a more accurate representation for the current policy decision.

A test is added which performs a same-document fragment navigation and ensures 
no
additional load is occurring.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EnhancedSecurityPolicies.mm

* Source/WebKit/UIProcess/EnhancedSecurityTracking.cpp:
(WebKit::EnhancedSecurityTracking::trackNavigation):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EnhancedSecurityPolicies.mm:
(runHttpFragmentNavigation):

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



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

Reply via email to