Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f101f0135f5167f100be5dfd30aa56785b7144e
https://github.com/WebKit/WebKit/commit/2f101f0135f5167f100be5dfd30aa56785b7144e
Author: Ben Nham <[email protected]>
Date: 2024-09-10 (Tue, 10 Sep 2024)
Changed paths:
M Source/WebCore/loader/DocumentLoader.cpp
M Source/WebCore/loader/DocumentLoader.h
M Source/WebKit/CMakeLists.txt
M Source/WebKit/DerivedSources-input.xcfilelist
M Source/WebKit/DerivedSources.make
M Source/WebKit/Shared/WebsitePoliciesData.cpp
M Source/WebKit/Shared/WebsitePoliciesData.h
M Source/WebKit/Shared/WebsitePoliciesData.serialization.in
A Source/WebKit/Shared/WebsitePushAndNotificationsEnabledPolicy.h
A
Source/WebKit/Shared/WebsitePushAndNotificationsEnabledPolicy.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 Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm
Log Message:
-----------
Allow push and notification APIs to by enabled via WKWebpagePreferences
https://bugs.webkit.org/show_bug.cgi?id=279415
rdar://133764931
Reviewed by Sihui Liu.
Currently push and notification APIs are enabled via WKPreferences. But we have
some clients that
need to enable these APIs on a per-page-load basis. To facilitate that, we now
allow those APIs to
be enabled at page load time via WKWebpagePreferences. If the webpage
preference isn't set, we defer
to the value in WKPreferences.
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::applyPoliciesToSettings):
* Source/WebCore/loader/DocumentLoader.h:
(WebCore::DocumentLoader::pushAndNotificationsEnabledPolicy const):
(WebCore::DocumentLoader::setPushAndNotificationsEnabledPolicy):
* Source/WebKit/CMakeLists.txt:
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/WebsitePoliciesData.cpp:
(WebKit::WebsitePoliciesData::applyToDocumentLoader):
* Source/WebKit/Shared/WebsitePoliciesData.h:
* Source/WebKit/Shared/WebsitePoliciesData.serialization.in:
* Source/WebKit/Shared/WebsitePushAndNotificationsEnabledPolicy.h: Added.
*
Source/WebKit/Shared/WebsitePushAndNotificationsEnabledPolicy.serialization.in:
Added.
* Source/WebKit/UIProcess/API/APIWebsitePolicies.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.mm:
(-[WKWebpagePreferences _pushAndNotificationAPIEnabled]):
(-[WKWebpagePreferences _setPushAndNotificationAPIEnabled:]):
* Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
Canonical link: https://commits.webkit.org/283442@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes