-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remote list updates for link decoration filtering fail in Safari 17
https://bugs.webkit.org/show_bug.cgi?id=260391 rdar://114047664 Reviewed by Tim Horton. On macOS Monterey (but not macOS Ventura or later), calling: ``` dlopen("/System/Library/PrivateFrameworks/WebPrivacy.framework/WebPrivacy", RTLD_NOW); ``` ...fails to load WebPrivacy.framework from the Safari staged framework directory. This causes `PAL::isWebPrivacyFrameworkAvailable()` to return `false`, which in turn breaks link decoration filtering when advanced privacy protections are enabled. In comparison, the main built-in tracker blocker loaded by Safari actually *successfully* loads, because we only use `objc_getClass` to look up `WPResources`, and don't depend on a successful `dlopen`. On downlevels, this call to `dlopen` is actually unnecessary, since we already link WebPrivacy via `-weak_framework`; as such, it's sufficient to simply check whether any one of the framework API classes (e.g. `WPResources`) have been loaded. * Source/WebCore/PAL/pal/cocoa/WebPrivacySoftLink.h: * Source/WebCore/PAL/pal/cocoa/WebPrivacySoftLink.mm: * Source/WebKit/Platform/cocoa/WebPrivacyHelpers.mm: Also, remove unnecessary soft link helpers for `WPNetworkAddressRange` (we don't need this because we never need to create one of these in WebKit). (WebKit::canUseWebPrivacyFramework): (WebKit::resourceDataChangedNotificationName): (WebKit::notificationUserInfoResourceTypeKey): (-[WKWebPrivacyNotificationListener init]): (-[WKWebPrivacyNotificationListener dealloc]): (-[WKWebPrivacyNotificationListener didUpdate:]): (WebKit::LinkDecorationFilteringController::updateStrings): (WebKit::requestLinkDecorationFilteringData): (WebKit::TrackerAddressLookupInfo::populateIfNeeded): (WebKit::TrackerDomainLookupInfo::populateIfNeeded): Canonical link: https://commits.webkit.org/267051@main
- Loading branch information
Showing
3 changed files
with
60 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters