[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.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221768
268f45cc-cd09-0410-ab3c-
d52691b4dbfc