Use WTF::Function instead of std::function in more places in WebCore/
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2017 23:42:18 +0000 (23:42 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jun 2017 23:42:18 +0000 (23:42 +0000)
commite5b93bbdabfb9b2db4038d6bf812b310c1b5e6d9
treef83993f78550a77b65c6e9ef697cab6ea9ebcb7b
parent0038210c6b35ddc6cc59b0d69f9eaed8bfb31248
Use WTF::Function instead of std::function in more places in WebCore/
https://bugs.webkit.org/show_bug.cgi?id=173583

Reviewed by Darin Adler.

Use WTF::Function instead of std::function in more places in WebCore/ to
reduce copying.

* page/Page.cpp:
* platform/HysteresisActivity.h:
(WebCore::HysteresisActivity::HysteresisActivity):
* platform/Logging.cpp:
(WebCore::registerNotifyCallback):
* platform/Logging.h:
* platform/MainThreadSharedTimer.cpp:
(WebCore::MainThreadSharedTimer::setFiredFunction):
* platform/MainThreadSharedTimer.h:
* platform/PlatformPasteboard.h:
* platform/ScopeGuard.h:
(WebCore::ScopeGuard::ScopeGuard):
(WebCore::ScopeGuard::enable):
* platform/ScrollAnimationSmooth.cpp:
(WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
* platform/ScrollAnimationSmooth.h:
* platform/SharedTimer.h:
* platform/audio/PlatformMediaSessionManager.cpp:
(WebCore::PlatformMediaSessionManager::currentSessionsMatching):
* platform/audio/PlatformMediaSessionManager.h:
* platform/cf/MainThreadSharedTimerCF.cpp:
(WebCore::setupPowerObserver):
* platform/cf/RunLoopObserver.h:
(WebCore::RunLoopObserver::RunLoopObserver):
* platform/graphics/GraphicsContext.h:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::traverse):
* platform/graphics/GraphicsLayer.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore::addMediaEngine):
* platform/graphics/MediaPlayer.h:
* platform/graphics/Path.h:
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::seekCompleted):
(WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
(WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
(WebCore::MediaPlayerPrivateAVFoundation::Notification::function):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::runWithoutAnimations):
* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::convertToFormat):
* platform/graphics/gstreamer/MainThreadNotifier.h:
* platform/graphics/gstreamer/MediaPlayerRequestInstallMissingPluginsCallback.h:
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::create):
(WebCore::MediaPlayerRequestInstallMissingPluginsCallback::MediaPlayerRequestInstallMissingPluginsCallback):
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContext::drawWithoutShadow):
(WebCore::GraphicsContext::drawWithShadow):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::ClipboardSetData::ClipboardSetData):
(WebCore::PasteboardHelper::writeClipboardContents):
* platform/gtk/PasteboardHelper.h:
* platform/gtk/PlatformPasteboardGtk.cpp:
(WebCore::PlatformPasteboard::writeToClipboard):
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
(WebVideoFullscreenInterfaceAVKit::fullscreenMayReturnToInline):
* platform/mac/PowerObserverMac.cpp:
(WebCore::PowerObserver::PowerObserver):
* platform/mac/PowerObserverMac.h:
* platform/mac/WebCoreNSURLExtras.mm:
(WebCore::isSecondLevelDomainNameAllowedByTLDRules):
* platform/mediastream/CaptureDeviceManager.cpp:
(CaptureDeviceManager::addCaptureDeviceChangedObserver):
* platform/mediastream/CaptureDeviceManager.h:
* platform/mediastream/RealtimeMediaSource.cpp:
(WebCore::RealtimeMediaSource::scheduleDeferredTask):
* platform/mediastream/RealtimeMediaSource.h:
* platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
(-[WebAVAudioSessionAvailableInputsListener initWithCallback:]):
* platform/mediastream/mac/CoreAudioCaptureSource.h:
* platform/mock/ScrollAnimatorMock.cpp:
(WebCore::ScrollAnimatorMock::ScrollAnimatorMock):
* platform/mock/ScrollAnimatorMock.h:
* platform/network/CookieStorage.h:
* platform/network/NetworkStateNotifier.cpp:
(WebCore::NetworkStateNotifier::addNetworkStateChangeListener):
* platform/network/NetworkStateNotifier.h:
* platform/network/NetworkStorageSession.cpp:
(WebCore::NetworkStorageSession::forEach):
* platform/network/NetworkStorageSession.h:
* platform/network/cf/CookieStorageCFNet.cpp:
(WebCore::cookieChangeCallbackMap):
(WebCore::startObservingCookieChanges):
* platform/network/cf/SocketStreamHandleImplCFNet.cpp:
(WebCore::callOnMainThreadAndWait):
* platform/network/mac/CookieStorageMac.mm:
(-[WebCookieStorageObjCAdapter startListeningForCookieChangeNotificationsWithCallback:]):
(WebCore::startObservingCookieChanges):
* platform/network/soup/CookieStorageSoup.cpp:
(WebCore::startObservingCookieChanges):
* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::checkTLSErrors):
* platform/network/soup/SoupNetworkSession.h:
* platform/sql/SQLiteDatabase.cpp:
(WebCore::destroyCollationFunction):
(WebCore::callCollationFunction):
(WebCore::SQLiteDatabase::setCollationFunction):
* platform/sql/SQLiteDatabase.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::traverseVisibleNonCompositedDescendantLayers):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::paintItem):
* rendering/RenderListBox.h:
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::InlineIteratorHistory::push):
(WebCore::BreakingContext::InlineIteratorHistory::update):
* workers/Worker.cpp:
(WebCore::Worker::Worker):
* workers/WorkerRunLoop.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@218615 268f45cc-cd09-0410-ab3c-d52691b4dbfc
68 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/Page.cpp
Source/WebCore/page/mac/PageMac.mm
Source/WebCore/platform/HysteresisActivity.h
Source/WebCore/platform/Logging.cpp
Source/WebCore/platform/Logging.h
Source/WebCore/platform/MainThreadSharedTimer.cpp
Source/WebCore/platform/MainThreadSharedTimer.h
Source/WebCore/platform/PlatformPasteboard.h
Source/WebCore/platform/ScopeGuard.h
Source/WebCore/platform/ScrollAnimationSmooth.cpp
Source/WebCore/platform/ScrollAnimationSmooth.h
Source/WebCore/platform/SharedTimer.h
Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp
Source/WebCore/platform/audio/PlatformMediaSessionManager.h
Source/WebCore/platform/cf/MainThreadSharedTimerCF.cpp
Source/WebCore/platform/cf/RunLoopObserver.h
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/platform/graphics/MediaPlayer.cpp
Source/WebCore/platform/graphics/MediaPlayer.h
Source/WebCore/platform/graphics/Path.h
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp
Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm
Source/WebCore/platform/graphics/cocoa/IOSurface.h
Source/WebCore/platform/graphics/cocoa/IOSurface.mm
Source/WebCore/platform/graphics/gstreamer/MainThreadNotifier.h
Source/WebCore/platform/graphics/gstreamer/MediaPlayerRequestInstallMissingPluginsCallback.h
Source/WebCore/platform/graphics/win/GraphicsContextDirect2D.cpp
Source/WebCore/platform/gtk/PasteboardHelper.cpp
Source/WebCore/platform/gtk/PasteboardHelper.h
Source/WebCore/platform/gtk/PlatformPasteboardGtk.cpp
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm
Source/WebCore/platform/mac/PowerObserverMac.cpp
Source/WebCore/platform/mac/PowerObserverMac.h
Source/WebCore/platform/mac/WebCoreNSURLExtras.mm
Source/WebCore/platform/mediastream/CaptureDeviceManager.cpp
Source/WebCore/platform/mediastream/CaptureDeviceManager.h
Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp
Source/WebCore/platform/mediastream/RealtimeMediaSource.h
Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm
Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h
Source/WebCore/platform/mock/ScrollAnimatorMock.cpp
Source/WebCore/platform/mock/ScrollAnimatorMock.h
Source/WebCore/platform/network/CookieStorage.h
Source/WebCore/platform/network/NetworkStateNotifier.cpp
Source/WebCore/platform/network/NetworkStateNotifier.h
Source/WebCore/platform/network/NetworkStorageSession.cpp
Source/WebCore/platform/network/NetworkStorageSession.h
Source/WebCore/platform/network/cf/CookieStorageCFNet.cpp
Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp
Source/WebCore/platform/network/mac/CookieStorageMac.mm
Source/WebCore/platform/network/soup/CookieStorageSoup.cpp
Source/WebCore/platform/network/soup/SoupNetworkSession.cpp
Source/WebCore/platform/network/soup/SoupNetworkSession.h
Source/WebCore/platform/sql/SQLiteDatabase.cpp
Source/WebCore/platform/sql/SQLiteDatabase.h
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderListBox.cpp
Source/WebCore/rendering/RenderListBox.h
Source/WebCore/rendering/SimpleLineLayout.cpp
Source/WebCore/rendering/line/BreakingContext.h
Source/WebCore/workers/Worker.cpp
Source/WebCore/workers/WorkerRunLoop.cpp