-
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.
Remove respondsToSelector checks from where they are no longer needed
https://bugs.webkit.org/show_bug.cgi?id=252901 Reviewed by Aditya Keerthi. In some cases, we know the selectors we are checking for exist because they are unconditionally included in the header files. Other times, we know they exist because the OSes that do not support these methods are no longer supported. According to https://build.webkit.org/dashboard/, we no longer support: - Anything before macOS 12 - Anything before tvOS 16 - Anything before iOS 16 - Anything before watchOS 9 So any respondsToSelector calls for the sake of the OSes that do not fit the criteria above can be removed. * Source/WTF/wtf/PlatformHave.h: Added HAVE_NSSHARINGSERVICEPICKER macro. * Source/WebCore/bridge/objc/objc_instance.mm: (JSC::Bindings::ObjcInstance::setValueOfUndefinedField): Remove comment because it is misleading. (JSC::Bindings::ObjcInstance::getValueOfUndefinedField const): Ditto. * Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: (WebCore::initTypeForRequest): Remove check because AVContentKeyRequest.options was added in 10.14.4, and earliest supported macOS is macOS 12. * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): Remove check because setRate:time:atHostTime: is now a public API. (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::pauseInternal): Ditto. * Source/WebCore/platform/network/cocoa/CookieCocoa.mm: Remove check because sameSitePolicy is now a public API. * Source/WebKit/Platform/cocoa/ImageAnalysisUtilities.mm: (WebKit::makeTextRecognitionResult): Remove check because isPassthrough is explicitly defined in the interface definition in the header. * Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm: (WebKit::WebContextMenuProxyMac::getShareMenuItem): Replace selector check with a check for HAVE_NSSHARINGSERVICEPICKER because standardShareMenuItem is definitely a Ventura addition. Because getStandardShareMenuItem cannot be called from macOS 13 and above due to NSSHARINGSERVICEPICKER being available, getStandardShareMenuItem has been wrapped around a check for not having NSSHARINGSERVICEPICKER. * Source/WebKitLegacy/mac/WebView/WebView.mm: (-[WebView _handleContextMenuTranslation:]): Remove check because the modern counterpart does not check either, meaning this is safe to remove. Canonical link: https://commits.webkit.org/266235@main
- Loading branch information
1 parent
87011db
commit b5e4644
Showing
11 changed files
with
21 additions
and
39 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
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
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
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