Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2ef16c20194cea0ebf31081d993b2c5a54ef8b4a
      
https://github.com/WebKit/WebKit/commit/2ef16c20194cea0ebf31081d993b2c5a54ef8b4a
  Author: Charlie Wolfe <[email protected]>
  Date:   2026-06-04 (Thu, 04 Jun 2026)

  Changed paths:
    M Source/WebKit/Shared/WebsitePoliciesData.cpp
    M Source/WebKit/Shared/WebsitePoliciesData.h
    M Source/WebKit/Shared/WebsitePoliciesData.serialization.in
    M Source/WebKit/UIProcess/API/APIWebsitePolicies.h
    M Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.mm
    M Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebsitePolicies.mm

  Log Message:
  -----------
  Add WKWebpagePreferences SPI to enable Global Privacy Control per-navigation
https://bugs.webkit.org/show_bug.cgi?id=316225
rdar://178649267

Reviewed by Matthew Finkel.

Plumb a globalPrivacyControlEnabled override through WebsitePoliciesData so 
clients can opt a
navigation into GPC via -[WKWebpagePreferences 
_setGlobalPrivacyControlEnabled:]. When set, the
website policy applies to the document's Settings, enabling both 
navigator.globalPrivacyControl and
the Sec-GPC request header for the main frame, subframes, and subresources.

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

* Source/WebKit/Shared/WebsitePoliciesData.cpp:
(WebKit::WebsitePoliciesData::applyToDocumentLoader):
* Source/WebKit/Shared/WebsitePoliciesData.h:
* Source/WebKit/Shared/WebsitePoliciesData.serialization.in:
* Source/WebKit/UIProcess/API/APIWebsitePolicies.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.mm:
(-[WKWebpagePreferences _setGlobalPrivacyControlEnabled:]):
(-[WKWebpagePreferences _globalPrivacyControlEnabled]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WebsitePolicies.mm:

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



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

Reply via email to