Rename Vector and FixedVector::findMatching to findIf to match stl naming.
https://bugs.webkit.org/show_bug.cgi?id=234864
rdar://87424746

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

* bytecompiler/NodesCodegen.cpp:
(JSC::ArrayPatternNode::emitDirectBinding):

Source/WebCore:

* Modules/async-clipboard/Clipboard.cpp:
(WebCore::Clipboard::getType):
* Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
(WebCore::ClipboardItemBindingsDataSource::getType):
(WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
* Modules/cache/DOMCacheStorage.cpp:
(WebCore::DOMCacheStorage::match):
(WebCore::DOMCacheStorage::has):
(WebCore::DOMCacheStorage::findCacheOrCreate):
(WebCore::DOMCacheStorage::doOpen):
(WebCore::DOMCacheStorage::doRemove):
* Modules/highlight/Highlight.cpp:
(WebCore::Highlight::addToSetLike):
* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::showMediaControlsContextMenu):
* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::trackEnded):
* Modules/mediastream/RTCController.cpp:
(WebCore::RTCController::shouldDisableICECandidateFiltering):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::setConfiguration):
(WebCore::RTCPeerConnection::getOrCreateIceTransport):
(WebCore::RTCPeerConnection::getOrCreateDtlsTransport):
* Modules/mediastream/RTCRtpSFrameTransformer.cpp:
(WebCore::RTCRtpSFrameTransformer::decryptFrame):
* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::checkNumberOfChannelsForInput):
* Modules/webaudio/AudioParamTimeline.cpp:
(WebCore::AudioParamTimeline::cancelAndHoldAtTime):
* Modules/webaudio/IIRFilterNode.cpp:
(WebCore::IIRFilterNode::create):
* Modules/webauthn/fido/U2fCommandConstructor.cpp:
(fido::isConvertibleToU2fRegisterCommand):
* Modules/webxr/WebXRInputSourceArray.cpp:
(WebCore::WebXRInputSourceArray::handleAddedOrUpdatedInputSources):
* Modules/webxr/WebXRSession.cpp:
(WebCore::WebXRSession::cancelAnimationFrame):
* Modules/webxr/WebXRSystem.cpp:
(WebCore::WebXRSystem::ensureImmersiveXRDeviceIsSelected):
* accessibility/AXObjectCache.cpp:
(WebCore::appendIfNotContainsMatching):
* accessibility/atspi/AccessibilityAtspi.cpp:
(WebCore::AccessibilityAtspi::shouldEmitSignal):
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::types const):
* dom/DataTransferItemList.cpp:
(WebCore::removeStringItemOfLowercasedType):
* dom/Document.cpp:
(WebCore::Document::addPendingScrollEventTarget):
(WebCore::Document::updateIntersectionObservations):
* dom/EventPath.cpp:
(WebCore:: const):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::enqueueSlotChangeEvent):
* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch const):
* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::cancelVideoFrameCallback):
* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditElement::fieldIndexOf const):
(WebCore::DateTimeEditElement::focusedFieldElement const):
(WebCore::DateTimeEditElement::didBlurFromField):
* html/track/InbandDataTextTrack.cpp:
(WebCore::InbandDataTextTrack::findIncompleteCue):
* inspector/InspectorCanvas.cpp:
(WebCore::InspectorCanvas::indexForData):
* inspector/agents/WebDebuggerAgent.cpp:
(WebCore::WebDebuggerAgent::didAddEventListener):
(WebCore::WebDebuggerAgent::willRemoveEventListener):
* layout/floats/FloatingState.cpp:
(WebCore::Layout::FloatingState::append):
* layout/integration/LayoutIntegrationBoxTree.cpp:
(WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer):
(WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::startIconLoading):
* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::isObserving const):
* page/ModalContainerObserver.cpp:
(WebCore::ModalContainerObserver::collectClickableElementsTimerFired):
* page/ResizeObserver.cpp:
(WebCore::ResizeObserver::observe):
* page/scrolling/ScrollLatchingController.cpp:
(WebCore::ScrollLatchingController::removeLatchingStateForTarget):
* page/scrolling/ScrollSnapOffsetsInfo.cpp:
(WebCore::hasCompatibleSnapArea):
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::removeChild):
* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::preferredImageMIMETypeForEncoding):
* platform/PasteboardCustomData.cpp:
(WebCore::PasteboardCustomData::addOrMoveEntryToEnd):
(WebCore::PasteboardCustomData::hasSameOriginCustomData const):
* platform/cocoa/PasteboardCocoa.mm:
(WebCore::Pasteboard::fileContentState):
* platform/encryptedmedia/CDMProxy.cpp:
(WebCore::KeyStore::containsKeyID const):
(WebCore::KeyStore::add):
* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::findMonitorForDisplayID const):
* platform/graphics/HEVCUtilities.cpp:
(WebCore::createHEVCCodecParametersString):
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::mediaEngine):
(WebCore::MediaPlayer::nextMediaEngine):
* platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForKeyIDs const):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForRequest const):
(WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForGroup const):
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::animationIsRunning const):
(WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
(WebCore::GraphicsLayerCA::isRunningTransformAnimation const):
* platform/graphics/coretext/FontCoreText.cpp:
(WebCore::Font::isProbablyOnlyUsedToRenderIcons const):
* platform/graphics/egl/GLContextEGL.cpp:
(WebCore::GLContextEGL::getEGLConfig):
* platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
(WebCore::GStreamerRegistryScanner::isContentTypeSupported const):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::fileContentState):
* platform/mediastream/CaptureDevice.h:
(WebCore::haveDevicesChanged):
* platform/mediastream/MediaConstraints.h:
(WebCore::NumericConstraint::valueForDiscreteCapabilityValues const):
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(WebKitMediaStreamObserver::didRemoveTrack):
* platform/mediastream/mac/AVVideoCaptureSource.mm:
(WebCore::AVVideoCaptureSource::generatePresets):
* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::getUncommonHeader const):
(WebCore::HTTPHeaderMap::setUncommonHeader):
(WebCore::HTTPHeaderMap::add):
(WebCore::HTTPHeaderMap::contains const):
(WebCore::HTTPHeaderMap::get const):
(WebCore::HTTPHeaderMap::set):
* platform/xr/openxr/OpenXRExtensions.cpp:
(PlatformXR::OpenXRExtensions::isExtensionSupported const):
* plugins/PluginData.h:
(WebCore::isSupportedPlugin):

Source/WebKit:

* GPUProcess/media/RemoteCDMFactoryProxy.cpp:
(WebKit::factoryForKeySystem):
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::findRootNetworkActivity):
(WebKit::NetworkConnectionToWebProcess::findNetworkActivityTracker):
* NetworkProcess/cache/CacheStorageEngineCache.cpp:
(WebKit::CacheStorage::Cache::storeRecords):
(WebKit::CacheStorage::Cache::put):
(WebKit::CacheStorage::Cache::remove):
(WebKit::CacheStorage::Cache::removeFromRecordList):
(WebKit::CacheStorage::Cache::updateRecordToDisk):
* NetworkProcess/cache/CacheStorageEngineCaches.cpp:
(WebKit::CacheStorage::Caches::find):
(WebKit::CacheStorage::Caches::remove):
(WebKit::CacheStorage::Caches::hasActiveCache const):
(WebKit::CacheStorage::Caches::dispose):
* Shared/mac/MediaFormatReader/MediaFormatReader.cpp:
(WebKit::MediaFormatReader::didProvideMediaData):
* UIProcess/API/glib/WebKitWebView.cpp:
(webkit_web_view_remove_frame_displayed_callback):
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::PasteboardAccessInformation::grantAccess):
(WebKit::WebPasteboardProxy::PasteboardAccessInformation::accessType const):
* UIProcess/UserMediaPermissionRequestProxy.cpp:
(WebKit::setDeviceAsFirst):
* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::makeCredential):
(WebKit::LocalAuthenticator::getAssertion):
(WebKit::LocalAuthenticator::deleteDuplicateCredential const):
* UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
(WebKit::CtapAuthenticator::continueGetNextAssertionAfterResponseReceived):
* UIProcess/ios/DragDropInteractionState.mm:
(WebKit::DragDropInteractionState::defaultDropPreview const):
(WebKit::BlockPtr<void):
* UIProcess/mac/DisplayLink.cpp:
(WebKit::DisplayLink::setPreferredFramesPerSecond):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::getContextMenuFromItems):
* UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
(shouldShowDividersBetweenCells):
* WebProcess/Automation/WebAutomationSessionProxy.cpp:
(WebKit::WebAutomationSessionProxy::computeElementLayout):
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserScriptMessageHandlerInternal):
(WebKit::WebUserContentController::addUserScriptInternal):
(WebKit::WebUserContentController::addUserStyleSheetInternal):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::requestTextRecognition):
* WebProcess/WebProcess.cpp:
(WebKit::checkDocumentsCaptureStateConsistency):

Source/WTF:

Also rename reverseFindMatching to reverseFindIf.

See https://bugs.webkit.org/show_bug.cgi?id=234855#c3 and
https://en.cppreference.com/w/cpp/algorithm/find.

* wtf/FixedVector.h:
(WTF::FixedVector<T>::findIf const):
(WTF::FixedVector<T>::find const):
(WTF::FixedVector<T>::findMatching const): Deleted.
* wtf/Vector.h:
(WTF::Malloc>::findIf const):
(WTF::Malloc>::find const):
(WTF::Malloc>::reverseFindIf const):
(WTF::Malloc>::findMatching const): Deleted.
(WTF::Malloc>::reverseFindMatching const): Deleted.

Tools:

* TestWebKitAPI/Tests/WTF/FixedVector.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/Vector.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:
(TestWebKitAPI::parseUserAgent):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::closeOtherPage):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@288541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index f2b73e3..519c115 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2022-01-24  Mark Lam  <mark.lam@apple.com>
+
+        Rename Vector and FixedVector::findMatching to findIf to match stl naming.
+        https://bugs.webkit.org/show_bug.cgi?id=234864
+        rdar://87424746
+
+        Reviewed by Yusuke Suzuki.
+
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::ArrayPatternNode::emitDirectBinding):
+
 2022-01-24  Yusuke Suzuki  <ysuzuki@apple.com>
 
         [JSC] Enable Array#groupBy and Array#groupByToMap
diff --git a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
index 7ab17e6..31108dd 100644
--- a/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
+++ b/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
@@ -1,7 +1,7 @@
 /*
 *  Copyright (C) 1999-2002 Harri Porten (porten@kde.org)
 *  Copyright (C) 2001 Peter Kelly (pmk@post.com)
-*  Copyright (C) 2003-2019 Apple Inc. All rights reserved.
+*  Copyright (C) 2003-2022 Apple Inc. All rights reserved.
 *  Copyright (C) 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca)
 *  Copyright (C) 2007 Maks Orlovich
 *  Copyright (C) 2007 Eric Seidel <eric@webkit.org>
@@ -5351,7 +5351,7 @@
     if (!rhs->isSimpleArray())
         return nullptr;
 
-    if (m_targetPatterns.findMatching([&] (auto& target) { return target.bindingType == BindingType::RestElement; }) != notFound)
+    if (m_targetPatterns.findIf([&] (auto& target) { return target.bindingType == BindingType::RestElement; }) != notFound)
         return nullptr;
 
     ElementNode* elementNodes = static_cast<ArrayNode*>(rhs)->elements();
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog
index 597ce82..ba78ac1 100644
--- a/Source/WTF/ChangeLog
+++ b/Source/WTF/ChangeLog
@@ -1,3 +1,27 @@
+2022-01-24  Mark Lam  <mark.lam@apple.com>
+
+        Rename Vector and FixedVector::findMatching to findIf to match stl naming.
+        https://bugs.webkit.org/show_bug.cgi?id=234864
+        rdar://87424746
+
+        Reviewed by Yusuke Suzuki.
+
+        Also rename reverseFindMatching to reverseFindIf.
+
+        See https://bugs.webkit.org/show_bug.cgi?id=234855#c3 and
+        https://en.cppreference.com/w/cpp/algorithm/find.
+
+        * wtf/FixedVector.h:
+        (WTF::FixedVector<T>::findIf const):
+        (WTF::FixedVector<T>::find const):
+        (WTF::FixedVector<T>::findMatching const): Deleted.
+        * wtf/Vector.h:
+        (WTF::Malloc>::findIf const):
+        (WTF::Malloc>::find const):
+        (WTF::Malloc>::reverseFindIf const):
+        (WTF::Malloc>::findMatching const): Deleted.
+        (WTF::Malloc>::reverseFindMatching const): Deleted.
+
 2022-01-24  Michael Catanzaro  <mcatanzaro@gnome.org>
 
         Build failure with GCC 12: no matching function for call to 'end(LChar [7])'
diff --git a/Source/WTF/wtf/FixedVector.h b/Source/WTF/wtf/FixedVector.h
index 4c9a4ea..26dfaf9 100644
--- a/Source/WTF/wtf/FixedVector.h
+++ b/Source/WTF/wtf/FixedVector.h
@@ -155,7 +155,7 @@
 
     template<typename U> bool contains(const U&) const;
     template<typename U> size_t find(const U&) const;
-    template<typename MatchFunction> size_t findMatching(const MatchFunction&) const;
+    template<typename MatchFunction> size_t findIf(const MatchFunction&) const;
 
     void swap(FixedVector<T>& other)
     {
@@ -183,7 +183,7 @@
 
 template<typename T>
 template<typename MatchFunction>
-size_t FixedVector<T>::findMatching(const MatchFunction& matches) const
+size_t FixedVector<T>::findIf(const MatchFunction& matches) const
 {
     for (size_t i = 0; i < size(); ++i) {
         if (matches(at(i)))
@@ -196,7 +196,7 @@
 template<typename U>
 size_t FixedVector<T>::find(const U& value) const
 {
-    return findMatching([&](auto& item) {
+    return findIf([&](auto& item) {
         return item == value;
     });
 }
diff --git a/Source/WTF/wtf/Vector.h b/Source/WTF/wtf/Vector.h
index e144a30..a0cabf8 100644
--- a/Source/WTF/wtf/Vector.h
+++ b/Source/WTF/wtf/Vector.h
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 2005-2020 Apple Inc. All rights reserved.
+ *  Copyright (C) 2005-2022 Apple Inc. All rights reserved.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
@@ -756,9 +756,9 @@
     
     template<typename U> bool contains(const U&) const;
     template<typename U> size_t find(const U&) const;
-    template<typename MatchFunction> size_t findMatching(const MatchFunction&) const;
+    template<typename MatchFunction> size_t findIf(const MatchFunction&) const;
     template<typename U> size_t reverseFind(const U&) const;
-    template<typename MatchFunction> size_t reverseFindMatching(const MatchFunction&) const;
+    template<typename MatchFunction> size_t reverseFindIf(const MatchFunction&) const;
 
     template<typename U> bool appendIfNotContains(const U&);
 
@@ -996,7 +996,7 @@
 
 template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity, typename Malloc>
 template<typename MatchFunction>
-size_t Vector<T, inlineCapacity, OverflowHandler, minCapacity, Malloc>::findMatching(const MatchFunction& matches) const
+size_t Vector<T, inlineCapacity, OverflowHandler, minCapacity, Malloc>::findIf(const MatchFunction& matches) const
 {
     for (size_t i = 0; i < size(); ++i) {
         if (matches(at(i)))
@@ -1009,7 +1009,7 @@
 template<typename U>
 size_t Vector<T, inlineCapacity, OverflowHandler, minCapacity, Malloc>::find(const U& value) const
 {
-    return findMatching([&](auto& item) {
+    return findIf([&](auto& item) {
         return item == value;
     });
 }
@@ -1028,7 +1028,7 @@
 
 template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity, typename Malloc>
 template<typename MatchFunction>
-size_t Vector<T, inlineCapacity, OverflowHandler, minCapacity, Malloc>::reverseFindMatching(const MatchFunction& matches) const
+size_t Vector<T, inlineCapacity, OverflowHandler, minCapacity, Malloc>::reverseFindIf(const MatchFunction& matches) const
 {
     for (size_t i = 1; i <= size(); ++i) {
         const size_t index = size() - i;
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index f946651..46eb5a0 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,155 @@
+2022-01-24  Mark Lam  <mark.lam@apple.com>
+
+        Rename Vector and FixedVector::findMatching to findIf to match stl naming.
+        https://bugs.webkit.org/show_bug.cgi?id=234864
+        rdar://87424746
+
+        Reviewed by Yusuke Suzuki.
+
+        * Modules/async-clipboard/Clipboard.cpp:
+        (WebCore::Clipboard::getType):
+        * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp:
+        (WebCore::ClipboardItemBindingsDataSource::getType):
+        (WebCore::ClipboardItemBindingsDataSource::collectDataForWriting):
+        * Modules/cache/DOMCacheStorage.cpp:
+        (WebCore::DOMCacheStorage::match):
+        (WebCore::DOMCacheStorage::has):
+        (WebCore::DOMCacheStorage::findCacheOrCreate):
+        (WebCore::DOMCacheStorage::doOpen):
+        (WebCore::DOMCacheStorage::doRemove):
+        * Modules/highlight/Highlight.cpp:
+        (WebCore::Highlight::addToSetLike):
+        * Modules/mediacontrols/MediaControlsHost.cpp:
+        (WebCore::MediaControlsHost::showMediaControlsContextMenu):
+        * Modules/mediarecorder/MediaRecorder.cpp:
+        (WebCore::MediaRecorder::trackEnded):
+        * Modules/mediastream/RTCController.cpp:
+        (WebCore::RTCController::shouldDisableICECandidateFiltering):
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::setConfiguration):
+        (WebCore::RTCPeerConnection::getOrCreateIceTransport):
+        (WebCore::RTCPeerConnection::getOrCreateDtlsTransport):
+        * Modules/mediastream/RTCRtpSFrameTransformer.cpp:
+        (WebCore::RTCRtpSFrameTransformer::decryptFrame):
+        * Modules/webaudio/AudioNode.cpp:
+        (WebCore::AudioNode::checkNumberOfChannelsForInput):
+        * Modules/webaudio/AudioParamTimeline.cpp:
+        (WebCore::AudioParamTimeline::cancelAndHoldAtTime):
+        * Modules/webaudio/IIRFilterNode.cpp:
+        (WebCore::IIRFilterNode::create):
+        * Modules/webauthn/fido/U2fCommandConstructor.cpp:
+        (fido::isConvertibleToU2fRegisterCommand):
+        * Modules/webxr/WebXRInputSourceArray.cpp:
+        (WebCore::WebXRInputSourceArray::handleAddedOrUpdatedInputSources):
+        * Modules/webxr/WebXRSession.cpp:
+        (WebCore::WebXRSession::cancelAnimationFrame):
+        * Modules/webxr/WebXRSystem.cpp:
+        (WebCore::WebXRSystem::ensureImmersiveXRDeviceIsSelected):
+        * accessibility/AXObjectCache.cpp:
+        (WebCore::appendIfNotContainsMatching):
+        * accessibility/atspi/AccessibilityAtspi.cpp:
+        (WebCore::AccessibilityAtspi::shouldEmitSignal):
+        * dom/DataTransfer.cpp:
+        (WebCore::DataTransfer::types const):
+        * dom/DataTransferItemList.cpp:
+        (WebCore::removeStringItemOfLowercasedType):
+        * dom/Document.cpp:
+        (WebCore::Document::addPendingScrollEventTarget):
+        (WebCore::Document::updateIntersectionObservations):
+        * dom/EventPath.cpp:
+        (WebCore:: const):
+        * dom/MutationObserver.cpp:
+        (WebCore::MutationObserver::enqueueSlotChangeEvent):
+        * html/BaseTextInputType.cpp:
+        (WebCore::BaseTextInputType::patternMismatch const):
+        * html/HTMLVideoElement.cpp:
+        (WebCore::HTMLVideoElement::cancelVideoFrameCallback):
+        * html/shadow/DateTimeEditElement.cpp:
+        (WebCore::DateTimeEditElement::fieldIndexOf const):
+        (WebCore::DateTimeEditElement::focusedFieldElement const):
+        (WebCore::DateTimeEditElement::didBlurFromField):
+        * html/track/InbandDataTextTrack.cpp:
+        (WebCore::InbandDataTextTrack::findIncompleteCue):
+        * inspector/InspectorCanvas.cpp:
+        (WebCore::InspectorCanvas::indexForData):
+        * inspector/agents/WebDebuggerAgent.cpp:
+        (WebCore::WebDebuggerAgent::didAddEventListener):
+        (WebCore::WebDebuggerAgent::willRemoveEventListener):
+        * layout/floats/FloatingState.cpp:
+        (WebCore::Layout::FloatingState::append):
+        * layout/integration/LayoutIntegrationBoxTree.cpp:
+        (WebCore::LayoutIntegration::BoxTree::layoutBoxForRenderer):
+        (WebCore::LayoutIntegration::BoxTree::rendererForLayoutBox):
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::startIconLoading):
+        * page/IntersectionObserver.cpp:
+        (WebCore::IntersectionObserver::isObserving const):
+        * page/ModalContainerObserver.cpp:
+        (WebCore::ModalContainerObserver::collectClickableElementsTimerFired):
+        * page/ResizeObserver.cpp:
+        (WebCore::ResizeObserver::observe):
+        * page/scrolling/ScrollLatchingController.cpp:
+        (WebCore::ScrollLatchingController::removeLatchingStateForTarget):
+        * page/scrolling/ScrollSnapOffsetsInfo.cpp:
+        (WebCore::hasCompatibleSnapArea):
+        * page/scrolling/ScrollingTreeNode.cpp:
+        (WebCore::ScrollingTreeNode::removeChild):
+        * platform/MIMETypeRegistry.cpp:
+        (WebCore::MIMETypeRegistry::preferredImageMIMETypeForEncoding):
+        * platform/PasteboardCustomData.cpp:
+        (WebCore::PasteboardCustomData::addOrMoveEntryToEnd):
+        (WebCore::PasteboardCustomData::hasSameOriginCustomData const):
+        * platform/cocoa/PasteboardCocoa.mm:
+        (WebCore::Pasteboard::fileContentState):
+        * platform/encryptedmedia/CDMProxy.cpp:
+        (WebCore::KeyStore::containsKeyID const):
+        (WebCore::KeyStore::add):
+        * platform/graphics/DisplayRefreshMonitorManager.cpp:
+        (WebCore::DisplayRefreshMonitorManager::findMonitorForDisplayID const):
+        * platform/graphics/HEVCUtilities.cpp:
+        (WebCore::createHEVCCodecParametersString):
+        * platform/graphics/MediaPlayer.cpp:
+        (WebCore::MediaPlayer::mediaEngine):
+        (WebCore::MediaPlayer::nextMediaEngine):
+        * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
+        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForKeyIDs const):
+        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForRequest const):
+        (WebCore::CDMInstanceFairPlayStreamingAVFObjC::sessionForGroup const):
+        (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense):
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::animationIsRunning const):
+        (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
+        (WebCore::GraphicsLayerCA::isRunningTransformAnimation const):
+        * platform/graphics/coretext/FontCoreText.cpp:
+        (WebCore::Font::isProbablyOnlyUsedToRenderIcons const):
+        * platform/graphics/egl/GLContextEGL.cpp:
+        (WebCore::GLContextEGL::getEGLConfig):
+        * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
+        (WebCore::GStreamerRegistryScanner::isContentTypeSupported const):
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
+        (WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore const):
+        * platform/gtk/PasteboardGtk.cpp:
+        (WebCore::Pasteboard::fileContentState):
+        * platform/mediastream/CaptureDevice.h:
+        (WebCore::haveDevicesChanged):
+        * platform/mediastream/MediaConstraints.h:
+        (WebCore::NumericConstraint::valueForDiscreteCapabilityValues const):
+        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
+        (WebKitMediaStreamObserver::didRemoveTrack):
+        * platform/mediastream/mac/AVVideoCaptureSource.mm:
+        (WebCore::AVVideoCaptureSource::generatePresets):
+        * platform/network/HTTPHeaderMap.cpp:
+        (WebCore::HTTPHeaderMap::getUncommonHeader const):
+        (WebCore::HTTPHeaderMap::setUncommonHeader):
+        (WebCore::HTTPHeaderMap::add):
+        (WebCore::HTTPHeaderMap::contains const):
+        (WebCore::HTTPHeaderMap::get const):
+        (WebCore::HTTPHeaderMap::set):
+        * platform/xr/openxr/OpenXRExtensions.cpp:
+        (PlatformXR::OpenXRExtensions::isExtensionSupported const):
+        * plugins/PluginData.h:
+        (WebCore::isSupportedPlugin):
+
 2022-01-24  Yusuke Suzuki  <ysuzuki@apple.com>
 
         Expand RefPtr / Ref use in FrameLoader
diff --git a/Source/WebCore/Modules/async-clipboard/Clipboard.cpp b/Source/WebCore/Modules/async-clipboard/Clipboard.cpp
index 4ae7bcc..c1bc800 100644
--- a/Source/WebCore/Modules/async-clipboard/Clipboard.cpp
+++ b/Source/WebCore/Modules/async-clipboard/Clipboard.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -203,7 +203,7 @@
         return;
     }
 
-    auto itemIndex = m_activeSession->items.findMatching([&] (auto& activeItem) {
+    auto itemIndex = m_activeSession->items.findIf([&] (auto& activeItem) {
         return activeItem.ptr() == &item;
     });
 
diff --git a/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp b/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp
index d0746da..b66b5bf 100644
--- a/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp
+++ b/Source/WebCore/Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -82,7 +82,7 @@
 
 void ClipboardItemBindingsDataSource::getType(const String& type, Ref<DeferredPromise>&& promise)
 {
-    auto matchIndex = m_itemPromises.findMatching([&] (auto& item) {
+    auto matchIndex = m_itemPromises.findIf([&] (auto& item) {
         return type == item.key;
     });
 
@@ -147,7 +147,7 @@
 
             Ref itemTypeLoader { *weakItemTypeLoader };
 #if !COMPILER(MSVC)
-            ASSERT_UNUSED(this, notFound != m_itemTypeLoaders.findMatching([&] (auto& loader) { return loader.ptr() == itemTypeLoader.ptr(); }));
+            ASSERT_UNUSED(this, notFound != m_itemTypeLoaders.findIf([&] (auto& loader) { return loader.ptr() == itemTypeLoader.ptr(); }));
 #endif
 
             auto result = promise->result();
diff --git a/Source/WebCore/Modules/cache/DOMCacheStorage.cpp b/Source/WebCore/Modules/cache/DOMCacheStorage.cpp
index 91fa714..636bd80 100644
--- a/Source/WebCore/Modules/cache/DOMCacheStorage.cpp
+++ b/Source/WebCore/Modules/cache/DOMCacheStorage.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -115,7 +115,7 @@
         }
 
         if (!options.cacheName.isNull()) {
-            auto position = m_caches.findMatching([&](auto& item) { return item->name() == options.cacheName; });
+            auto position = m_caches.findIf([&](auto& item) { return item->name() == options.cacheName; });
             if (position != notFound) {
                 m_caches[position]->match(WTFMove(info), WTFMove(options), WTFMove(promise));
                 return;
@@ -135,13 +135,13 @@
             promise.reject(WTFMove(exception.value()));
             return;
         }
-        promise.resolve(m_caches.findMatching([&](auto& item) { return item->name() == name; }) != notFound);
+        promise.resolve(m_caches.findIf([&](auto& item) { return item->name() == name; }) != notFound);
     });
 }
 
 Ref<DOMCache> DOMCacheStorage::findCacheOrCreate(DOMCacheEngine::CacheInfo&& info)
 {
-   auto position = m_caches.findMatching([&] (const auto& cache) { return info.identifier == cache->identifier(); });
+   auto position = m_caches.findIf([&] (const auto& cache) { return info.identifier == cache->identifier(); });
    if (position != notFound)
        return m_caches[position].copyRef();
    return DOMCache::create(*scriptExecutionContext(), WTFMove(info.name), info.identifier, m_connection.copyRef());
@@ -199,7 +199,7 @@
 
 void DOMCacheStorage::doOpen(const String& name, DOMPromiseDeferred<IDLInterface<DOMCache>>&& promise)
 {
-    auto position = m_caches.findMatching([&](auto& item) { return item->name() == name; });
+    auto position = m_caches.findIf([&](auto& item) { return item->name() == name; });
     if (position != notFound) {
         promise.resolve(DOMCache::create(*scriptExecutionContext(), String { m_caches[position]->name() }, m_caches[position]->identifier(), m_connection.copyRef()));
         return;
@@ -232,7 +232,7 @@
 
 void DOMCacheStorage::doRemove(const String& name, DOMPromiseDeferred<IDLBoolean>&& promise)
 {
-    auto position = m_caches.findMatching([&](auto& item) { return item->name() == name; });
+    auto position = m_caches.findIf([&](auto& item) { return item->name() == name; });
     if (position == notFound) {
         promise.resolve(false);
         return;
diff --git a/Source/WebCore/Modules/highlight/Highlight.cpp b/Source/WebCore/Modules/highlight/Highlight.cpp
index f47bf46..cb9ddf9 100644
--- a/Source/WebCore/Modules/highlight/Highlight.cpp
+++ b/Source/WebCore/Modules/highlight/Highlight.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -85,7 +85,7 @@
 
 bool Highlight::addToSetLike(StaticRange& range)
 {
-    if (notFound != m_rangesData.findMatching([&range](const Ref<HighlightRangeData>& current) { return current.get().range.get() == range; }))
+    if (notFound != m_rangesData.findIf([&range](const Ref<HighlightRangeData>& current) { return current.get().range.get() == range; }))
         return false;
     repaintRange(range);
     m_rangesData.append(HighlightRangeData::create(range));
diff --git a/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp b/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
index eef79db..7da608f 100644
--- a/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
+++ b/Source/WebCore/Modules/mediacontrols/MediaControlsHost.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -572,7 +572,7 @@
 
             auto& captionPreferences = page->group().ensureCaptionPreferences();
             auto sortedTextTracks = captionPreferences.sortedTrackListForMenu(textTracks, { TextTrack::Kind::Subtitles, TextTrack::Kind::Captions, TextTrack::Kind::Descriptions });
-            bool allTracksDisabled = notFound == sortedTextTracks.findMatching([] (const auto& textTrack) {
+            bool allTracksDisabled = notFound == sortedTextTracks.findIf([] (const auto& textTrack) {
                 return textTrack->mode() == TextTrack::Mode::Showing;
             });
             bool usesAutomaticTrack = captionPreferences.captionDisplayMode() == CaptionUserPreferences::Automatic && allTracksDisabled;
diff --git a/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp b/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
index f7aee65..406ec97 100644
--- a/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
+++ b/Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -363,7 +363,7 @@
 
 void MediaRecorder::trackEnded(MediaStreamTrackPrivate&)
 {
-    auto position = m_tracks.findMatching([](auto& track) {
+    auto position = m_tracks.findIf([](auto& track) {
         return !track->ended();
     });
     if (position != notFound)
diff --git a/Source/WebCore/Modules/mediastream/RTCController.cpp b/Source/WebCore/Modules/mediastream/RTCController.cpp
index 60c7d5c..c7b751d 100644
--- a/Source/WebCore/Modules/mediastream/RTCController.cpp
+++ b/Source/WebCore/Modules/mediastream/RTCController.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -67,7 +67,7 @@
 {
     if (!m_shouldFilterICECandidates)
         return true;
-    return notFound != m_filteringDisabledOrigins.findMatching([&] (const auto& origin) {
+    return notFound != m_filteringDisabledOrigins.findIf([&] (const auto& origin) {
         return matchDocumentOrigin(document, origin.topOrigin, origin.clientOrigin);
     });
 }
diff --git a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp b/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
index 809517a..5bddfec 100644
--- a/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
+++ b/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp
@@ -2,7 +2,7 @@
  * Copyright (C) 2012 Google Inc. All rights reserved.
  * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
  * Copyright (C) 2015, 2016 Ericsson AB. All rights reserved.
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -488,7 +488,7 @@
             return Exception { InvalidModificationError, "Certificates parameters are different" };
 
         for (auto& certificate : configuration.certificates) {
-            bool isThere = m_configuration.certificates.findMatching([&certificate](const auto& item) {
+            bool isThere = m_configuration.certificates.findIf([&certificate](const auto& item) {
                 return item.get() == certificate.get();
             }) != notFound;
             if (!isThere)
@@ -959,7 +959,7 @@
 
 Ref<RTCIceTransport> RTCPeerConnection::getOrCreateIceTransport(UniqueRef<RTCIceTransportBackend>&& backend)
 {
-    auto index = m_iceTransports.findMatching([&backend](auto& transport) { return backend.get() == transport->backend(); });
+    auto index = m_iceTransports.findIf([&backend](auto& transport) { return backend.get() == transport->backend(); });
     if (index == notFound) {
         index = m_iceTransports.size();
         m_iceTransports.append(RTCIceTransport::create(*scriptExecutionContext(), WTFMove(backend), *this));
@@ -978,7 +978,7 @@
     if (!context)
         return nullptr;
 
-    auto index = m_dtlsTransports.findMatching([&backend](auto& transport) { return *backend == transport->backend(); });
+    auto index = m_dtlsTransports.findIf([&backend](auto& transport) { return *backend == transport->backend(); });
     if (index == notFound) {
         index = m_dtlsTransports.size();
         auto iceTransportBackend = backend->iceTransportBackend();
diff --git a/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransformer.cpp b/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransformer.cpp
index 390c77e..cb3f7cd 100644
--- a/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransformer.cpp
+++ b/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransformer.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2020-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -246,7 +246,7 @@
     m_counter = header->counter;
 
     if (header->keyId != m_keyId) {
-        auto position = m_keys.findMatching([keyId = header->keyId](auto& item) { return item.keyId == keyId; });
+        auto position = m_keys.findIf([keyId = header->keyId](auto& item) { return item.keyId == keyId; });
         if (position == notFound)
             return makeUnexpected(ErrorInformation { Error::KeyID,  "Key ID is unknown"_s, header->keyId });
         auto result = updateEncryptionKey(m_keys[position].keyData, header->keyId, ShouldUpdateKeys::No);
diff --git a/Source/WebCore/Modules/webaudio/AudioNode.cpp b/Source/WebCore/Modules/webaudio/AudioNode.cpp
index 3aee466..1045061 100644
--- a/Source/WebCore/Modules/webaudio/AudioNode.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioNode.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010, Google Inc. All rights reserved.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -483,7 +484,7 @@
 {
     ASSERT(context().isAudioThread() && context().isGraphOwner());
 
-    ASSERT(m_inputs.findMatching([&](auto& associatedInput) { return associatedInput.get() == input; }) != notFound);
+    ASSERT(m_inputs.findIf([&](auto& associatedInput) { return associatedInput.get() == input; }) != notFound);
     input->updateInternalBus();
 }
 
diff --git a/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp b/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
index 9742978..e59aa7e 100644
--- a/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
+++ b/Source/WebCore/Modules/webaudio/AudioParamTimeline.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -218,7 +219,7 @@
     Locker locker { m_eventsLock };
 
     // Find the first event at or just past cancelTime.
-    size_t i = m_events.findMatching([&](auto& event) {
+    size_t i = m_events.findIf([&](auto& event) {
         return event.time() > cancelTime;
     });
     i = (i == notFound) ? m_events.size() : i;
diff --git a/Source/WebCore/Modules/webaudio/IIRFilterNode.cpp b/Source/WebCore/Modules/webaudio/IIRFilterNode.cpp
index 0ed6e61..840aecd 100644
--- a/Source/WebCore/Modules/webaudio/IIRFilterNode.cpp
+++ b/Source/WebCore/Modules/webaudio/IIRFilterNode.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright 2016 The Chromium Authors. All rights reserved.
- * Copyright (C) 2020, Apple Inc. All rights reserved.
+ * Copyright (C) 2020-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -87,7 +87,7 @@
     if (!options.feedforward.size() || options.feedforward.size() > IIRFilter::maxOrder)
         return Exception { NotSupportedError, "feedforward array must have a length between 1 and 20"_s };
 
-    auto nonZeroValueIndex = options.feedforward.findMatching([](auto& value) { return !!value; });
+    auto nonZeroValueIndex = options.feedforward.findIf([](auto& value) { return !!value; });
     if (nonZeroValueIndex == notFound)
         return Exception { InvalidStateError, "feedforward array must contain a non-zero value"_s };
 
diff --git a/Source/WebCore/Modules/webauthn/fido/U2fCommandConstructor.cpp b/Source/WebCore/Modules/webauthn/fido/U2fCommandConstructor.cpp
index 64ded2c..ef72c69 100644
--- a/Source/WebCore/Modules/webauthn/fido/U2fCommandConstructor.cpp
+++ b/Source/WebCore/Modules/webauthn/fido/U2fCommandConstructor.cpp
@@ -1,5 +1,5 @@
 // Copyright 2018 The Chromium Authors. All rights reserved.
-// Copyright (C) 2019-2021 Apple Inc. All rights reserved.
+// Copyright (C) 2019-2022 Apple Inc. All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
@@ -87,7 +87,7 @@
 {
     if (request.authenticatorSelection && (request.authenticatorSelection->userVerification == UserVerificationRequirement::Required || request.authenticatorSelection->requireResidentKey))
         return false;
-    if (request.pubKeyCredParams.findMatching([](auto& item) { return item.alg == COSE::ES256; }) == notFound)
+    if (request.pubKeyCredParams.findIf([](auto& item) { return item.alg == COSE::ES256; }) == notFound)
         return false;
     return true;
 }
diff --git a/Source/WebCore/Modules/webxr/WebXRInputSourceArray.cpp b/Source/WebCore/Modules/webxr/WebXRInputSourceArray.cpp
index 10f6082..af3cefd 100644
--- a/Source/WebCore/Modules/webxr/WebXRInputSourceArray.cpp
+++ b/Source/WebCore/Modules/webxr/WebXRInputSourceArray.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2020 Igalia S.L. All rights reserved.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -142,7 +143,7 @@
         return;
 
     for (auto& inputSource : inputSources) {
-        auto index = m_inputSources.findMatching([&inputSource](auto& item) { return item->handle() == inputSource.handle; });
+        auto index = m_inputSources.findIf([&inputSource](auto& item) { return item->handle() == inputSource.handle; });
         if (index == notFound) {
             // When new XR input sources become available for XRSession session, the user agent MUST run the following steps:
             // 1. If session's promise resolved flag is not set, abort these steps.
diff --git a/Source/WebCore/Modules/webxr/WebXRSession.cpp b/Source/WebCore/Modules/webxr/WebXRSession.cpp
index 3760e4d..e567fc1 100644
--- a/Source/WebCore/Modules/webxr/WebXRSession.cpp
+++ b/Source/WebCore/Modules/webxr/WebXRSession.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2020 Igalia S.L. All rights reserved.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -279,7 +280,7 @@
     //    currently running animation frame callbacks that is associated with the value handle.
     // 3. If there is such an entry, set its cancelled boolean to true and remove it from
     //    session's list of animation frame callbacks.
-    size_t position = m_callbacks.findMatching([callbackId] (auto& item) {
+    size_t position = m_callbacks.findIf([callbackId] (auto& item) {
         return item->callbackId() == callbackId;
     });
 
diff --git a/Source/WebCore/Modules/webxr/WebXRSystem.cpp b/Source/WebCore/Modules/webxr/WebXRSystem.cpp
index 78f4450..ddd42b0 100644
--- a/Source/WebCore/Modules/webxr/WebXRSystem.cpp
+++ b/Source/WebCore/Modules/webxr/WebXRSystem.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2020 Igalia S.L. All rights reserved.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -116,7 +117,7 @@
             return;
         }
 
-        if (m_activeImmersiveSession && oldDevice && immersiveXRDevices.findMatching([&](auto& entry) { return entry.ptr() == oldDevice; }) != notFound)
+        if (m_activeImmersiveSession && oldDevice && immersiveXRDevices.findIf([&](auto& entry) { return entry.ptr() == oldDevice; }) != notFound)
             ASSERT(m_activeImmersiveDevice.get() == oldDevice);
         else {
             // FIXME: implement a better UA selection mechanism if required.
diff --git a/Source/WebCore/accessibility/AXObjectCache.cpp b/Source/WebCore/accessibility/AXObjectCache.cpp
index 46278bb..124cd9e 100644
--- a/Source/WebCore/accessibility/AXObjectCache.cpp
+++ b/Source/WebCore/accessibility/AXObjectCache.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2008-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -3280,7 +3280,7 @@
 template<typename T, typename F>
 static bool appendIfNotContainsMatching(Vector<T>& vector, const T& value, F matches)
 {
-    if (vector.findMatching(matches) != notFound)
+    if (vector.findIf(matches) != notFound)
         return false;
     vector.append(value);
     return true;
diff --git a/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp b/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp
index bf41298..7e14a74 100644
--- a/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp
+++ b/Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2021 Igalia S.L.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -240,7 +241,7 @@
 
     const char* needle[4] = { interface, name, detail, nullptr };
     for (const auto& listeners : m_eventListeners.values()) {
-        auto result = listeners.findMatching([&](const GUniquePtr<char*>& event) {
+        auto result = listeners.findIf([&](const GUniquePtr<char*>& event) {
             return eventIsSubtype(const_cast<char**>(needle), event.get());
         });
         if (result != notFound)
diff --git a/Source/WebCore/dom/DataTransfer.cpp b/Source/WebCore/dom/DataTransfer.cpp
index 1deac4f..86ab889 100644
--- a/Source/WebCore/dom/DataTransfer.cpp
+++ b/Source/WebCore/dom/DataTransfer.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -324,7 +324,7 @@
     }
 
     auto safeTypes = m_pasteboard->typesSafeForBindings(m_originIdentifier);
-    bool hasFileBackedItem = m_itemList && m_itemList->hasItems() && notFound != m_itemList->items().findMatching([] (const auto& item) {
+    bool hasFileBackedItem = m_itemList && m_itemList->hasItems() && notFound != m_itemList->items().findIf([] (const auto& item) {
         return item->isFile();
     });
 
diff --git a/Source/WebCore/dom/DataTransferItemList.cpp b/Source/WebCore/dom/DataTransferItemList.cpp
index a25b90c..c45cf92 100644
--- a/Source/WebCore/dom/DataTransferItemList.cpp
+++ b/Source/WebCore/dom/DataTransferItemList.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -155,7 +155,7 @@
 
 static void removeStringItemOfLowercasedType(Vector<Ref<DataTransferItem>>& items, const String& lowercasedType)
 {
-    auto index = items.findMatching([lowercasedType](auto& item) {
+    auto index = items.findIf([lowercasedType](auto& item) {
         return !item->isFile() && item->type() == lowercasedType;
     });
     if (index == notFound)
diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp
index 5b8b390..b91242d 100644
--- a/Source/WebCore/dom/Document.cpp
+++ b/Source/WebCore/dom/Document.cpp
@@ -3,7 +3,7 @@
  *           (C) 1999 Antti Koivisto (koivisto@kde.org)
  *           (C) 2001 Dirk Mueller (mueller@kde.org)
  *           (C) 2006 Alexey Proskuryakov (ap@webkit.org)
- * Copyright (C) 2004-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2004-2022 Apple Inc. All rights reserved.
  * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
  * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved.
  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
@@ -4283,7 +4283,7 @@
         m_pendingScrollEventTargetList = makeUnique<PendingScrollEventTargetList>();
 
     auto& targets = m_pendingScrollEventTargetList->targets;
-    if (targets.findMatching([&] (auto& entry) { return entry.ptr() == &target; }) != notFound)
+    if (targets.findIf([&] (auto& entry) { return entry.ptr() == &target; }) != notFound)
         return;
 
     if (targets.isEmpty())
@@ -8033,7 +8033,7 @@
             continue;
         for (auto& target : observer->observationTargets()) {
             auto& targetRegistrations = target->intersectionObserverDataIfExists()->registrations;
-            auto index = targetRegistrations.findMatching([observer](auto& registration) {
+            auto index = targetRegistrations.findIf([observer](auto& registration) {
                 return registration.observer.get() == observer;
             });
             ASSERT(index != notFound);
diff --git a/Source/WebCore/dom/EventPath.cpp b/Source/WebCore/dom/EventPath.cpp
index 9fde9f7..46fb645 100644
--- a/Source/WebCore/dom/EventPath.cpp
+++ b/Source/WebCore/dom/EventPath.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2013 Google Inc. All rights reserved.
- * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2022 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -241,7 +241,7 @@
     RELEASE_ASSERT(pathSize);
     path.reserveInitialCapacity(pathSize);
 
-    auto currentTargetIndex = m_path.findMatching([&target] (auto& context) {
+    auto currentTargetIndex = m_path.findIf([&target] (auto& context) {
         return context.currentTarget() == &target;
     });
     RELEASE_ASSERT(currentTargetIndex != notFound);
diff --git a/Source/WebCore/dom/MutationObserver.cpp b/Source/WebCore/dom/MutationObserver.cpp
index 66c58bd..d9802fe 100644
--- a/Source/WebCore/dom/MutationObserver.cpp
+++ b/Source/WebCore/dom/MutationObserver.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2011 Google Inc. All rights reserved.
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -158,7 +158,7 @@
     ASSERT(isMainThread());
     Ref eventLoop = slot.document().windowEventLoop();
     auto& list = eventLoop->signalSlotList();
-    ASSERT(list.findMatching([&slot](auto& entry) { return entry.ptr() == &slot; }) == notFound);
+    ASSERT(list.findIf([&slot](auto& entry) { return entry.ptr() == &slot; }) == notFound);
     list.append(slot);
 
     eventLoop->queueMutationObserverCompoundMicrotask();
diff --git a/Source/WebCore/html/BaseTextInputType.cpp b/Source/WebCore/html/BaseTextInputType.cpp
index 9578b51..8c4b14a 100644
--- a/Source/WebCore/html/BaseTextInputType.cpp
+++ b/Source/WebCore/html/BaseTextInputType.cpp
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com>
  * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2022 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -54,7 +54,7 @@
 
     if (isEmailField() && element()->multiple()) {
         auto values = value.split(',');
-        return values.findMatching(valuePatternMismatch) != notFound;
+        return values.findIf(valuePatternMismatch) != notFound;
     }
     return valuePatternMismatch(value);
 }
diff --git a/Source/WebCore/html/HTMLVideoElement.cpp b/Source/WebCore/html/HTMLVideoElement.cpp
index 077ca5d..5711b9e 100644
--- a/Source/WebCore/html/HTMLVideoElement.cpp
+++ b/Source/WebCore/html/HTMLVideoElement.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -604,13 +604,13 @@
 void HTMLVideoElement::cancelVideoFrameCallback(unsigned identifier)
 {
     // Search first the requests currently being serviced, and mark them as cancelled if found.
-    auto index = m_servicedVideoFrameRequests.findMatching([identifier](auto& request) { return request->identifier == identifier; });
+    auto index = m_servicedVideoFrameRequests.findIf([identifier](auto& request) { return request->identifier == identifier; });
     if (index != notFound) {
         m_servicedVideoFrameRequests[index]->cancelled = true;
         return;
     }
 
-    index = m_videoFrameRequests.findMatching([identifier](auto& request) { return request->identifier == identifier; });
+    index = m_videoFrameRequests.findIf([identifier](auto& request) { return request->identifier == identifier; });
     if (index == notFound)
         return;
     m_videoFrameRequests.remove(index);
diff --git a/Source/WebCore/html/shadow/DateTimeEditElement.cpp b/Source/WebCore/html/shadow/DateTimeEditElement.cpp
index 08dc137..d7dfa73 100644
--- a/Source/WebCore/html/shadow/DateTimeEditElement.cpp
+++ b/Source/WebCore/html/shadow/DateTimeEditElement.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2012 Google Inc. All rights reserved.
- * Copyright (C) 2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2020-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -215,7 +215,7 @@
 
 size_t DateTimeEditElement::fieldIndexOf(const DateTimeFieldElement& fieldToFind) const
 {
-    return m_fields.findMatching([&] (auto& field) {
+    return m_fields.findIf([&] (auto& field) {
         return field.ptr() == &fieldToFind;
     });
 }
@@ -223,7 +223,7 @@
 DateTimeFieldElement* DateTimeEditElement::focusedFieldElement() const
 {
     auto* focusedElement = document().focusedElement();
-    auto fieldIndex = m_fields.findMatching([&] (auto& field) {
+    auto fieldIndex = m_fields.findIf([&] (auto& field) {
         return field.ptr() == focusedElement;
     });
 
@@ -289,7 +289,7 @@
         return;
 
     if (auto* newFocusedElement = event.relatedTarget()) {
-        bool didFocusSiblingField = notFound != m_fields.findMatching([&] (auto& field) {
+        bool didFocusSiblingField = notFound != m_fields.findIf([&] (auto& field) {
             return field.ptr() == newFocusedElement;
         });
 
diff --git a/Source/WebCore/html/track/InbandDataTextTrack.cpp b/Source/WebCore/html/track/InbandDataTextTrack.cpp
index fa78f3b..b3cc957 100644
--- a/Source/WebCore/html/track/InbandDataTextTrack.cpp
+++ b/Source/WebCore/html/track/InbandDataTextTrack.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 Cable Television Labs Inc.  All rights reserved.
- * Copyright (C) 2014-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -83,7 +83,7 @@
 
 RefPtr<DataCue> InbandDataTextTrack::findIncompleteCue(const SerializedPlatformDataCue& cueToFind)
 {
-    auto index = m_incompleteCueMap.findMatching([&](const auto& cue) {
+    auto index = m_incompleteCueMap.findIf([&](const auto& cue) {
         return cueToFind.isEqual(*cue->platformValue());
     });
 
diff --git a/Source/WebCore/inspector/InspectorCanvas.cpp b/Source/WebCore/inspector/InspectorCanvas.cpp
index e847fe6..3d31815 100644
--- a/Source/WebCore/inspector/InspectorCanvas.cpp
+++ b/Source/WebCore/inspector/InspectorCanvas.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc.  All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -1032,7 +1032,7 @@
 
 int InspectorCanvas::indexForData(DuplicateDataVariant data)
 {
-    size_t index = m_indexedDuplicateData.findMatching([&] (auto item) {
+    size_t index = m_indexedDuplicateData.findIf([&] (auto item) {
         if (data == item)
             return true;
 
diff --git a/Source/WebCore/inspector/agents/WebDebuggerAgent.cpp b/Source/WebCore/inspector/agents/WebDebuggerAgent.cpp
index b41b1ab..37a3169 100644
--- a/Source/WebCore/inspector/agents/WebDebuggerAgent.cpp
+++ b/Source/WebCore/inspector/agents/WebDebuggerAgent.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -69,7 +69,7 @@
         return;
 
     auto& eventListeners = target.eventListeners(eventType);
-    auto position = eventListeners.findMatching([&](auto& registeredListener) {
+    auto position = eventListeners.findIf([&](auto& registeredListener) {
         return &registeredListener->callback() == &listener && registeredListener->useCapture() == capture;
     });
     if (position == notFound)
@@ -92,7 +92,7 @@
 void WebDebuggerAgent::willRemoveEventListener(EventTarget& target, const AtomString& eventType, EventListener& listener, bool capture)
 {
     auto& eventListeners = target.eventListeners(eventType);
-    size_t listenerIndex = eventListeners.findMatching([&](auto& registeredListener) {
+    size_t listenerIndex = eventListeners.findIf([&](auto& registeredListener) {
         return &registeredListener->callback() == &listener && registeredListener->useCapture() == capture;
     });
 
diff --git a/Source/WebCore/layout/floats/FloatingState.cpp b/Source/WebCore/layout/floats/FloatingState.cpp
index 64fdf93..144eebd 100644
--- a/Source/WebCore/layout/floats/FloatingState.cpp
+++ b/Source/WebCore/layout/floats/FloatingState.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -65,7 +65,7 @@
         return m_floats.append(floatItem);
 
     // The integration codepath does not construct a layout box for the float item.
-    ASSERT_IMPLIES(floatItem.floatBox(), m_floats.findMatching([&] (auto& entry) {
+    ASSERT_IMPLIES(floatItem.floatBox(), m_floats.findIf([&] (auto& entry) {
         return entry.floatBox() == floatItem.floatBox();
     }) == notFound);
 
diff --git a/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp b/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
index baa14b6..f541ce2 100644
--- a/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
+++ b/Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2020-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -205,7 +205,7 @@
         return m_root;
 
     if (m_boxes.size() <= smallTreeThreshold) {
-        auto index = m_boxes.findMatching([&](auto& entry) {
+        auto index = m_boxes.findIf([&](auto& entry) {
             return entry.renderer == &renderer;
         });
         RELEASE_ASSERT(index != notFound);
@@ -226,7 +226,7 @@
         return m_flow;
 
     if (m_boxes.size() <= smallTreeThreshold) {
-        auto index = m_boxes.findMatching([&](auto& entry) {
+        auto index = m_boxes.findIf([&](auto& entry) {
             return entry.box.ptr() == &box;
         });
         RELEASE_ASSERT(index != notFound);
diff --git a/Source/WebCore/loader/DocumentLoader.cpp b/Source/WebCore/loader/DocumentLoader.cpp
index 2670371..30124b0 100644
--- a/Source/WebCore/loader/DocumentLoader.cpp
+++ b/Source/WebCore/loader/DocumentLoader.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2022 Apple Inc. All rights reserved.
  * Copyright (C) 2011 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -2271,7 +2271,7 @@
 
     m_linkIcons = LinkIconCollector { *document }.iconsOfTypes({ LinkIconType::Favicon, LinkIconType::TouchIcon, LinkIconType::TouchPrecomposedIcon });
 
-    auto findResult = m_linkIcons.findMatching([](auto& icon) { return icon.type == LinkIconType::Favicon; });
+    auto findResult = m_linkIcons.findIf([](auto& icon) { return icon.type == LinkIconType::Favicon; });
     if (findResult == notFound)
         m_linkIcons.append({ document->completeURL("/favicon.ico"_s), LinkIconType::Favicon, String(), std::nullopt, { } });
 
diff --git a/Source/WebCore/page/IntersectionObserver.cpp b/Source/WebCore/page/IntersectionObserver.cpp
index e3f8c4f..5a27417 100644
--- a/Source/WebCore/page/IntersectionObserver.cpp
+++ b/Source/WebCore/page/IntersectionObserver.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -156,7 +156,7 @@
 
 bool IntersectionObserver::isObserving(const Element& element) const
 {
-    return m_observationTargets.findMatching([&](auto& target) {
+    return m_observationTargets.findIf([&](auto& target) {
         return target.get() == &element;
     }) != notFound;
 }
diff --git a/Source/WebCore/page/ModalContainerObserver.cpp b/Source/WebCore/page/ModalContainerObserver.cpp
index bb0f27f..daf43d7 100644
--- a/Source/WebCore/page/ModalContainerObserver.cpp
+++ b/Source/WebCore/page/ModalContainerObserver.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2021-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -515,13 +515,13 @@
                     case ModalContainerDecision::HideAndIgnore:
                         break;
                     case ModalContainerDecision::HideAndAllow:
-                        if (auto index = positive.findMatching(matchNonNull); index != notFound)
+                        if (auto index = positive.findIf(matchNonNull); index != notFound)
                             return positive[index].get();
-                        if (auto index = neutral.findMatching(matchNonNull); index != notFound)
+                        if (auto index = neutral.findIf(matchNonNull); index != notFound)
                             return neutral[index].get();
                         break;
                     case ModalContainerDecision::HideAndDisallow:
-                        if (auto index = negative.findMatching(matchNonNull); index != notFound)
+                        if (auto index = negative.findIf(matchNonNull); index != notFound)
                             return negative[index].get();
                         break;
                     }
diff --git a/Source/WebCore/page/ResizeObserver.cpp b/Source/WebCore/page/ResizeObserver.cpp
index 91b0d975..93da1a4 100644
--- a/Source/WebCore/page/ResizeObserver.cpp
+++ b/Source/WebCore/page/ResizeObserver.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2019 Igalia S.L.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -59,7 +60,7 @@
     if (!m_callback)
         return;
 
-    auto position = m_observations.findMatching([&](auto& observation) {
+    auto position = m_observations.findIf([&](auto& observation) {
         return observation->target() == &target;
     });
 
diff --git a/Source/WebCore/page/scrolling/ScrollLatchingController.cpp b/Source/WebCore/page/scrolling/ScrollLatchingController.cpp
index 4b74bf4..e58a23f 100644
--- a/Source/WebCore/page/scrolling/ScrollLatchingController.cpp
+++ b/Source/WebCore/page/scrolling/ScrollLatchingController.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2020-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -158,7 +158,7 @@
     if (m_frameStateStack.isEmpty())
         return;
 
-    auto findResult = m_frameStateStack.findMatching([&element] (const auto& state) {
+    auto findResult = m_frameStateStack.findIf([&element] (const auto& state) {
         auto* wheelElement = state.wheelEventElement.get();
         return wheelElement && element.isEqualNode(wheelElement);
     });
diff --git a/Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.cpp b/Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.cpp
index 68c5763..6311133 100644
--- a/Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.cpp
+++ b/Source/WebCore/page/scrolling/ScrollSnapOffsetsInfo.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014-2015 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2022 Apple Inc. All rights reserved.
  * Copyright (C) 2020 Igalia S.L.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -113,7 +113,7 @@
     auto scrollDestinationInOtherAxis = componentForAxis<UnitType, PointType>(destinationOffsetPoint, otherAxis);
     auto viewportLengthInOtherAxis = axis == ScrollEventAxis::Horizontal ? viewportSize.height() : viewportSize.width();
 
-    return snapOffset.snapAreaIndices.findMatching([&] (auto index) {
+    return snapOffset.snapAreaIndices.findIf([&] (auto index) {
         const auto& snapArea = info.snapAreas[index];
         auto [otherAxisMin, otherAxisMax] = rangeForAxis<UnitType>(snapArea, otherAxis);
         return (scrollDestinationInOtherAxis + viewportLengthInOtherAxis) > otherAxisMin && scrollDestinationInOtherAxis < otherAxisMax;
diff --git a/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp b/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
index 5de0b4b..0189775 100644
--- a/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
+++ b/Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -57,7 +57,7 @@
 {
     RELEASE_ASSERT(m_scrollingTree.inCommitTreeState());
 
-    size_t index = m_children.findMatching([&](auto& child) {
+    size_t index = m_children.findIf([&](auto& child) {
         return &node == child.ptr();
     });
 
diff --git a/Source/WebCore/platform/MIMETypeRegistry.cpp b/Source/WebCore/platform/MIMETypeRegistry.cpp
index 110e0fa..dbddc5b 100644
--- a/Source/WebCore/platform/MIMETypeRegistry.cpp
+++ b/Source/WebCore/platform/MIMETypeRegistry.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2006-2022 Apple Inc. All rights reserved.
  * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
  *
  * Redistribution and use in source and binary forms, with or without
@@ -783,7 +783,7 @@
 {
     auto allowedMIMETypes = MIMETypeRegistry::allowedMIMETypes(mimeTypes, extensions);
 
-    auto position = allowedMIMETypes.findMatching([](const auto& mimeType) {
+    auto position = allowedMIMETypes.findIf([](const auto& mimeType) {
         return MIMETypeRegistry::isSupportedImageMIMETypeForEncoding(mimeType);
     });
     
diff --git a/Source/WebCore/platform/PasteboardCustomData.cpp b/Source/WebCore/platform/PasteboardCustomData.cpp
index 9d3f87a..12b8a52 100644
--- a/Source/WebCore/platform/PasteboardCustomData.cpp
+++ b/Source/WebCore/platform/PasteboardCustomData.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2019-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -146,7 +146,7 @@
 
 PasteboardCustomData::Entry& PasteboardCustomData::addOrMoveEntryToEnd(const String& type)
 {
-    auto index = m_data.findMatching([&] (auto& entry) {
+    auto index = m_data.findIf([&] (auto& entry) {
         return entry.type == type;
     });
     auto entry = index == notFound ? Entry(type) : m_data[index];
@@ -189,7 +189,7 @@
 
 bool PasteboardCustomData::hasSameOriginCustomData() const
 {
-    return notFound != m_data.findMatching([&] (auto& entry) {
+    return notFound != m_data.findIf([&] (auto& entry) {
         return !entry.customData.isNull();
     });
 }
diff --git a/Source/WebCore/platform/cocoa/PasteboardCocoa.mm b/Source/WebCore/platform/cocoa/PasteboardCocoa.mm
index b817081..06961fb 100644
--- a/Source/WebCore/platform/cocoa/PasteboardCocoa.mm
+++ b/Source/WebCore/platform/cocoa/PasteboardCocoa.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -149,7 +149,7 @@
         if (!items)
             return FileContentState::NoFileOrImageData;
 
-        mayContainFilePaths = items->size() != 1 || notFound != items->findMatching([] (auto& item) {
+        mayContainFilePaths = items->size() != 1 || notFound != items->findIf([] (auto& item) {
             return item.canBeTreatedAsAttachmentOrFile() || item.isNonTextType || item.containsFileURLAndFileUploadContent;
         });
     }
@@ -158,10 +158,10 @@
     if (!mayContainFilePaths) {
         Vector<String> cocoaTypes;
         platformStrategies()->pasteboardStrategy()->getTypes(cocoaTypes, m_pasteboardName, context());
-        if (cocoaTypes.findMatching([](const String& cocoaType) { return shouldTreatCocoaTypeAsFile(cocoaType); }) == notFound)
+        if (cocoaTypes.findIf([](const String& cocoaType) { return shouldTreatCocoaTypeAsFile(cocoaType); }) == notFound)
             return FileContentState::NoFileOrImageData;
 
-        auto indexOfURL = cocoaTypes.findMatching([](auto& cocoaType) {
+        auto indexOfURL = cocoaTypes.findIf([](auto& cocoaType) {
 #if PLATFORM(MAC)
             if (cocoaType == String(legacyURLPasteboardType()))
                 return true;
diff --git a/Source/WebCore/platform/encryptedmedia/CDMProxy.cpp b/Source/WebCore/platform/encryptedmedia/CDMProxy.cpp
index 9c70555..0ddccfa 100644
--- a/Source/WebCore/platform/encryptedmedia/CDMProxy.cpp
+++ b/Source/WebCore/platform/encryptedmedia/CDMProxy.cpp
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2020 Metrological Group B.V.
  * Copyright (C) 2020 Igalia S.L.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -109,7 +110,7 @@
 
 bool KeyStore::containsKeyID(const KeyIDType& keyID) const
 {
-    return m_keys.findMatching([&](const RefPtr<KeyHandle>& storedKey) {
+    return m_keys.findIf([&](const RefPtr<KeyHandle>& storedKey) {
         return *storedKey == keyID;
     }) != notFound;
 }
@@ -149,7 +150,7 @@
 bool KeyStore::add(RefPtr<KeyHandle>&& key)
 {
     bool didStoreChange = false;
-    size_t keyWithMatchingKeyIDIndex = m_keys.findMatching([&] (const RefPtr<KeyHandle>& storedKey) {
+    size_t keyWithMatchingKeyIDIndex = m_keys.findIf([&] (const RefPtr<KeyHandle>& storedKey) {
         return *key == *storedKey;
     });
 
diff --git a/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp b/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp
index 95c27b3..32b62de 100644
--- a/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp
+++ b/Source/WebCore/platform/graphics/DisplayRefreshMonitorManager.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -119,7 +119,7 @@
 
 size_t DisplayRefreshMonitorManager::findMonitorForDisplayID(PlatformDisplayID displayID) const
 {
-    return m_monitors.findMatching([&](auto& monitorWrapper) {
+    return m_monitors.findIf([&](auto& monitorWrapper) {
         return monitorWrapper.monitor->displayID() == displayID;
     });
 }
diff --git a/Source/WebCore/platform/graphics/HEVCUtilities.cpp b/Source/WebCore/platform/graphics/HEVCUtilities.cpp
index 0b41537..c20b065 100644
--- a/Source/WebCore/platform/graphics/HEVCUtilities.cpp
+++ b/Source/WebCore/platform/graphics/HEVCUtilities.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -220,7 +220,7 @@
     // general_progressive_source_flag, each encoded as a hexadecimal number, and the encoding
     // of each byte separated by a period; trailing bytes that are zero may be omitted.
     StringBuilder compatibilityFlags;
-    auto lastFlagByte = parameters.generalConstraintIndicatorFlags.reverseFindMatching([] (auto& flag) { return flag; });
+    auto lastFlagByte = parameters.generalConstraintIndicatorFlags.reverseFindIf([] (auto& flag) { return flag; });
     for (size_t i = 0; lastFlagByte != notFound && i <= lastFlagByte; ++i) {
         compatibilityFlags.append('.');
         compatibilityFlags.append(hex(parameters.generalConstraintIndicatorFlags[i], 2));
diff --git a/Source/WebCore/platform/graphics/MediaPlayer.cpp b/Source/WebCore/platform/graphics/MediaPlayer.cpp
index 3fcae8c..ec18ba3 100644
--- a/Source/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/Source/WebCore/platform/graphics/MediaPlayer.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2007-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -332,7 +332,7 @@
 const MediaPlayerFactory* MediaPlayer::mediaEngine(MediaPlayerEnums::MediaEngineIdentifier identifier)
 {
     auto& engines = installedMediaEngines();
-    auto currentIndex = engines.findMatching([identifier] (auto& engine) {
+    auto currentIndex = engines.findIf([identifier] (auto& engine) {
         return engine->identifier() == identifier;
     });
 
@@ -393,7 +393,7 @@
     if (!current) 
         return engines.first().get();
 
-    auto currentIndex = engines.findMatching([current] (auto& engine) {
+    auto currentIndex = engines.findIf([current] (auto& engine) {
         return engine.get() == current;
     });
     if (currentIndex == notFound) {
diff --git a/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm b/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm
index ef1583d..cfe048a 100644
--- a/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm
+++ b/Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -585,7 +585,7 @@
 
         auto sessionKeys = sessionInterface->keyIDs();
         if (anyOf(sessionKeys, [&](const Ref<FragmentedSharedBuffer>& sessionKey) {
-            return keyIDs.findMatching([&](const Ref<FragmentedSharedBuffer>& keyID) {
+            return keyIDs.findIf([&](const Ref<FragmentedSharedBuffer>& keyID) {
                 return keyID.get() == sessionKey.get();
             }) != notFound;
         }))
@@ -596,7 +596,7 @@
 
 CDMInstanceSessionFairPlayStreamingAVFObjC* CDMInstanceFairPlayStreamingAVFObjC::sessionForRequest(AVContentKeyRequest* request) const
 {
-    auto index = m_sessions.findMatching([&] (auto session) {
+    auto index = m_sessions.findIf([&] (auto session) {
         return session && session->hasRequest(request);
     });
 
@@ -608,7 +608,7 @@
 
 CDMInstanceSessionFairPlayStreamingAVFObjC* CDMInstanceFairPlayStreamingAVFObjC::sessionForGroup(AVContentKeyReportGroup* group) const
 {
-    auto index = m_sessions.findMatching([group] (auto session) {
+    auto index = m_sessions.findIf([group] (auto session) {
         return session && session->contentKeyReportGroup() == group;
     });
 
@@ -853,9 +853,9 @@
                 return false;
 
             auto keyID = SharedBuffer::create(WTFMove(*keyIDVector));
-            auto foundIndex = m_currentRequest.value().requests.findMatching([&] (auto& request) {
+            auto foundIndex = m_currentRequest.value().requests.findIf([&] (auto& request) {
                 auto keyIDs = keyIDsForRequest(request.get());
-                return keyIDs.findMatching([&](const Ref<FragmentedSharedBuffer>& id) {
+                return keyIDs.findIf([&](const Ref<FragmentedSharedBuffer>& id) {
                     return id.get() == keyID.get();
                 }) != notFound;
             });
diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index fd9fafe..f9d1ac7 100644
--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -1079,7 +1079,7 @@
 
 bool GraphicsLayerCA::animationIsRunning(const String& animationName) const
 {
-    auto index = m_animations.findMatching([&](LayerPropertyAnimation animation) {
+    auto index = m_animations.findIf([&](LayerPropertyAnimation animation) {
         return animation.m_name == animationName;
     });
     return index != notFound && m_animations[index].m_playState == PlayState::Playing;
@@ -1206,7 +1206,7 @@
 {
     LOG_WITH_STREAM(Animations, stream << "GraphicsLayerCA " << this << " id " << primaryLayerID() << " platformCALayerAnimationStarted " << animationKey);
 
-    auto index = m_animations.findMatching([&](LayerPropertyAnimation animation) {
+    auto index = m_animations.findIf([&](LayerPropertyAnimation animation) {
         return animation.animationIdentifier() == animationKey && !animation.m_beginTime;
     });
 
@@ -3303,7 +3303,7 @@
 
 bool GraphicsLayerCA::isRunningTransformAnimation() const
 {
-    return m_animations.findMatching([&](LayerPropertyAnimation animation) {
+    return m_animations.findIf([&](LayerPropertyAnimation animation) {
         return animatedPropertyIsTransformOrRelated(animation.m_property) && (animation.m_playState == PlayState::Playing || animation.m_playState == PlayState::Paused);
     }) != notFound;
 }
diff --git a/Source/WebCore/platform/graphics/coretext/FontCoreText.cpp b/Source/WebCore/platform/graphics/coretext/FontCoreText.cpp
index 36dd70c..0bc0a37 100644
--- a/Source/WebCore/platform/graphics/coretext/FontCoreText.cpp
+++ b/Source/WebCore/platform/graphics/coretext/FontCoreText.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2005-2022 Apple Inc. All rights reserved.
  * Copyright (C) 2006 Alexey Proskuryakov
  *
  * Redistribution and use in source and binary forms, with or without
@@ -847,7 +847,7 @@
     Vector<CGRect> boundingRects;
     boundingRects.fill(CGRectZero, glyphs.size());
     CTFontGetBoundingRectsForGlyphs(platformFont, kCTFontOrientationDefault, glyphs.begin(), boundingRects.begin(), glyphs.size());
-    return notFound == boundingRects.findMatching([](auto& rect) {
+    return notFound == boundingRects.findIf([](auto& rect) {
         return !CGRectIsEmpty(rect);
     });
 }
diff --git a/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp b/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
index 9bb9008..050d0db 100644
--- a/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
+++ b/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
@@ -140,7 +140,7 @@
         return false;
     }
 
-    auto index = configs.findMatching([&](EGLConfig value) {
+    auto index = configs.findIf([&](EGLConfig value) {
         EGLint redSize, greenSize, blueSize, alphaSize;
         eglGetConfigAttrib(display, value, EGL_RED_SIZE, &redSize);
         eglGetConfigAttrib(display, value, EGL_GREEN_SIZE, &greenSize);
diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
index c6a3f29..8317ccd 100644
--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp
@@ -561,14 +561,14 @@
     for (const auto& item : codecs) {
         auto codec = item.convertToASCIILowercase();
         bool requiresHardwareSupport = contentTypesRequiringHardwareSupport
-            .findMatching([containerType, codec](auto& hardwareContentType) -> bool {
+            .findIf([containerType, codec](auto& hardwareContentType) -> bool {
             auto hardwareContainer = hardwareContentType.containerType();
             if (!hardwareContainer.isEmpty()
                 && fnmatch(hardwareContainer.utf8().data(), containerType.utf8().data(), 0))
                 return false;
             auto hardwareCodecs = hardwareContentType.codecs();
             return hardwareCodecs.isEmpty()
-                || hardwareCodecs.findMatching([codec](auto& hardwareCodec) -> bool {
+                || hardwareCodecs.findIf([codec](auto& hardwareCodec) -> bool {
                     return !fnmatch(hardwareCodec.utf8().data(), codec.utf8().data(), 0);
             }) != notFound;
         }) != notFound;
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
index f905c9d..ea5aaa0 100644
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
@@ -1,6 +1,6 @@
 /*
  Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
- Copyright (C) 2010 Apple Inc. All rights reserved.
+ Copyright (C) 2010-2022 Apple Inc. All rights reserved.
  Copyright (C) 2012 Company 100, Inc.
  Copyright (C) 2012 Intel Corporation. All rights reserved.
  Copyright (C) 2017 Sony Interactive Entertainment Inc.
@@ -1359,7 +1359,7 @@
     bool isInvisibleBecauseOpacityZero = !opacity() && !m_animations.hasActiveAnimationsOfType(AnimatedPropertyOpacity);
 
     // Check if there's a filter that sets the opacity to zero.
-    bool hasOpacityZeroFilter = notFound != filters().operations().findMatching([&](const auto& operation) {
+    bool hasOpacityZeroFilter = notFound != filters().operations().findIf([&](const auto& operation) {
         return operation->type() == FilterOperation::OperationType::OPACITY && !downcast<BasicComponentTransferFilterOperation>(*operation).amount();
     });
 
diff --git a/Source/WebCore/platform/gtk/PasteboardGtk.cpp b/Source/WebCore/platform/gtk/PasteboardGtk.cpp
index 7907229..1f5ca3b 100644
--- a/Source/WebCore/platform/gtk/PasteboardGtk.cpp
+++ b/Source/WebCore/platform/gtk/PasteboardGtk.cpp
@@ -455,7 +455,7 @@
             return FileContentState::MayContainFilePaths;
     }
 
-    auto result = types.findMatching([](const String& type) {
+    auto result = types.findIf([](const String& type) {
         return MIMETypeRegistry::isSupportedImageMIMEType(type);
     });
     return result == notFound ? FileContentState::NoFileOrImageData : FileContentState::MayContainFilePaths;
diff --git a/Source/WebCore/platform/mediastream/CaptureDevice.h b/Source/WebCore/platform/mediastream/CaptureDevice.h
index 15c3541..ed1a371 100644
--- a/Source/WebCore/platform/mediastream/CaptureDevice.h
+++ b/Source/WebCore/platform/mediastream/CaptureDevice.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -154,7 +154,7 @@
         if (newDevice.type() != CaptureDevice::DeviceType::Camera && newDevice.type() != CaptureDevice::DeviceType::Microphone)
             continue;
 
-        auto index = oldDevices.findMatching([&newDevice](auto& oldDevice) {
+        auto index = oldDevices.findIf([&newDevice](auto& oldDevice) {
             return newDevice.persistentId() == oldDevice.persistentId() && newDevice.enabled() != oldDevice.enabled();
         });
 
diff --git a/Source/WebCore/platform/mediastream/MediaConstraints.h b/Source/WebCore/platform/mediastream/MediaConstraints.h
index ba028f4..ab7d493 100644
--- a/Source/WebCore/platform/mediastream/MediaConstraints.h
+++ b/Source/WebCore/platform/mediastream/MediaConstraints.h
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2012 Google Inc. All rights reserved.
- * Copyright (C) 2016-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -305,7 +305,7 @@
         }
 
         if (m_min) {
-            auto index = discreteCapabilityValues.findMatching([&](ValueType value) { return m_min.value() >= value; });
+            auto index = discreteCapabilityValues.findIf([&](ValueType value) { return m_min.value() >= value; });
             if (index != notFound) {
                 min = value = discreteCapabilityValues[index];
 
diff --git a/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp b/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp
index f37293b..0708ec7 100644
--- a/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp
+++ b/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp
@@ -400,7 +400,7 @@
     auto* priv = element->priv;
 
     // Lookup the corresponding InternalSource and take it from the storage.
-    auto index = priv->sources.findMatching([&](auto& item) {
+    auto index = priv->sources.findIf([&](auto& item) {
         return item->track().id() == track.id();
     });
     std::unique_ptr<InternalSource> source = WTFMove(priv->sources[index]);
diff --git a/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm b/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
index 2ddd7c7..6e743e5 100644
--- a/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
+++ b/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2013-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -619,7 +619,7 @@
 
         CMVideoDimensions dimensions = PAL::CMVideoFormatDescriptionGetDimensions(format.formatDescription);
         IntSize size = { dimensions.width, dimensions.height };
-        auto index = presets.findMatching([&size](auto& preset) {
+        auto index = presets.findIf([&size](auto& preset) {
             return size == preset->size;
         });
         if (index != notFound)
diff --git a/Source/WebCore/platform/network/HTTPHeaderMap.cpp b/Source/WebCore/platform/network/HTTPHeaderMap.cpp
index 39cb560..d80c5bd 100644
--- a/Source/WebCore/platform/network/HTTPHeaderMap.cpp
+++ b/Source/WebCore/platform/network/HTTPHeaderMap.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -60,7 +61,7 @@
 
 String HTTPHeaderMap::getUncommonHeader(const String& name) const
 {
-    auto index = m_uncommonHeaders.findMatching([&](auto& header) {
+    auto index = m_uncommonHeaders.findIf([&](auto& header) {
         return equalIgnoringASCIICase(header.key, name);
     });
     return index != notFound ? m_uncommonHeaders[index].value : String();
@@ -100,7 +101,7 @@
 
 void HTTPHeaderMap::setUncommonHeader(const String& name, const String& value)
 {
-    auto index = m_uncommonHeaders.findMatching([&](auto& header) {
+    auto index = m_uncommonHeaders.findIf([&](auto& header) {
         return equalIgnoringASCIICase(header.key, name);
     });
     if (index == notFound)
@@ -116,7 +117,7 @@
         add(headerName, value);
         return;
     }
-    auto index = m_uncommonHeaders.findMatching([&](auto& header) {
+    auto index = m_uncommonHeaders.findIf([&](auto& header) {
         return equalIgnoringASCIICase(header.key, name);
     });
     if (index == notFound)
@@ -151,7 +152,7 @@
     if (findHTTPHeaderName(name, headerName))
         return contains(headerName);
 
-    return m_uncommonHeaders.findMatching([&](auto& header) {
+    return m_uncommonHeaders.findIf([&](auto& header) {
         return equalIgnoringASCIICase(header.key, name);
     }) != notFound;
 }
@@ -169,7 +170,7 @@
 
 String HTTPHeaderMap::get(HTTPHeaderName name) const
 {
-    auto index = m_commonHeaders.findMatching([&](auto& header) {
+    auto index = m_commonHeaders.findIf([&](auto& header) {
         return header.key == name;
     });
     return index != notFound ? m_commonHeaders[index].value : String();
@@ -177,7 +178,7 @@
 
 void HTTPHeaderMap::set(HTTPHeaderName name, const String& value)
 {
-    auto index = m_commonHeaders.findMatching([&](auto& header) {
+    auto index = m_commonHeaders.findIf([&](auto& header) {
         return header.key == name;
     });
     if (index == notFound)
@@ -188,7 +189,7 @@
 
 bool HTTPHeaderMap::contains(HTTPHeaderName name) const
 {
-    return m_commonHeaders.findMatching([&](auto& header) {
+    return m_commonHeaders.findIf([&](auto& header) {
         return header.key == name;
     }) != notFound;
 }
@@ -202,7 +203,7 @@
 
 void HTTPHeaderMap::add(HTTPHeaderName name, const String& value)
 {
-    auto index = m_commonHeaders.findMatching([&](auto& header) {
+    auto index = m_commonHeaders.findIf([&](auto& header) {
         return header.key == name;
     });
     if (index != notFound)
diff --git a/Source/WebCore/platform/xr/openxr/OpenXRExtensions.cpp b/Source/WebCore/platform/xr/openxr/OpenXRExtensions.cpp
index da535ea..dfe1570 100644
--- a/Source/WebCore/platform/xr/openxr/OpenXRExtensions.cpp
+++ b/Source/WebCore/platform/xr/openxr/OpenXRExtensions.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2021 Igalia, S.L.
+ * Copyright (C) 2022 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -64,7 +65,7 @@
 
 bool OpenXRExtensions::isExtensionSupported(const char* name) const
 {
-    auto position = m_extensions.findMatching([name](auto& property) {
+    auto position = m_extensions.findIf([name](auto& property) {
         return !strcmp(property.extensionName, name);
     });
     return position != notFound;
diff --git a/Source/WebCore/plugins/PluginData.h b/Source/WebCore/plugins/PluginData.h
index b7f399e..4f1f81f 100644
--- a/Source/WebCore/plugins/PluginData.h
+++ b/Source/WebCore/plugins/PluginData.h
@@ -1,6 +1,6 @@
 /*
     Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
-    Copyright (C) 2015-2020 Apple Inc. All rights reserved.
+    Copyright (C) 2015-2022 Apple Inc. All rights reserved.
 
     This library is free software; you can redistribute it and/or
     modify it under the terms of the GNU Library General Public
@@ -131,7 +131,7 @@
 
 inline bool isSupportedPlugin(const Vector<SupportedPluginIdentifier>& pluginIdentifiers, const URL& pageURL, const String& pluginIdentifier)
 {
-    return pluginIdentifiers.findMatching([&] (auto&& plugin) {
+    return pluginIdentifiers.findIf([&] (auto&& plugin) {
         return pageURL.isMatchingDomain(plugin.matchingDomain) && plugin.pluginIdentifier == pluginIdentifier;
     }) != notFound;
 }
diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog
index a5f6956..b72a59e 100644
--- a/Source/WebKit/ChangeLog
+++ b/Source/WebKit/ChangeLog
@@ -1,3 +1,62 @@
+2022-01-24  Mark Lam  <mark.lam@apple.com>
+
+        Rename Vector and FixedVector::findMatching to findIf to match stl naming.
+        https://bugs.webkit.org/show_bug.cgi?id=234864
+        rdar://87424746
+
+        Reviewed by Yusuke Suzuki.
+
+        * GPUProcess/media/RemoteCDMFactoryProxy.cpp:
+        (WebKit::factoryForKeySystem):
+        * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+        (WebKit::NetworkConnectionToWebProcess::findRootNetworkActivity):
+        (WebKit::NetworkConnectionToWebProcess::findNetworkActivityTracker):
+        * NetworkProcess/cache/CacheStorageEngineCache.cpp:
+        (WebKit::CacheStorage::Cache::storeRecords):
+        (WebKit::CacheStorage::Cache::put):
+        (WebKit::CacheStorage::Cache::remove):
+        (WebKit::CacheStorage::Cache::removeFromRecordList):
+        (WebKit::CacheStorage::Cache::updateRecordToDisk):
+        * NetworkProcess/cache/CacheStorageEngineCaches.cpp:
+        (WebKit::CacheStorage::Caches::find):
+        (WebKit::CacheStorage::Caches::remove):
+        (WebKit::CacheStorage::Caches::hasActiveCache const):
+        (WebKit::CacheStorage::Caches::dispose):
+        * Shared/mac/MediaFormatReader/MediaFormatReader.cpp:
+        (WebKit::MediaFormatReader::didProvideMediaData):
+        * UIProcess/API/glib/WebKitWebView.cpp:
+        (webkit_web_view_remove_frame_displayed_callback):
+        * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
+        (WebKit::WebPasteboardProxy::PasteboardAccessInformation::grantAccess):
+        (WebKit::WebPasteboardProxy::PasteboardAccessInformation::accessType const):
+        * UIProcess/UserMediaPermissionRequestProxy.cpp:
+        (WebKit::setDeviceAsFirst):
+        * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
+        (WebKit::LocalAuthenticator::makeCredential):
+        (WebKit::LocalAuthenticator::getAssertion):
+        (WebKit::LocalAuthenticator::deleteDuplicateCredential const):
+        * UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp:
+        (WebKit::CtapAuthenticator::continueGetNextAssertionAfterResponseReceived):
+        * UIProcess/ios/DragDropInteractionState.mm:
+        (WebKit::DragDropInteractionState::defaultDropPreview const):
+        (WebKit::BlockPtr<void):
+        * UIProcess/mac/DisplayLink.cpp:
+        (WebKit::DisplayLink::setPreferredFramesPerSecond):
+        * UIProcess/mac/WebContextMenuProxyMac.mm:
+        (WebKit::WebContextMenuProxyMac::getContextMenuFromItems):
+        * UIProcess/mac/WebDataListSuggestionsDropdownMac.mm:
+        (shouldShowDividersBetweenCells):
+        * WebProcess/Automation/WebAutomationSessionProxy.cpp:
+        (WebKit::WebAutomationSessionProxy::computeElementLayout):
+        * WebProcess/UserContent/WebUserContentController.cpp:
+        (WebKit::WebUserContentController::addUserScriptMessageHandlerInternal):
+        (WebKit::WebUserContentController::addUserScriptInternal):
+        (WebKit::WebUserContentController::addUserStyleSheetInternal):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::requestTextRecognition):
+        * WebProcess/WebProcess.cpp:
+        (WebKit::checkDocumentsCaptureStateConsistency):
+
 2022-01-24  Alex Christensen  <achristensen@webkit.org>
 
         Re-enable CustomDisplayName and DefaultDisplayName API tests on Monterey
diff --git a/Source/WebKit/GPUProcess/media/RemoteCDMFactoryProxy.cpp b/Source/WebKit/GPUProcess/media/RemoteCDMFactoryProxy.cpp
index 48983c0..aef28c6 100644
--- a/Source/WebKit/GPUProcess/media/RemoteCDMFactoryProxy.cpp
+++ b/Source/WebKit/GPUProcess/media/RemoteCDMFactoryProxy.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2020-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -50,7 +50,7 @@
 static CDMFactory* factoryForKeySystem(const String& keySystem)
 {
     auto& factories = CDMFactory::registeredFactories();
-    auto foundIndex = factories.findMatching([&] (auto& factory) { return factory->supportsKeySystem(keySystem); });
+    auto foundIndex = factories.findIf([&] (auto& factory) { return factory->supportsKeySystem(keySystem); });
     if (foundIndex == notFound)
         return nullptr;
     return factories[foundIndex];
diff --git a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
index 5ceb397..f5b7db1 100644
--- a/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
+++ b/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2012-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -1172,14 +1172,14 @@
 
 size_t NetworkConnectionToWebProcess::findRootNetworkActivity(PageIdentifier pageID)
 {
-    return m_networkActivityTrackers.findMatching([&](const auto& item) {
+    return m_networkActivityTrackers.findIf([&](const auto& item) {
         return item.isRootActivity && item.pageID == pageID;
     });
 }
 
 size_t NetworkConnectionToWebProcess::findNetworkActivityTracker(WebCore::ResourceLoaderIdentifier resourceID)
 {
-    return m_networkActivityTrackers.findMatching([&](const auto& item) {
+    return m_networkActivityTrackers.findIf([&](const auto& item) {
         return item.resourceID == resourceID;
     });
 }
diff --git a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp
index 6f26b4c..c856719 100644
--- a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp
+++ b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc.  All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -411,7 +411,7 @@
         auto* sameURLRecords = recordsFromURL(record.request.url());
         auto matchingRecords = queryCache(sameURLRecords, record.request, options);
 
-        auto position = !matchingRecords.isEmpty() ? sameURLRecords->findMatching([&](const auto& item) { return item.identifier == matchingRecords[0]; }) : notFound;
+        auto position = !matchingRecords.isEmpty() ? sameURLRecords->findIf([&](const auto& item) { return item.identifier == matchingRecords[0]; }) : notFound;
 
         if (position == notFound) {
             record.identifier = ++m_nextRecordIdentifier;
@@ -438,7 +438,7 @@
         auto* sameURLRecords = recordsFromURL(record.request.url());
         auto matchingRecords = queryCache(sameURLRecords, record.request, options);
 
-        auto position = (sameURLRecords && !matchingRecords.isEmpty()) ? sameURLRecords->findMatching([&](const auto& item) { return item.identifier == matchingRecords[0]; }) : notFound;
+        auto position = (sameURLRecords && !matchingRecords.isEmpty()) ? sameURLRecords->findIf([&](const auto& item) { return item.identifier == matchingRecords[0]; }) : notFound;
 
         spaceRequired += record.responseBodySize;
         if (position != notFound) {
@@ -479,7 +479,7 @@
     }
 
     records->removeAllMatching([this, &recordIdentifiers](auto& item) {
-        bool shouldRemove = recordIdentifiers.findMatching([&item](auto identifier) { return identifier == item.identifier; }) != notFound;
+        bool shouldRemove = recordIdentifiers.findIf([&item](auto identifier) { return identifier == item.identifier; }) != notFound;
         if (shouldRemove)
             this->removeRecordFromDisk(item);
         return shouldRemove;
@@ -499,7 +499,7 @@
     for (auto& records : m_records.values()) {
         auto* cache = this;
         records.removeAllMatching([cache, &recordIdentifiers](const auto& item) {
-            return notFound != recordIdentifiers.findMatching([cache, &item](const auto& identifier) {
+            return notFound != recordIdentifiers.findIf([cache, &item](const auto& identifier) {
                 if (item.identifier != identifier)
                     return false;
                 cache->removeRecordFromDisk(item);
@@ -532,7 +532,7 @@
         if (!sameURLRecords)
             return;
 
-        auto position = sameURLRecords->findMatching([&] (const auto& item) { return item.identifier == recordIdentifier; });
+        auto position = sameURLRecords->findIf([&] (const auto& item) { return item.identifier == recordIdentifier; });
         if (position == notFound)
             return;
         auto& recordInfo = sameURLRecords->at(position);
diff --git a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
index e5ec04e..5666078 100644
--- a/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
+++ b/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc.  All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -279,17 +279,17 @@
 
 Cache* Caches::find(const String& name)
 {
-    auto position = m_caches.findMatching([&](const auto& item) { return item.name() == name; });
+    auto position = m_caches.findIf([&](const auto& item) { return item.name() == name; });
     return (position != notFound) ? &m_caches[position] : nullptr;
 }
 
 Cache* Caches::find(uint64_t identifier)
 {
-    auto position = m_caches.findMatching([&](const auto& item) { return item.identifier() == identifier; });
+    auto position = m_caches.findIf([&](const auto& item) { return item.identifier() == identifier; });
     if (position != notFound)
         return &m_caches[position];
 
-    position = m_removedCaches.findMatching([&](const auto& item) { return item.identifier() == identifier; });
+    position = m_removedCaches.findIf([&](const auto& item) { return item.identifier() == identifier; });
     return (position != notFound) ? &m_removedCaches[position] : nullptr;
 }
 
@@ -346,10 +346,10 @@
         return;
     }
 
-    auto position = m_caches.findMatching([&](const auto& item) { return item.identifier() == identifier; });
+    auto position = m_caches.findIf([&](const auto& item) { return item.identifier() == identifier; });
 
     if (position == notFound) {
-        ASSERT(m_removedCaches.findMatching([&](const auto& item) { return item.identifier() == identifier; }) != notFound);
+        ASSERT(m_removedCaches.findIf([&](const auto& item) { return item.identifier() == identifier; }) != notFound);
         callback(CacheIdentifierOperationResult { 0, false });
         return;
     }
@@ -368,12 +368,12 @@
 {
     if (m_removedCaches.size())
         return true;
-    return m_caches.findMatching([](const auto& item) { return item.isActive(); }) != notFound;
+    return m_caches.findIf([](const auto& item) { return item.isActive(); }) != notFound;
 }
 
 void Caches::dispose(Cache& cache)
 {
-    auto position = m_removedCaches.findMatching([&](const auto& item) { return item.identifier() == cache.identifier(); });
+    auto position = m_removedCaches.findIf([&](const auto& item) { return item.identifier() == cache.identifier(); });
     if (position != notFound) {
         if (m_storage)
             m_storage->remove(cache.keys(), [] { });
@@ -381,7 +381,7 @@
         m_removedCaches.remove(position);
         return;
     }
-    ASSERT(m_caches.findMatching([&](const auto& item) { return item.identifier() == cache.identifier(); }) != notFound);
+    ASSERT(m_caches.findIf([&](const auto& item) { return item.identifier() == cache.identifier(); }) != notFound);
 
     // We cannot clear the memory representation in ephemeral sessions since we would loose all data.
     if (!shouldPersist())
diff --git a/Source/WebKit/Shared/mac/MediaFormatReader/MediaFormatReader.cpp b/Source/WebKit/Shared/mac/MediaFormatReader/MediaFormatReader.cpp
index 6c19bc9..774ccf3 100644
--- a/Source/WebKit/Shared/mac/MediaFormatReader/MediaFormatReader.cpp
+++ b/Source/WebKit/Shared/mac/MediaFormatReader/MediaFormatReader.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2020-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -229,7 +229,7 @@
     ASSERT(!isMainRunLoop());
 
     Locker locker { m_parseTracksLock };
-    auto trackIndex = m_trackReaders.findMatching([&](auto& track) {
+    auto trackIndex = m_trackReaders.findIf([&](auto& track) {
         return track->trackID() == trackID;
     });
 
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
index 4e5d732..10a109f 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
@@ -4630,7 +4630,7 @@
     };
 
     if (webView->priv->inFrameDisplayed) {
-        auto index = webView->priv->frameDisplayedCallbacks.findMatching(matchFunction);
+        auto index = webView->priv->frameDisplayedCallbacks.findIf(matchFunction);
         if (index != notFound)
             webView->priv->frameDisplayedCallbacksToRemove.add(id);
     } else
diff --git a/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm b/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
index 1f350c4..3b4675e 100644
--- a/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
+++ b/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -681,7 +681,7 @@
 
 void WebPasteboardProxy::PasteboardAccessInformation::grantAccess(WebProcessProxy& process, PasteboardAccessType type)
 {
-    auto matchIndex = processes.findMatching([&](auto& processAndType) {
+    auto matchIndex = processes.findIf([&](auto& processAndType) {
         return processAndType.first == &process;
     });
 
@@ -707,7 +707,7 @@
 
 std::optional<WebPasteboardProxy::PasteboardAccessType> WebPasteboardProxy::PasteboardAccessInformation::accessType(WebProcessProxy& process) const
 {
-    auto matchIndex = processes.findMatching([&](auto& processAndType) {
+    auto matchIndex = processes.findIf([&](auto& processAndType) {
         return processAndType.first == &process;
     });
 
diff --git a/Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.cpp b/Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.cpp
index 75bbdc1..f3bf4a7 100644
--- a/Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.cpp
+++ b/Source/WebKit/UIProcess/UserMediaPermissionRequestProxy.cpp
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2014 Igalia S.L.
- * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2022 Apple Inc. All rights reserved.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -48,7 +48,7 @@
 #if ENABLE(MEDIA_STREAM)
 static inline void setDeviceAsFirst(Vector<CaptureDevice>& devices, const String& deviceID)
 {
-    size_t index = devices.findMatching([&deviceID](const auto& device) {
+    size_t index = devices.findIf([&deviceID](const auto& device) {
         return device.persistentId() == deviceID;
     });
     ASSERT(index != notFound);
diff --git a/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm b/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm
index 1d9eaeb..46d0003 100644
--- a/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm
+++ b/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -205,7 +205,7 @@
     // Step 8 is implicitly captured by all UnknownError exception receiveResponds.
     // Skip Step 10 as counter is constantly 0.
     // Step 2.
-    if (notFound == creationOptions.pubKeyCredParams.findMatching([] (auto& pubKeyCredParam) {
+    if (notFound == creationOptions.pubKeyCredParams.findIf([] (auto& pubKeyCredParam) {
         return pubKeyCredParam.type == PublicKeyCredentialType::PublicKey && pubKeyCredParam.alg == COSE::ES256;
     })) {
         receiveException({ NotSupportedError, "The platform attached authenticator doesn't support any provided PublicKeyCredentialParameters."_s });
@@ -222,7 +222,7 @@
 
     auto excludeCredentialIds = produceHashSet(creationOptions.excludeCredentials);
     if (!excludeCredentialIds.isEmpty()) {
-        if (notFound != m_existingCredentials.findMatching([&excludeCredentialIds] (auto& credential) {
+        if (notFound != m_existingCredentials.findIf([&excludeCredentialIds] (auto& credential) {
             auto* rawId = credential->rawId();
             ASSERT(rawId);
             return excludeCredentialIds.contains(base64EncodeToString(rawId->data(), rawId->byteLength()));
@@ -529,7 +529,7 @@
             if (!weakThis)
                 return;
 
-            auto result = m_existingCredentials.findMatching([expectedResponse = response] (auto& response) {
+            auto result = m_existingCredentials.findIf([expectedResponse = response] (auto& response) {
                 return response.ptr() == expectedResponse;
             });
             if (result == notFound)
@@ -686,7 +686,7 @@
     using namespace LocalAuthenticatorInternal;
 
     auto& creationOptions = std::get<PublicKeyCredentialCreationOptions>(requestData().options);
-    m_existingCredentials.findMatching([creationOptions] (auto& credential) {
+    m_existingCredentials.findIf([creationOptions] (auto& credential) {
         auto* userHandle = credential->userHandle();
         ASSERT(userHandle);
         if (userHandle->byteLength() != creationOptions.user.id.length())
diff --git a/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp b/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp
index 3c9140b..3305534 100644
--- a/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp
+++ b/Source/WebKit/UIProcess/WebAuthentication/fido/CtapAuthenticator.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -217,7 +217,7 @@
                 ASSERT(RunLoop::isMain());
                 if (!weakThis)
                     return;
-                auto result = m_assertionResponses.findMatching([expectedResponse = response] (auto& response) {
+                auto result = m_assertionResponses.findIf([expectedResponse = response] (auto& response) {
                     return response.ptr() == expectedResponse;
                 });
                 if (result == notFound)
diff --git a/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm b/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm
index 25f2654..fe86c6f 100644
--- a/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm
+++ b/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -198,7 +198,7 @@
 
 UITargetedDragPreview *DragDropInteractionState::defaultDropPreview(UIDragItem *item) const
 {
-    auto matchIndex = m_defaultDropPreviews.findMatching([&] (auto& itemAndPreview) {
+    auto matchIndex = m_defaultDropPreviews.findIf([&] (auto& itemAndPreview) {
         return itemAndPreview.item == item;
     });
     return matchIndex == notFound ? nil : m_defaultDropPreviews[matchIndex].preview.get();
@@ -206,7 +206,7 @@
 
 BlockPtr<void(UITargetedDragPreview *)> DragDropInteractionState::dropPreviewProvider(UIDragItem *item)
 {
-    auto matchIndex = m_delayedItemPreviewProviders.findMatching([&] (auto& itemAndProvider) {
+    auto matchIndex = m_delayedItemPreviewProviders.findIf([&] (auto& itemAndProvider) {
         return itemAndProvider.item == item;
     });
 
diff --git a/Source/WebKit/UIProcess/mac/DisplayLink.cpp b/Source/WebKit/UIProcess/mac/DisplayLink.cpp
index 3848fb1..14df44c 100644
--- a/Source/WebKit/UIProcess/mac/DisplayLink.cpp
+++ b/Source/WebKit/UIProcess/mac/DisplayLink.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -195,7 +195,7 @@
         return;
 
     auto& connectionInfo = it->value;
-    auto index = connectionInfo.observers.findMatching([observerID](const auto& observer) {
+    auto index = connectionInfo.observers.findIf([observerID](const auto& observer) {
         return observer.observerID == observerID;
     });
 
diff --git a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
index d59fcb1..e1f02a7 100644
--- a/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
+++ b/Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -520,7 +520,7 @@
     std::optional<WebContextMenuItemData> quickLookItemToInsertIfNeeded;
 
 #if ENABLE(IMAGE_ANALYSIS)
-    auto indexOfQuickLookItem = filteredItems.findMatching([&] (auto& item) {
+    auto indexOfQuickLookItem = filteredItems.findIf([&] (auto& item) {
         return item.action() == WebCore::ContextMenuItemTagQuickLookImage;
     });
 
diff --git a/Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm b/Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm
index e2bb59f..dd75afb 100644
--- a/Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm
+++ b/Source/WebKit/UIProcess/mac/WebDataListSuggestionsDropdownMac.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -307,7 +307,7 @@
 
 static BOOL shouldShowDividersBetweenCells(const Vector<WebCore::DataListSuggestion>& suggestions)
 {
-    return notFound != suggestions.findMatching([](auto& suggestion) {
+    return notFound != suggestions.findIf([](auto& suggestion) {
         return !suggestion.label.isEmpty();
     });
 }
diff --git a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp
index afdce3e..25081bb 100644
--- a/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp
+++ b/Source/WebKit/WebProcess/Automation/WebAutomationSessionProxy.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -699,7 +699,7 @@
 
     auto elementInViewCenterPoint = visiblePortionOfElementRect.center();
     auto elementList = containerElement->treeScope().elementsFromPoint(elementInViewCenterPoint);
-    auto index = elementList.findMatching([containerElement] (auto& item) { return item.get() == containerElement; });
+    auto index = elementList.findIf([containerElement] (auto& item) { return item.get() == containerElement; });
     if (elementList.isEmpty() || index == notFound) {
         // We hit this case if the element is visibility:hidden or opacity:0, in which case it will not hit test
         // at the calculated IVCP. An element is technically not "in view" if it is not within its own paint/hit test tree,
diff --git a/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp b/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp
index 638bd84..4ba9901 100644
--- a/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp
+++ b/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -356,7 +356,7 @@
 void WebUserContentController::addUserScriptMessageHandlerInternal(InjectedBundleScriptWorld& world, uint64_t userScriptMessageHandlerIdentifier, const String& name)
 {
     auto& messageHandlersInWorld = m_userMessageHandlers.ensure(&world, [] { return Vector<std::pair<uint64_t, RefPtr<WebUserMessageHandlerDescriptorProxy>>> { }; }).iterator->value;
-    if (messageHandlersInWorld.findMatching([&](auto& pair) { return pair.first ==  userScriptMessageHandlerIdentifier; }) != notFound)
+    if (messageHandlersInWorld.findIf([&](auto& pair) { return pair.first ==  userScriptMessageHandlerIdentifier; }) != notFound)
         return;
     messageHandlersInWorld.append(std::make_pair(userScriptMessageHandlerIdentifier, WebUserMessageHandlerDescriptorProxy::create(this, name, world, userScriptMessageHandlerIdentifier)));
 }
@@ -426,7 +426,7 @@
     }
 
     auto& scriptsInWorld = m_userScripts.ensure(&world, [] { return Vector<std::pair<std::optional<uint64_t>, WebCore::UserScript>>(); }).iterator->value;
-    if (userScriptIdentifier && scriptsInWorld.findMatching([&](auto& pair) { return pair.first == userScriptIdentifier; }) != notFound)
+    if (userScriptIdentifier && scriptsInWorld.findIf([&](auto& pair) { return pair.first == userScriptIdentifier; }) != notFound)
         return;
 
     scriptsInWorld.append(std::make_pair(userScriptIdentifier, WTFMove(userScript)));
@@ -475,7 +475,7 @@
 void WebUserContentController::addUserStyleSheetInternal(InjectedBundleScriptWorld& world, const std::optional<uint64_t>& userStyleSheetIdentifier, UserStyleSheet&& userStyleSheet)
 {
     auto& styleSheetsInWorld = m_userStyleSheets.ensure(&world, [] { return Vector<std::pair<std::optional<uint64_t>, WebCore::UserStyleSheet>>(); }).iterator->value;
-    if (userStyleSheetIdentifier && styleSheetsInWorld.findMatching([&](auto& pair) { return pair.first == userStyleSheetIdentifier; }) != notFound)
+    if (userStyleSheetIdentifier && styleSheetsInWorld.findIf([&](auto& pair) { return pair.first == userStyleSheetIdentifier; }) != notFound)
         return;
 
     if (auto pageID = userStyleSheet.pageID()) {
diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
index 6a0ec8f..ba2d3fa 100644
--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2022 Apple Inc. All rights reserved.
  * Copyright (C) 2012 Intel Corporation. All rights reserved.
  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
  *
@@ -7523,7 +7523,7 @@
         return;
     }
 
-    auto matchIndex = m_elementsPendingTextRecognition.findMatching([&] (auto& elementAndCompletionHandlers) {
+    auto matchIndex = m_elementsPendingTextRecognition.findIf([&] (auto& elementAndCompletionHandlers) {
         return elementAndCompletionHandlers.first == &element;
     });
 
@@ -7585,7 +7585,7 @@
         auto& htmlElement = downcast<HTMLElement>(*protectedElement);
         ImageOverlay::updateWithTextRecognitionResult(htmlElement, result);
 
-        auto matchIndex = protectedPage->m_elementsPendingTextRecognition.findMatching([&] (auto& elementAndCompletionHandlers) {
+        auto matchIndex = protectedPage->m_elementsPendingTextRecognition.findIf([&] (auto& elementAndCompletionHandlers) {
             return elementAndCompletionHandlers.first == &htmlElement;
         });
 
diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp
index 68970ed..ee1434b 100644
--- a/Source/WebKit/WebProcess/WebProcess.cpp
+++ b/Source/WebKit/WebProcess/WebProcess.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2009-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -1983,9 +1983,9 @@
     });
 
     if (isCapturingAudio)
-        ASSERT(extensionIDs.findMatching([](auto& id) { return id.contains("microphone"); }) == notFound);
+        ASSERT(extensionIDs.findIf([](auto& id) { return id.contains("microphone"); }) == notFound);
     if (isCapturingVideo)
-        ASSERT(extensionIDs.findMatching([](auto& id) { return id.contains("camera"); }) == notFound);
+        ASSERT(extensionIDs.findIf([](auto& id) { return id.contains("camera"); }) == notFound);
 #endif // ASSERT_ENABLED
 }
 
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 9477ec6..40a58de 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,20 @@
+2022-01-24  Mark Lam  <mark.lam@apple.com>
+
+        Rename Vector and FixedVector::findMatching to findIf to match stl naming.
+        https://bugs.webkit.org/show_bug.cgi?id=234864
+        rdar://87424746
+
+        Reviewed by Yusuke Suzuki.
+
+        * TestWebKitAPI/Tests/WTF/FixedVector.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WTF/Vector.cpp:
+        (TestWebKitAPI::TEST):
+        * TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm:
+        (TestWebKitAPI::parseUserAgent):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::closeOtherPage):
+
 2022-01-24  Alex Christensen  <achristensen@webkit.org>
 
         Re-enable CustomDisplayName and DefaultDisplayName API tests on Monterey
diff --git a/Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp b/Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp
index cfaba87..25cdf37 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp
@@ -157,19 +157,19 @@
     EXPECT_EQ(2U, vec2[2]);
 }
 
-TEST(WTF_FixedVector, FindMatching)
+TEST(WTF_FixedVector, FindIf)
 {
     FixedVector<int> v;
-    EXPECT_TRUE(v.findMatching([](int) { return false; }) == notFound);
-    EXPECT_TRUE(v.findMatching([](int) { return true; }) == notFound);
+    EXPECT_TRUE(v.findIf([](int) { return false; }) == notFound);
+    EXPECT_TRUE(v.findIf([](int) { return true; }) == notFound);
 
     v = { 3, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 3 };
-    EXPECT_TRUE(v.findMatching([](int value) { return value > 3; }) == notFound);
-    EXPECT_TRUE(v.findMatching([](int) { return false; }) == notFound);
-    EXPECT_EQ(0U, v.findMatching([](int) { return true; }));
-    EXPECT_EQ(0U, v.findMatching([](int value) { return value <= 3; }));
-    EXPECT_EQ(1U, v.findMatching([](int value) { return value < 3; }));
-    EXPECT_EQ(2U, v.findMatching([](int value) { return value == 2; }));
+    EXPECT_TRUE(v.findIf([](int value) { return value > 3; }) == notFound);
+    EXPECT_TRUE(v.findIf([](int) { return false; }) == notFound);
+    EXPECT_EQ(0U, v.findIf([](int) { return true; }));
+    EXPECT_EQ(0U, v.findIf([](int value) { return value <= 3; }));
+    EXPECT_EQ(1U, v.findIf([](int value) { return value < 3; }));
+    EXPECT_EQ(2U, v.findIf([](int value) { return value == 2; }));
 }
 
 TEST(WTF_FixedVector, Move)
diff --git a/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp b/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp
index 6381e5d..5d46c3c 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/Vector.cpp
@@ -725,19 +725,19 @@
     EXPECT_TRUE(v == Vector<int>({ }));
 }
 
-TEST(WTF_Vector, FindMatching)
+TEST(WTF_Vector, FindIf)
 {
     Vector<int> v;
-    EXPECT_TRUE(v.findMatching([](int) { return false; }) == notFound);
-    EXPECT_TRUE(v.findMatching([](int) { return true; }) == notFound);
+    EXPECT_TRUE(v.findIf([](int) { return false; }) == notFound);
+    EXPECT_TRUE(v.findIf([](int) { return true; }) == notFound);
 
     v = {3, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 3};
-    EXPECT_TRUE(v.findMatching([](int value) { return value > 3; }) == notFound);
-    EXPECT_TRUE(v.findMatching([](int) { return false; }) == notFound);
-    EXPECT_EQ(0U, v.findMatching([](int) { return true; }));
-    EXPECT_EQ(0U, v.findMatching([](int value) { return value <= 3; }));
-    EXPECT_EQ(1U, v.findMatching([](int value) { return value < 3; }));
-    EXPECT_EQ(2U, v.findMatching([](int value) { return value == 2; }));
+    EXPECT_TRUE(v.findIf([](int value) { return value > 3; }) == notFound);
+    EXPECT_TRUE(v.findIf([](int) { return false; }) == notFound);
+    EXPECT_EQ(0U, v.findIf([](int) { return true; }));
+    EXPECT_EQ(0U, v.findIf([](int value) { return value <= 3; }));
+    EXPECT_EQ(1U, v.findIf([](int value) { return value < 3; }));
+    EXPECT_EQ(2U, v.findIf([](int value) { return value == 2; }));
 }
 
 TEST(WTF_Vector, RemoveFirstMatching)
diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm
index fe655fd..e9116ae 100644
--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm
+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2020-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -38,7 +38,7 @@
 static String parseUserAgent(const Vector<char>& request)
 {
     auto headers = String::fromUTF8(request.data(), request.size()).split("\r\n");
-    auto index = headers.findMatching([] (auto& header) { return header.startsWith("User-Agent:"); });
+    auto index = headers.findIf([] (auto& header) { return header.startsWith("User-Agent:"); });
     if (index != notFound)
         return headers[index];
     return emptyString();
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index b5ba4f3..d95f685 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2022 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -362,7 +362,7 @@
 void TestController::closeOtherPage(WKPageRef page, PlatformWebView* view)
 {
     WKPageClose(page);
-    auto index = m_auxiliaryWebViews.findMatching([view](auto& auxiliaryWebView) { return auxiliaryWebView.ptr() == view; });
+    auto index = m_auxiliaryWebViews.findIf([view](auto& auxiliaryWebView) { return auxiliaryWebView.ptr() == view; });
     if (index != notFound)
         m_auxiliaryWebViews.remove(index);
 }