haikuwebkit/Source/WTF/wtf/PlatformJSCOnly.cmake

164 lines
4.0 KiB
CMake
Raw Permalink Normal View History

WTF should know about Language https://bugs.webkit.org/show_bug.cgi?id=157756 Source/JavaScriptCore: Reviewed by Geoffrey Garen. Teach our scripts that a ObjC class beginning with WTF is totally cool. * JavaScriptCore.xcodeproj/project.pbxproj: Source/WebCore: Reviewed by Geoffrey Garen. No new tests because this does not change behavior. This change is all about moving some language functionality to WTF. Quoting the WTF ChangeLog, this contains two changes: - Move everything that WebCore's logic for getting the platform user preferred language depended on into WTF. This means CFBundleSPI.h and BlockObjCExceptions.h|cpp. - Move WebCore::platformUserPreferredLanguages() to WTF::platformUserPreferredLanguages(). This is needed by https://bugs.webkit.org/show_bug.cgi?id=157755, which will make JSC use this to detect the platform user preferred language when running standalone. The changes in WebCore are mostly about rewiring #includes and #imports and removing the code that we moved to WTF. But there is one logic change: previously, platformUserPreferredLanguages() would call WebCore::languageDidChange(). It can't do that directly anymore, but WTF gives WebCore some API for registering the callback. So in Language.cpp we now register languageDidChange anytime we do something that would necessitate it, like calling platformUserPreferredLanguages(). This also registers the callback inside addLanguageChangeObserver(), since it's possible for that to be called after JSC had called platformUserPreferredLanguages() but before WebCore does so. * PlatformEfl.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformWin.cmake: * WebCore.xcodeproj/project.pbxproj: * bindings/objc/DOMCustomXPathNSResolver.mm: * editing/ios/EditorIOS.mm: * editing/mac/DictionaryLookup.mm: * editing/mac/EditorMac.mm: * page/CaptionUserPreferencesMediaAF.cpp: * page/ios/EventHandlerIOS.mm: * page/ios/FrameIOS.mm: * page/mac/ChromeMac.mm: * page/mac/EventHandlerMac.mm: * platform/Language.cpp: (WebCore::registerLanguageDidChangeCallbackIfNecessary): (WebCore::observerMap): (WebCore::addLanguageChangeObserver): (WebCore::overrideUserPreferredLanguages): (WebCore::userPreferredLanguages): * platform/Language.h: * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: * platform/graphics/cocoa/FontCocoa.mm: * platform/graphics/mac/ColorMac.mm: * platform/graphics/mac/GraphicsContext3DMac.mm: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/ios/PlatformSpeechSynthesizerIOS.mm: * platform/ios/ScrollViewIOS.mm: * platform/ios/WidgetIOS.mm: * platform/mac/BlockExceptions.h: Removed. * platform/mac/BlockExceptions.mm: Removed. * platform/mac/CursorMac.mm: * platform/mac/Language.mm: Removed. * platform/mac/ScrollAnimatorMac.mm: * platform/mac/ScrollViewMac.mm: * platform/mac/ScrollbarThemeMac.mm: * platform/mac/ThemeMac.mm: * platform/mac/WidgetMac.mm: * platform/mediastream/mac/AVVideoCaptureSource.mm: * platform/network/mac/CookieJarMac.mm: * platform/network/mac/ResourceErrorMac.mm: * platform/network/mac/ResourceHandleMac.mm: * platform/spi/cf/CFBundleSPI.h: Removed. * platform/unix/LanguageUnix.cpp: Removed. * platform/win/LanguageWin.cpp: Removed. Source/WebKit/mac: Reviewed by Geoffrey Garen. Rewires a bunch of includes/imports. * WebCoreSupport/PopupMenuMac.mm: * WebCoreSupport/WebChromeClient.mm: * WebCoreSupport/WebFrameLoaderClient.mm: * WebCoreSupport/WebGeolocationClient.mm: * WebCoreSupport/WebNotificationClient.mm: * WebCoreSupport/WebPlatformStrategies.mm: * WebCoreSupport/WebUserMediaClient.mm: * WebCoreSupport/WebVisitedLinkStore.mm: * WebView/WebHTMLView.mm: Source/WebKit2: Reviewed by Geoffrey Garen and Alexey Proskuryakov. Rewires a bunch of includes/imports. * Shared/mac/RemoteLayerTreePropertyApplier.mm: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: Source/WTF: Reviewed by Geoffrey Garen. This contains two changes: - Move everything that WebCore's logic for getting the platform user preferred language depended on into WTF. This means CFBundleSPI.h and BlockObjCExceptions.h|cpp. - Move WebCore::platformUserPreferredLanguages() to WTF::platformUserPreferredLanguages(). This is needed by https://bugs.webkit.org/show_bug.cgi?id=157755, which will make JSC use this to detect the platform user preferred language when running standalone. Moving the dependencies accounts for a huge chunk of this change, since we have to rewire all of the references to those headers in all of WebKit. Moving platformUserPreferredLanguages() is mostly easy except for the weird callback. That function would call languageDidChange(), which needs to stay in WebCore. So, this gives WebCore the ability to register a languageDidChange callback. Other than this new logic, the code being added to WTF is just being lifted out of WebCore. * WTF.xcodeproj/project.pbxproj: * wtf/BlockObjCExceptions.h: Added. * wtf/BlockObjCExceptions.mm: Added. (ReportBlockedObjCException): * wtf/PlatformEfl.cmake: * wtf/PlatformGTK.cmake: * wtf/PlatformJSCOnly.cmake: * wtf/PlatformMac.cmake: * wtf/PlatformUserPreferredLanguages.h: Added. * wtf/PlatformUserPreferredLanguagesMac.mm: Added. (WTF::setPlatformUserPreferredLanguagesChangedCallback): (WTF::preferredLanguages): (+[WTFLanguageChangeObserver languagePreferencesDidChange:]): (WTF::httpStyleLanguageCode): (WTF::isValidICUCountryCode): (WTF::platformUserPreferredLanguages): * wtf/PlatformUserPreferredLanguagesUnix.cpp: Added. (WTF::setPlatformUserPreferredLanguagesChangedCallback): (WTF::platformLanguage): (WTF::platformUserPreferredLanguages): * wtf/PlatformUserPreferredLanguagesWin.cpp: Added. (WTF::setPlatformUserPreferredLanguagesChangedCallback): (WTF::localeInfo): (WTF::platformLanguage): (WTF::platformUserPreferredLanguages): * wtf/PlatformWin.cmake: * wtf/spi/cf: Added. * wtf/spi/cf/CFBundleSPI.h: Added. Canonical link: https://commits.webkit.org/175929@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-17 19:38:51 +00:00
list(APPEND WTF_SOURCES
generic/WorkQueueGeneric.cpp
WTF should know about Language https://bugs.webkit.org/show_bug.cgi?id=157756 Source/JavaScriptCore: Reviewed by Geoffrey Garen. Teach our scripts that a ObjC class beginning with WTF is totally cool. * JavaScriptCore.xcodeproj/project.pbxproj: Source/WebCore: Reviewed by Geoffrey Garen. No new tests because this does not change behavior. This change is all about moving some language functionality to WTF. Quoting the WTF ChangeLog, this contains two changes: - Move everything that WebCore's logic for getting the platform user preferred language depended on into WTF. This means CFBundleSPI.h and BlockObjCExceptions.h|cpp. - Move WebCore::platformUserPreferredLanguages() to WTF::platformUserPreferredLanguages(). This is needed by https://bugs.webkit.org/show_bug.cgi?id=157755, which will make JSC use this to detect the platform user preferred language when running standalone. The changes in WebCore are mostly about rewiring #includes and #imports and removing the code that we moved to WTF. But there is one logic change: previously, platformUserPreferredLanguages() would call WebCore::languageDidChange(). It can't do that directly anymore, but WTF gives WebCore some API for registering the callback. So in Language.cpp we now register languageDidChange anytime we do something that would necessitate it, like calling platformUserPreferredLanguages(). This also registers the callback inside addLanguageChangeObserver(), since it's possible for that to be called after JSC had called platformUserPreferredLanguages() but before WebCore does so. * PlatformEfl.cmake: * PlatformGTK.cmake: * PlatformMac.cmake: * PlatformWin.cmake: * WebCore.xcodeproj/project.pbxproj: * bindings/objc/DOMCustomXPathNSResolver.mm: * editing/ios/EditorIOS.mm: * editing/mac/DictionaryLookup.mm: * editing/mac/EditorMac.mm: * page/CaptionUserPreferencesMediaAF.cpp: * page/ios/EventHandlerIOS.mm: * page/ios/FrameIOS.mm: * page/mac/ChromeMac.mm: * page/mac/EventHandlerMac.mm: * platform/Language.cpp: (WebCore::registerLanguageDidChangeCallbackIfNecessary): (WebCore::observerMap): (WebCore::addLanguageChangeObserver): (WebCore::overrideUserPreferredLanguages): (WebCore::userPreferredLanguages): * platform/Language.h: * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: * platform/graphics/cocoa/FontCocoa.mm: * platform/graphics/mac/ColorMac.mm: * platform/graphics/mac/GraphicsContext3DMac.mm: * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: * platform/ios/PlatformSpeechSynthesizerIOS.mm: * platform/ios/ScrollViewIOS.mm: * platform/ios/WidgetIOS.mm: * platform/mac/BlockExceptions.h: Removed. * platform/mac/BlockExceptions.mm: Removed. * platform/mac/CursorMac.mm: * platform/mac/Language.mm: Removed. * platform/mac/ScrollAnimatorMac.mm: * platform/mac/ScrollViewMac.mm: * platform/mac/ScrollbarThemeMac.mm: * platform/mac/ThemeMac.mm: * platform/mac/WidgetMac.mm: * platform/mediastream/mac/AVVideoCaptureSource.mm: * platform/network/mac/CookieJarMac.mm: * platform/network/mac/ResourceErrorMac.mm: * platform/network/mac/ResourceHandleMac.mm: * platform/spi/cf/CFBundleSPI.h: Removed. * platform/unix/LanguageUnix.cpp: Removed. * platform/win/LanguageWin.cpp: Removed. Source/WebKit/mac: Reviewed by Geoffrey Garen. Rewires a bunch of includes/imports. * WebCoreSupport/PopupMenuMac.mm: * WebCoreSupport/WebChromeClient.mm: * WebCoreSupport/WebFrameLoaderClient.mm: * WebCoreSupport/WebGeolocationClient.mm: * WebCoreSupport/WebNotificationClient.mm: * WebCoreSupport/WebPlatformStrategies.mm: * WebCoreSupport/WebUserMediaClient.mm: * WebCoreSupport/WebVisitedLinkStore.mm: * WebView/WebHTMLView.mm: Source/WebKit2: Reviewed by Geoffrey Garen and Alexey Proskuryakov. Rewires a bunch of includes/imports. * Shared/mac/RemoteLayerTreePropertyApplier.mm: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: * WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: Source/WTF: Reviewed by Geoffrey Garen. This contains two changes: - Move everything that WebCore's logic for getting the platform user preferred language depended on into WTF. This means CFBundleSPI.h and BlockObjCExceptions.h|cpp. - Move WebCore::platformUserPreferredLanguages() to WTF::platformUserPreferredLanguages(). This is needed by https://bugs.webkit.org/show_bug.cgi?id=157755, which will make JSC use this to detect the platform user preferred language when running standalone. Moving the dependencies accounts for a huge chunk of this change, since we have to rewire all of the references to those headers in all of WebKit. Moving platformUserPreferredLanguages() is mostly easy except for the weird callback. That function would call languageDidChange(), which needs to stay in WebCore. So, this gives WebCore the ability to register a languageDidChange callback. Other than this new logic, the code being added to WTF is just being lifted out of WebCore. * WTF.xcodeproj/project.pbxproj: * wtf/BlockObjCExceptions.h: Added. * wtf/BlockObjCExceptions.mm: Added. (ReportBlockedObjCException): * wtf/PlatformEfl.cmake: * wtf/PlatformGTK.cmake: * wtf/PlatformJSCOnly.cmake: * wtf/PlatformMac.cmake: * wtf/PlatformUserPreferredLanguages.h: Added. * wtf/PlatformUserPreferredLanguagesMac.mm: Added. (WTF::setPlatformUserPreferredLanguagesChangedCallback): (WTF::preferredLanguages): (+[WTFLanguageChangeObserver languagePreferencesDidChange:]): (WTF::httpStyleLanguageCode): (WTF::isValidICUCountryCode): (WTF::platformUserPreferredLanguages): * wtf/PlatformUserPreferredLanguagesUnix.cpp: Added. (WTF::setPlatformUserPreferredLanguagesChangedCallback): (WTF::platformLanguage): (WTF::platformUserPreferredLanguages): * wtf/PlatformUserPreferredLanguagesWin.cpp: Added. (WTF::setPlatformUserPreferredLanguagesChangedCallback): (WTF::localeInfo): (WTF::platformLanguage): (WTF::platformUserPreferredLanguages): * wtf/PlatformWin.cmake: * wtf/spi/cf: Added. * wtf/spi/cf/CFBundleSPI.h: Added. Canonical link: https://commits.webkit.org/175929@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-05-17 19:38:51 +00:00
)
if (WIN32)
list(APPEND WTF_SOURCES
text/win/StringWin.cpp
text/win/TextBreakIteratorInternalICUWin.cpp
Move WebCore CPUTime to WTF and implement it in all the platforms https://bugs.webkit.org/show_bug.cgi?id=171477 Reviewed by Chris Dumez. Source/WebCore: Move CPUTime to WTF. And rename getCPUTime to CPUTime::get(). * CMakeLists.txt: * PlatformMac.cmake: * WebCore.xcodeproj/project.pbxproj: * page/ChromeClient.h: * page/PerformanceMonitor.cpp: (WebCore::PerformanceMonitor::PerformanceMonitor): (WebCore::PerformanceMonitor::measurePostLoadCPUUsage): (WebCore::PerformanceMonitor::measurePostBackgroundingCPUUsage): (WebCore::PerformanceMonitor::measureCPUUsageInActivityState): * page/PerformanceMonitor.h: * platform/CPUMonitor.cpp: (WebCore::CPUMonitor::setCPULimit): (WebCore::CPUMonitor::timerFired): * platform/CPUMonitor.h: Source/WebKit2: We now hold Seconds in CPUTime instead of int64_t. It finally sends Seconds through WebKit2 IPC. We do not need to specialize ArgumentCoder for Seconds since Seconds just holds double. * UIProcess/PerActivityStateCPUUsageSampler.cpp: (WebKit::PerActivityStateCPUUsageSampler::PerActivityStateCPUUsageSampler): (WebKit::PerActivityStateCPUUsageSampler::reportWebContentCPUTime): (WebKit::PerActivityStateCPUUsageSampler::loggingTimerFired): * UIProcess/PerActivityStateCPUUsageSampler.h: * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::reportWebContentCPUTime): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessPool.messages.in: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reportProcessCPUTime): * WebProcess/WebCoreSupport/WebChromeClient.h: Source/WTF: We move WebCore::CPUTime to WTF::CPUTime since it is useful even in JSC and it does not depend on any external libraries. And we additionally implement WTF::CPUTime in all the platforms: Windows and Unix. In CPUTime, instead of holding int64_t, we hold MonotonicTime and Seconds. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/CPUTime.cpp: Copied from Source/WebCore/platform/CPUTime.cpp. (WTF::CPUTime::percentageCPUUsageSince): * wtf/CPUTime.h: Renamed from Source/WebCore/platform/CPUTime.h. * wtf/PlatformEfl.cmake: * wtf/PlatformGTK.cmake: * wtf/PlatformJSCOnly.cmake: * wtf/PlatformMac.cmake: * wtf/PlatformWin.cmake: * wtf/cocoa/CPUTimeCocoa.mm: Renamed from Source/WebCore/platform/cocoa/CPUTimeCocoa.mm. (WTF::timeValueToMicroseconds): (WTF::CPUTime::get): * wtf/unix/CPUTimeUnix.cpp: Renamed from Source/WebCore/platform/CPUTime.cpp. (WTF::timevalToSeconds): (WTF::CPUTime::get): * wtf/win/CPUTimeWin.cpp: Added. (WTF::fileTimeToSeconds): (WTF::CPUTime::get): Canonical link: https://commits.webkit.org/188364@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215973 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-29 18:03:22 +00:00
win/CPUTimeWin.cpp
win/DbgHelperWin.cpp
win/FileSystemWin.cpp
[PAL] Unify PlatformUserPreferredLanguages.h with Language.h https://bugs.webkit.org/show_bug.cgi?id=176561 Reviewed by Brent Fulgham. Source/JavaScriptCore: * runtime/IntlObject.cpp: (JSC::defaultLocale): Source/WebCore: No new tests because there is no behavior change. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * accessibility/AccessibilitySVGElement.cpp: * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSWorkerGlobalScopeBase.cpp: * dom/Document.cpp: * html/HTMLInputElement.cpp: * html/HTMLMediaElement.cpp: * html/shadow/MediaControlElements.cpp: * html/track/TrackBase.cpp: * page/CaptionUserPreferences.cpp: * page/CaptionUserPreferencesMediaAF.cpp: * page/DOMWindow.cpp: * page/Navigator.cpp: * page/NavigatorBase.cpp: * platform/graphics/FontGenericFamilies.cpp: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: * platform/network/HTTPParsers.cpp: * platform/text/PlatformLocale.h: * platform/text/cf/HyphenationCF.cpp: * platform/text/mac/LocaleMac.mm: * svg/SVGTests.cpp: * testing/InternalSettings.cpp: * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): (WebCore::Internals::userPreferredLanguages const): (WebCore::Internals::setUserPreferredLanguages): Source/WebKit: * UIProcess/WebProcessPool.cpp: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::userPreferredLanguagesChanged const): Source/WebKitLegacy/mac: * Misc/WebNSUserDefaultsExtras.mm: Source/WTF: WebCore/platform/Language was the only* user of PlatformUserPreferredLanguages (with 1 exception). That exception is that JavaScriptCore needed the functionality of WebCore/platform/Language, but it couldn't get it because of the layering violation, so instead it erroneously called into PlatformUserPreferredLanguages instead. This patch merges these two files into WTF so JSC gets the right function and the PAL effort has one less file to move from WebCore/platform into PAL. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Language.cpp: Renamed from Source/WebCore/platform/Language.cpp. (WTF::addLanguageChangeObserver): (WTF::userPreferredLanguages): * wtf/Language.h: Renamed from Source/WebCore/platform/Language.h. * wtf/PlatformGTK.cmake: * wtf/PlatformJSCOnly.cmake: * wtf/PlatformMac.cmake: * wtf/PlatformUserPreferredLanguages.h: Removed. * wtf/PlatformWPE.cmake: * wtf/PlatformWin.cmake: * wtf/cf/LanguageCF.cpp: Renamed from Source/WTF/wtf/PlatformUserPreferredLanguagesMac.mm. (WTF::httpStyleLanguageCode): (WTF::languagePreferencesDidChange): (WTF::platformUserPreferredLanguages): * wtf/unix/LanguageUnix.cpp: Renamed from Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp. * wtf/win/LanguageWin.cpp: Renamed from Source/WTF/wtf/PlatformUserPreferredLanguagesWin.cpp. Canonical link: https://commits.webkit.org/193121@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-07 23:11:21 +00:00
win/LanguageWin.cpp
Support WTF logging channels https://bugs.webkit.org/show_bug.cgi?id=228768 Source/WebKit: Reviewed by Fujii Hironori. No new tests because there is no behavior change. * GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::initializeGPUProcess): * GPUProcess/GPUProcessCreationParameters.cpp: (WebKit::GPUProcessCreationParameters::encode const): (WebKit::GPUProcessCreationParameters::decode): * GPUProcess/GPUProcessCreationParameters.h: * Shared/AuxiliaryProcess.cpp: (WebKit::AuxiliaryProcess::initialize): * Shared/WebKit2Initialize.cpp: (WebKit::InitializeWebKit2): * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/Cocoa/GPUProcessProxyCocoa.mm: (WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): * UIProcess/GPU/GPUProcessProxy.cpp: (WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters): * UIProcess/WebProcessPool.cpp: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): Source/WebKitLegacy/mac: Reviewed by Fujii Hironori. * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): Source/WTF: This patch builds on top of https://bugs.webkit.org/show_bug.cgi?id=228809, which added shared infrastructure for logging. This patch simply triggers that shared infrastructure for WTF. There is no change in behavior - the existing WTF logging channels currently are all implemented independently in custom ways, so this patch just migrates them over to use the shared infrastructure. Reviewed by Fujii Hironori. * WTF.xcodeproj/project.pbxproj: * wtf/Assertions.h: * wtf/CMakeLists.txt: * wtf/LogInitialization.cpp: Added. (WTF::logChannels): * wtf/LogInitialization.h: Added. * wtf/Logging.cpp: Added. * wtf/Logging.h: Added. * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::singleton): * wtf/MemoryPressureHandler.h: * wtf/PlatformFTW.cmake: * wtf/PlatformGTK.cmake: * wtf/PlatformJSCOnly.cmake: * wtf/PlatformMac.cmake: * wtf/PlatformPlayStation.cmake: * wtf/PlatformWPE.cmake: * wtf/PlatformWin.cmake: * wtf/RefCountedLeakCounter.cpp: * wtf/cocoa/LoggingCocoa.mm: Copied from Source/WebKit/UIProcess/Cocoa/GPUProcessProxyCocoa.mm. (WTF::logLevelString): * wtf/cocoa/MachSendRight.cpp: * wtf/cocoa/MainThreadCocoa.mm: * wtf/cocoa/MemoryPressureHandlerCocoa.mm: * wtf/unix/LoggingUnix.cpp: Added. (WTF::logLevelString): * wtf/win/LoggingWin.cpp: Added. (WTF::logLevelString): Canonical link: https://commits.webkit.org/240373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-09 21:14:53 +00:00
win/LoggingWin.cpp
win/MainThreadWin.cpp
win/OSAllocatorWin.cpp
win/PathWalker.cpp
win/ThreadingWin.cpp
)
list(APPEND WTF_PUBLIC_HEADERS
text/win/WCharStringExtras.h
win/DbgHelperWin.h
win/PathWalker.h
)
list(APPEND WTF_LIBRARIES
DbgHelp
shlwapi
winmm
)
else ()
list(APPEND WTF_SOURCES
generic/MainThreadGeneric.cpp
posix/OSAllocatorPOSIX.cpp
posix/ThreadingPOSIX.cpp
text/unix/TextBreakIteratorInternalICUUnix.cpp
[PAL] Unify PlatformUserPreferredLanguages.h with Language.h https://bugs.webkit.org/show_bug.cgi?id=176561 Reviewed by Brent Fulgham. Source/JavaScriptCore: * runtime/IntlObject.cpp: (JSC::defaultLocale): Source/WebCore: No new tests because there is no behavior change. * CMakeLists.txt: * WebCore.xcodeproj/project.pbxproj: * accessibility/AccessibilitySVGElement.cpp: * bindings/js/JSDOMWindowBase.cpp: * bindings/js/JSWorkerGlobalScopeBase.cpp: * dom/Document.cpp: * html/HTMLInputElement.cpp: * html/HTMLMediaElement.cpp: * html/shadow/MediaControlElements.cpp: * html/track/TrackBase.cpp: * page/CaptionUserPreferences.cpp: * page/CaptionUserPreferencesMediaAF.cpp: * page/DOMWindow.cpp: * page/Navigator.cpp: * page/NavigatorBase.cpp: * platform/graphics/FontGenericFamilies.cpp: * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: * platform/network/HTTPParsers.cpp: * platform/text/PlatformLocale.h: * platform/text/cf/HyphenationCF.cpp: * platform/text/mac/LocaleMac.mm: * svg/SVGTests.cpp: * testing/InternalSettings.cpp: * testing/Internals.cpp: (WebCore::Internals::resetToConsistentState): (WebCore::Internals::userPreferredLanguages const): (WebCore::Internals::setUserPreferredLanguages): Source/WebKit: * UIProcess/WebProcessPool.cpp: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::userPreferredLanguagesChanged const): Source/WebKitLegacy/mac: * Misc/WebNSUserDefaultsExtras.mm: Source/WTF: WebCore/platform/Language was the only* user of PlatformUserPreferredLanguages (with 1 exception). That exception is that JavaScriptCore needed the functionality of WebCore/platform/Language, but it couldn't get it because of the layering violation, so instead it erroneously called into PlatformUserPreferredLanguages instead. This patch merges these two files into WTF so JSC gets the right function and the PAL effort has one less file to move from WebCore/platform into PAL. * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Language.cpp: Renamed from Source/WebCore/platform/Language.cpp. (WTF::addLanguageChangeObserver): (WTF::userPreferredLanguages): * wtf/Language.h: Renamed from Source/WebCore/platform/Language.h. * wtf/PlatformGTK.cmake: * wtf/PlatformJSCOnly.cmake: * wtf/PlatformMac.cmake: * wtf/PlatformUserPreferredLanguages.h: Removed. * wtf/PlatformWPE.cmake: * wtf/PlatformWin.cmake: * wtf/cf/LanguageCF.cpp: Renamed from Source/WTF/wtf/PlatformUserPreferredLanguagesMac.mm. (WTF::httpStyleLanguageCode): (WTF::languagePreferencesDidChange): (WTF::platformUserPreferredLanguages): * wtf/unix/LanguageUnix.cpp: Renamed from Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp. * wtf/win/LanguageWin.cpp: Renamed from Source/WTF/wtf/PlatformUserPreferredLanguagesWin.cpp. Canonical link: https://commits.webkit.org/193121@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-09-07 23:11:21 +00:00
unix/LanguageUnix.cpp
Support WTF logging channels https://bugs.webkit.org/show_bug.cgi?id=228768 Source/WebKit: Reviewed by Fujii Hironori. No new tests because there is no behavior change. * GPUProcess/GPUProcess.cpp: (WebKit::GPUProcess::initializeGPUProcess): * GPUProcess/GPUProcessCreationParameters.cpp: (WebKit::GPUProcessCreationParameters::encode const): (WebKit::GPUProcessCreationParameters::decode): * GPUProcess/GPUProcessCreationParameters.h: * Shared/AuxiliaryProcess.cpp: (WebKit::AuxiliaryProcess::initialize): * Shared/WebKit2Initialize.cpp: (WebKit::InitializeWebKit2): * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode const): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/Cocoa/GPUProcessProxyCocoa.mm: (WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): * UIProcess/GPU/GPUProcessProxy.cpp: (WebKit::GPUProcessProxy::platformInitializeGPUProcessParameters): * UIProcess/WebProcessPool.cpp: * WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): Source/WebKitLegacy/mac: Reviewed by Fujii Hironori. * WebView/WebView.mm: (-[WebView _commonInitializationWithFrameName:groupName:]): Source/WTF: This patch builds on top of https://bugs.webkit.org/show_bug.cgi?id=228809, which added shared infrastructure for logging. This patch simply triggers that shared infrastructure for WTF. There is no change in behavior - the existing WTF logging channels currently are all implemented independently in custom ways, so this patch just migrates them over to use the shared infrastructure. Reviewed by Fujii Hironori. * WTF.xcodeproj/project.pbxproj: * wtf/Assertions.h: * wtf/CMakeLists.txt: * wtf/LogInitialization.cpp: Added. (WTF::logChannels): * wtf/LogInitialization.h: Added. * wtf/Logging.cpp: Added. * wtf/Logging.h: Added. * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::singleton): * wtf/MemoryPressureHandler.h: * wtf/PlatformFTW.cmake: * wtf/PlatformGTK.cmake: * wtf/PlatformJSCOnly.cmake: * wtf/PlatformMac.cmake: * wtf/PlatformPlayStation.cmake: * wtf/PlatformWPE.cmake: * wtf/PlatformWin.cmake: * wtf/RefCountedLeakCounter.cpp: * wtf/cocoa/LoggingCocoa.mm: Copied from Source/WebKit/UIProcess/Cocoa/GPUProcessProxyCocoa.mm. (WTF::logLevelString): * wtf/cocoa/MachSendRight.cpp: * wtf/cocoa/MainThreadCocoa.mm: * wtf/cocoa/MemoryPressureHandlerCocoa.mm: * wtf/unix/LoggingUnix.cpp: Added. (WTF::logLevelString): * wtf/win/LoggingWin.cpp: Added. (WTF::logLevelString): Canonical link: https://commits.webkit.org/240373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@280795 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-08-09 21:14:53 +00:00
unix/LoggingUnix.cpp
)
if (WTF_OS_FUCHSIA)
list(APPEND WTF_SOURCES
fuchsia/CPUTimeFuchsia.cpp
)
else ()
list(APPEND WTF_SOURCES
posix/CPUTimePOSIX.cpp
)
endif ()
if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib")
list(APPEND WTF_SOURCES
glib/FileSystemGlib.cpp
)
else ()
list(APPEND WTF_SOURCES
posix/FileSystemPOSIX.cpp
unix/UniStdExtrasUnix.cpp
)
endif ()
endif ()
if (WIN32)
list(APPEND WTF_SOURCES
win/MemoryFootprintWin.cpp
win/MemoryPressureHandlerWin.cpp
)
list(APPEND WTF_PUBLIC_HEADERS
win/Win32Handle.h
)
elseif (APPLE)
file(COPY mac/MachExceptions.defs DESTINATION ${WTF_DERIVED_SOURCES_DIR})
add_custom_command(
OUTPUT
${WTF_DERIVED_SOURCES_DIR}/MachExceptionsServer.h
${WTF_DERIVED_SOURCES_DIR}/mach_exc.h
${WTF_DERIVED_SOURCES_DIR}/mach_excServer.c
${WTF_DERIVED_SOURCES_DIR}/mach_excUser.c
MAIN_DEPENDENCY mac/MachExceptions.defs
WORKING_DIRECTORY ${WTF_DERIVED_SOURCES_DIR}
COMMAND mig -sheader MachExceptionsServer.h MachExceptions.defs
VERBATIM)
list(APPEND WTF_SOURCES
cocoa/MemoryFootprintCocoa.cpp
generic/MemoryPressureHandlerGeneric.cpp
${WTF_DERIVED_SOURCES_DIR}/mach_excServer.c
${WTF_DERIVED_SOURCES_DIR}/mach_excUser.c
)
list(APPEND WTF_PUBLIC_HEADERS
spi/darwin/ProcessMemoryFootprint.h
)
[WTF] Add generic implementation for Memory querying https://bugs.webkit.org/show_bug.cgi?id=188867 Reviewed by Fujii Hironori. Moves generic implementation of MemoryPressureHandler from MemoryPressureHandler.cpp into MemoryPressureHandlerGeneric and generic implementation of memoryFootprint from MemoryFootprintLinux.cpp to MemoryFootprintGeneric. * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::install): Deleted. (WTF::MemoryPressureHandler::uninstall): Deleted. (WTF::MemoryPressureHandler::respondToMemoryPressure): Deleted. (WTF::MemoryPressureHandler::platformReleaseMemory): Deleted. (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Deleted. * wtf/PlatformJSCOnly.cmake: * wtf/generic/MemoryFootprintGeneric.cpp: Added. (WTF::memoryFootprint): * wtf/generic/MemoryPressureHandlerGeneric.cpp: Added. (WTF::MemoryPressureHandler::memoryMeasurementTimerFired): (WTF::MemoryPressureHandler::platformReleaseMemory): (WTF::MemoryPressureHandler::install): (WTF::MemoryPressureHandler::uninstall): (WTF::MemoryPressureHandler::holdOff): (WTF::MemoryPressureHandler::respondToMemoryPressure): (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): * wtf/linux/CurrentProcessMemoryStatus.cpp: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/linux/MemoryFootprintLinux.cpp: (WTF::computeMemoryFootprint): (WTF::memoryFootprint): * wtf/linux/MemoryPressureHandlerLinux.cpp: Canonical link: https://commits.webkit.org/203921@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-23 03:01:40 +00:00
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
list(APPEND WTF_SOURCES
[WTF] Add generic implementation for Memory querying https://bugs.webkit.org/show_bug.cgi?id=188867 Reviewed by Fujii Hironori. Moves generic implementation of MemoryPressureHandler from MemoryPressureHandler.cpp into MemoryPressureHandlerGeneric and generic implementation of memoryFootprint from MemoryFootprintLinux.cpp to MemoryFootprintGeneric. * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::install): Deleted. (WTF::MemoryPressureHandler::uninstall): Deleted. (WTF::MemoryPressureHandler::respondToMemoryPressure): Deleted. (WTF::MemoryPressureHandler::platformReleaseMemory): Deleted. (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Deleted. * wtf/PlatformJSCOnly.cmake: * wtf/generic/MemoryFootprintGeneric.cpp: Added. (WTF::memoryFootprint): * wtf/generic/MemoryPressureHandlerGeneric.cpp: Added. (WTF::MemoryPressureHandler::memoryMeasurementTimerFired): (WTF::MemoryPressureHandler::platformReleaseMemory): (WTF::MemoryPressureHandler::install): (WTF::MemoryPressureHandler::uninstall): (WTF::MemoryPressureHandler::holdOff): (WTF::MemoryPressureHandler::respondToMemoryPressure): (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): * wtf/linux/CurrentProcessMemoryStatus.cpp: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/linux/MemoryFootprintLinux.cpp: (WTF::computeMemoryFootprint): (WTF::memoryFootprint): * wtf/linux/MemoryPressureHandlerLinux.cpp: Canonical link: https://commits.webkit.org/203921@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-23 03:01:40 +00:00
linux/CurrentProcessMemoryStatus.cpp
linux/MemoryFootprintLinux.cpp
unix/MemoryPressureHandlerUnix.cpp
[WTF] Add generic implementation for Memory querying https://bugs.webkit.org/show_bug.cgi?id=188867 Reviewed by Fujii Hironori. Moves generic implementation of MemoryPressureHandler from MemoryPressureHandler.cpp into MemoryPressureHandlerGeneric and generic implementation of memoryFootprint from MemoryFootprintLinux.cpp to MemoryFootprintGeneric. * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::install): Deleted. (WTF::MemoryPressureHandler::uninstall): Deleted. (WTF::MemoryPressureHandler::respondToMemoryPressure): Deleted. (WTF::MemoryPressureHandler::platformReleaseMemory): Deleted. (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Deleted. * wtf/PlatformJSCOnly.cmake: * wtf/generic/MemoryFootprintGeneric.cpp: Added. (WTF::memoryFootprint): * wtf/generic/MemoryPressureHandlerGeneric.cpp: Added. (WTF::MemoryPressureHandler::memoryMeasurementTimerFired): (WTF::MemoryPressureHandler::platformReleaseMemory): (WTF::MemoryPressureHandler::install): (WTF::MemoryPressureHandler::uninstall): (WTF::MemoryPressureHandler::holdOff): (WTF::MemoryPressureHandler::respondToMemoryPressure): (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): * wtf/linux/CurrentProcessMemoryStatus.cpp: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/linux/MemoryFootprintLinux.cpp: (WTF::computeMemoryFootprint): (WTF::memoryFootprint): * wtf/linux/MemoryPressureHandlerLinux.cpp: Canonical link: https://commits.webkit.org/203921@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-23 03:01:40 +00:00
)
list(APPEND WTF_PUBLIC_HEADERS
linux/ProcessMemoryFootprint.h
[WTF] Add generic implementation for Memory querying https://bugs.webkit.org/show_bug.cgi?id=188867 Reviewed by Fujii Hironori. Moves generic implementation of MemoryPressureHandler from MemoryPressureHandler.cpp into MemoryPressureHandlerGeneric and generic implementation of memoryFootprint from MemoryFootprintLinux.cpp to MemoryFootprintGeneric. * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::install): Deleted. (WTF::MemoryPressureHandler::uninstall): Deleted. (WTF::MemoryPressureHandler::respondToMemoryPressure): Deleted. (WTF::MemoryPressureHandler::platformReleaseMemory): Deleted. (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Deleted. * wtf/PlatformJSCOnly.cmake: * wtf/generic/MemoryFootprintGeneric.cpp: Added. (WTF::memoryFootprint): * wtf/generic/MemoryPressureHandlerGeneric.cpp: Added. (WTF::MemoryPressureHandler::memoryMeasurementTimerFired): (WTF::MemoryPressureHandler::platformReleaseMemory): (WTF::MemoryPressureHandler::install): (WTF::MemoryPressureHandler::uninstall): (WTF::MemoryPressureHandler::holdOff): (WTF::MemoryPressureHandler::respondToMemoryPressure): (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): * wtf/linux/CurrentProcessMemoryStatus.cpp: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/linux/MemoryFootprintLinux.cpp: (WTF::computeMemoryFootprint): (WTF::memoryFootprint): * wtf/linux/MemoryPressureHandlerLinux.cpp: Canonical link: https://commits.webkit.org/203921@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-23 03:01:40 +00:00
linux/CurrentProcessMemoryStatus.h
)
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
list(APPEND WTF_SOURCES
generic/MemoryFootprintGeneric.cpp
unix/MemoryPressureHandlerUnix.cpp
)
[WTF] Add generic implementation for Memory querying https://bugs.webkit.org/show_bug.cgi?id=188867 Reviewed by Fujii Hironori. Moves generic implementation of MemoryPressureHandler from MemoryPressureHandler.cpp into MemoryPressureHandlerGeneric and generic implementation of memoryFootprint from MemoryFootprintLinux.cpp to MemoryFootprintGeneric. * wtf/MemoryPressureHandler.cpp: (WTF::MemoryPressureHandler::install): Deleted. (WTF::MemoryPressureHandler::uninstall): Deleted. (WTF::MemoryPressureHandler::respondToMemoryPressure): Deleted. (WTF::MemoryPressureHandler::platformReleaseMemory): Deleted. (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): Deleted. * wtf/PlatformJSCOnly.cmake: * wtf/generic/MemoryFootprintGeneric.cpp: Added. (WTF::memoryFootprint): * wtf/generic/MemoryPressureHandlerGeneric.cpp: Added. (WTF::MemoryPressureHandler::memoryMeasurementTimerFired): (WTF::MemoryPressureHandler::platformReleaseMemory): (WTF::MemoryPressureHandler::install): (WTF::MemoryPressureHandler::uninstall): (WTF::MemoryPressureHandler::holdOff): (WTF::MemoryPressureHandler::respondToMemoryPressure): (WTF::MemoryPressureHandler::ReliefLogger::platformMemoryUsage): * wtf/linux/CurrentProcessMemoryStatus.cpp: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/linux/MemoryFootprintLinux.cpp: (WTF::computeMemoryFootprint): (WTF::memoryFootprint): * wtf/linux/MemoryPressureHandlerLinux.cpp: Canonical link: https://commits.webkit.org/203921@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-23 03:01:40 +00:00
else ()
list(APPEND WTF_SOURCES
generic/MemoryFootprintGeneric.cpp
generic/MemoryPressureHandlerGeneric.cpp
)
endif ()
[JSCOnly] Implement RunLoop and remove glib dependency https://bugs.webkit.org/show_bug.cgi?id=155706 Reviewed by Michael Catanzaro. .: * Source/cmake/OptionsJSCOnly.cmake: Source/WTF: Add missing RunLoop and WorkQueue platform code for JSCOnly port. The implementation does not use platform specific things. Instead, we implement them on WTF framework; using condition variables to construct the run loop and timers. Since the fallback is implemented, it is not necessary for JSCOnly port to depend on GLib's RunLoop abstraction. So this patch removes its dependency. As a result, now, JSCOnly port removes dependencies except for the system ICU. We clean up event loop ifdefs by introducing USE_XXX_EVENT_LOOP flags. USE(XXX_EVENT_LOOP) is exclusive to each other. So from now, we do not need to take care of the order of if-defs for the event loops. (For example, USE(GLIB) should have lead before OS(DARWIN) in WorkQueue.h for WebKitGTK on Darwin.) EVENT_LOOP determination is done in Platform.h. This follows the style of WTF PLATFORM. * wtf/Platform.h: * wtf/PlatformJSCOnly.cmake: * wtf/RunLoop.h: * wtf/WorkQueue.h: * wtf/generic/MainThreadGeneric.cpp: Renamed from Source/WTF/wtf/none/MainThreadNone.cpp. (WTF::initializeMainThreadPlatform): (WTF::scheduleDispatchFunctionsOnMainThread): * wtf/generic/RunLoopGeneric.cpp: Added. (WTF::RunLoop::TimerBase::ScheduledTask::create): (WTF::RunLoop::TimerBase::ScheduledTask::ScheduledTask): (WTF::RunLoop::TimerBase::ScheduledTask::fired): (WTF::RunLoop::TimerBase::ScheduledTask::scheduledTimePoint): (WTF::RunLoop::TimerBase::ScheduledTask::updateReadyTime): (WTF::RunLoop::TimerBase::ScheduledTask::EarliestSchedule::operator()): (WTF::RunLoop::TimerBase::ScheduledTask::isActive): (WTF::RunLoop::TimerBase::ScheduledTask::deactivate): (WTF::RunLoop::RunLoop): (WTF::RunLoop::~RunLoop): (WTF::RunLoop::populateTasks): (WTF::RunLoop::runImpl): (WTF::RunLoop::run): (WTF::RunLoop::iterate): (WTF::RunLoop::stop): (WTF::RunLoop::wakeUp): (WTF::RunLoop::schedule): (WTF::RunLoop::scheduleAndWakeUp): (WTF::RunLoop::dispatchAfter): (WTF::RunLoop::TimerBase::TimerBase): (WTF::RunLoop::TimerBase::~TimerBase): (WTF::RunLoop::TimerBase::start): (WTF::RunLoop::TimerBase::stop): (WTF::RunLoop::TimerBase::isActive): * wtf/generic/WorkQueueGeneric.cpp: Added. (WorkQueue::platformInitialize): (WorkQueue::platformInvalidate): (WorkQueue::dispatch): (WorkQueue::dispatchAfter): * wtf/none/MainThreadNone.cpp: (WTF::initializeMainThreadPlatform): Deleted. (WTF::scheduleDispatchFunctionsOnMainThread): Deleted. * wtf/none/RunLoopNone.cpp: (WTF::RunLoop::RunLoop): Deleted. (WTF::RunLoop::~RunLoop): Deleted. (WTF::RunLoop::run): Deleted. (WTF::RunLoop::stop): Deleted. (WTF::RunLoop::wakeUp): Deleted. (WTF::RunLoop::TimerBase::TimerBase): Deleted. (WTF::RunLoop::TimerBase::~TimerBase): Deleted. (WTF::RunLoop::TimerBase::start): Deleted. (WTF::RunLoop::TimerBase::stop): Deleted. (WTF::RunLoop::TimerBase::isActive): Deleted. * wtf/none/WorkQueueNone.cpp: (WorkQueue::platformInitialize): Deleted. (WorkQueue::platformInvalidate): Deleted. (WorkQueue::dispatch): Deleted. (WorkQueue::dispatchAfter): Deleted. Tools: Add TestWTF to JSCOnly port to test WorkQueue and RunLoop. Platform specific ones locate under jsconly directory since it is not `generic` (Since it includes the GLIB event loop case). * CMakeLists.txt: * TestWebKitAPI/PlatformJSCOnly.cmake: Added. * TestWebKitAPI/PlatformUtilities.h: * TestWebKitAPI/Tests/WTF/RunLoop.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/config.h: * TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp: Renamed from Source/WTF/wtf/none/RunLoopNone.cpp. (TestWebKitAPI::Util::run): (TestWebKitAPI::Util::sleep): * TestWebKitAPI/jsconly/main.cpp: Renamed from Source/WTF/wtf/none/WorkQueueNone.cpp. (main): Canonical link: https://commits.webkit.org/174829@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-18 22:59:31 +00:00
if (LOWERCASE_EVENT_LOOP_TYPE STREQUAL "glib")
list(APPEND WTF_SOURCES
glib/GRefPtr.cpp
glib/RunLoopGLib.cpp
)
list(APPEND WTF_PUBLIC_HEADERS
glib/GRefPtr.h
glib/GTypedefs.h
glib/RunLoopSourcePriority.h
)
if (ENABLE_REMOTE_INSPECTOR)
list(APPEND WTF_SOURCES
glib/GSocketMonitor.cpp
glib/SocketConnection.cpp
)
list(APPEND WTF_PUBLIC_HEADERS
glib/GSocketMonitor.h
glib/GUniquePtr.h
glib/SocketConnection.h
)
endif ()
list(APPEND WTF_SYSTEM_INCLUDE_DIRECTORIES
${GIO_UNIX_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
)
list(APPEND WTF_LIBRARIES
${GIO_UNIX_LIBRARIES}
${GLIB_GIO_LIBRARIES}
${GLIB_GOBJECT_LIBRARIES}
${GLIB_LIBRARIES}
)
else ()
list(APPEND WTF_SOURCES
[JSCOnly] Implement RunLoop and remove glib dependency https://bugs.webkit.org/show_bug.cgi?id=155706 Reviewed by Michael Catanzaro. .: * Source/cmake/OptionsJSCOnly.cmake: Source/WTF: Add missing RunLoop and WorkQueue platform code for JSCOnly port. The implementation does not use platform specific things. Instead, we implement them on WTF framework; using condition variables to construct the run loop and timers. Since the fallback is implemented, it is not necessary for JSCOnly port to depend on GLib's RunLoop abstraction. So this patch removes its dependency. As a result, now, JSCOnly port removes dependencies except for the system ICU. We clean up event loop ifdefs by introducing USE_XXX_EVENT_LOOP flags. USE(XXX_EVENT_LOOP) is exclusive to each other. So from now, we do not need to take care of the order of if-defs for the event loops. (For example, USE(GLIB) should have lead before OS(DARWIN) in WorkQueue.h for WebKitGTK on Darwin.) EVENT_LOOP determination is done in Platform.h. This follows the style of WTF PLATFORM. * wtf/Platform.h: * wtf/PlatformJSCOnly.cmake: * wtf/RunLoop.h: * wtf/WorkQueue.h: * wtf/generic/MainThreadGeneric.cpp: Renamed from Source/WTF/wtf/none/MainThreadNone.cpp. (WTF::initializeMainThreadPlatform): (WTF::scheduleDispatchFunctionsOnMainThread): * wtf/generic/RunLoopGeneric.cpp: Added. (WTF::RunLoop::TimerBase::ScheduledTask::create): (WTF::RunLoop::TimerBase::ScheduledTask::ScheduledTask): (WTF::RunLoop::TimerBase::ScheduledTask::fired): (WTF::RunLoop::TimerBase::ScheduledTask::scheduledTimePoint): (WTF::RunLoop::TimerBase::ScheduledTask::updateReadyTime): (WTF::RunLoop::TimerBase::ScheduledTask::EarliestSchedule::operator()): (WTF::RunLoop::TimerBase::ScheduledTask::isActive): (WTF::RunLoop::TimerBase::ScheduledTask::deactivate): (WTF::RunLoop::RunLoop): (WTF::RunLoop::~RunLoop): (WTF::RunLoop::populateTasks): (WTF::RunLoop::runImpl): (WTF::RunLoop::run): (WTF::RunLoop::iterate): (WTF::RunLoop::stop): (WTF::RunLoop::wakeUp): (WTF::RunLoop::schedule): (WTF::RunLoop::scheduleAndWakeUp): (WTF::RunLoop::dispatchAfter): (WTF::RunLoop::TimerBase::TimerBase): (WTF::RunLoop::TimerBase::~TimerBase): (WTF::RunLoop::TimerBase::start): (WTF::RunLoop::TimerBase::stop): (WTF::RunLoop::TimerBase::isActive): * wtf/generic/WorkQueueGeneric.cpp: Added. (WorkQueue::platformInitialize): (WorkQueue::platformInvalidate): (WorkQueue::dispatch): (WorkQueue::dispatchAfter): * wtf/none/MainThreadNone.cpp: (WTF::initializeMainThreadPlatform): Deleted. (WTF::scheduleDispatchFunctionsOnMainThread): Deleted. * wtf/none/RunLoopNone.cpp: (WTF::RunLoop::RunLoop): Deleted. (WTF::RunLoop::~RunLoop): Deleted. (WTF::RunLoop::run): Deleted. (WTF::RunLoop::stop): Deleted. (WTF::RunLoop::wakeUp): Deleted. (WTF::RunLoop::TimerBase::TimerBase): Deleted. (WTF::RunLoop::TimerBase::~TimerBase): Deleted. (WTF::RunLoop::TimerBase::start): Deleted. (WTF::RunLoop::TimerBase::stop): Deleted. (WTF::RunLoop::TimerBase::isActive): Deleted. * wtf/none/WorkQueueNone.cpp: (WorkQueue::platformInitialize): Deleted. (WorkQueue::platformInvalidate): Deleted. (WorkQueue::dispatch): Deleted. (WorkQueue::dispatchAfter): Deleted. Tools: Add TestWTF to JSCOnly port to test WorkQueue and RunLoop. Platform specific ones locate under jsconly directory since it is not `generic` (Since it includes the GLIB event loop case). * CMakeLists.txt: * TestWebKitAPI/PlatformJSCOnly.cmake: Added. * TestWebKitAPI/PlatformUtilities.h: * TestWebKitAPI/Tests/WTF/RunLoop.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/config.h: * TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp: Renamed from Source/WTF/wtf/none/RunLoopNone.cpp. (TestWebKitAPI::Util::run): (TestWebKitAPI::Util::sleep): * TestWebKitAPI/jsconly/main.cpp: Renamed from Source/WTF/wtf/none/WorkQueueNone.cpp. (main): Canonical link: https://commits.webkit.org/174829@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-04-18 22:59:31 +00:00
generic/RunLoopGeneric.cpp
)
endif ()
list(APPEND WTF_LIBRARIES
[CMake] Use builtin targets https://bugs.webkit.org/show_bug.cgi?id=205166 Reviewed by Darin Adler. .: Add WebKitFindPackage.cmake which wraps CMake's find_package to provide targets for common libraries. Rationale: 1. There are a number of libraries which are found using CMake's internal Find modules that contain targets but not all of them are available in the minimum version of CMake we support, 3.10. 2. Updating to CMake 3.12 or higher is not possible due to the WebKit GTK's support policy. It looks like the next time we can bump the version is spring 2021. 3. Apple builds, both Mac and Windows, have libraries that won't be found using the stock CMake modules. AppleWin also has internal builds where all libraries have a DEBUG_SUFFIX of _debug that would not be picked up. In the implementation of find_package any Apple specific requirements are dealt with and the expected CMake values are populated. For all other cases CMake's original find_package is called so there's no behavior change. Afterwards if there is a library that has a target but the target was not created it is created from the definitions that are present from the find module at CMake 3.10. This makes it so all ports consistently have targets across all versions of CMake above the current minimum. * Source/cmake/OptionsAppleWin.cmake: * Source/cmake/OptionsPlayStation.cmake: * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitFindPackage.cmake: Added. * Source/cmake/target/icu.cmake: Removed. PerformanceTests: * MallocBench/MallocBench/CMakeLists.txt: Source/WebCore: * CMakeLists.txt: * PlatformGTK.cmake: * PlatformMac.cmake: * platform/Curl.cmake: * platform/FreeType.cmake: * platform/ImageDecoders.cmake: Source/WebCore/PAL: * pal/PlatformPlayStation.cmake: Source/WebKit: * PlatformFTW.cmake: * PlatformWPE.cmake: * PlatformWin.cmake: Source/WebKitLegacy: * PlatformFTW.cmake: * PlatformWin.cmake: Source/WTF: * wtf/PlatformGTK.cmake: * wtf/PlatformJSCOnly.cmake: * wtf/PlatformPlayStation.cmake: * wtf/PlatformWPE.cmake: Tools: * TestWebKitAPI/PlatformWin.cmake: Canonical link: https://commits.webkit.org/220799@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@256731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-17 15:37:39 +00:00
Threads::Threads
)