[PAL] Unify PlatformUserPreferredLanguages.h with Language.h
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Sep 2017 23:11:21 +0000 (23:11 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Sep 2017 23:11:21 +0000 (23:11 +0000)
commitf8d3d51e5896a956fc0f92663d1adafaa01e986b
treed7deb635548c0bae56e8b089292d970fa6f91a88
parentfbe4c3e365d84e4860e4652d8ce7b9c5aa197308
[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
50 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/IntlObject.cpp
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/Language.cpp [moved from Source/WebCore/platform/Language.cpp with 92% similarity]
Source/WTF/wtf/Language.h [moved from Source/WebCore/platform/Language.h with 57% similarity]
Source/WTF/wtf/PlatformGTK.cmake
Source/WTF/wtf/PlatformJSCOnly.cmake
Source/WTF/wtf/PlatformMac.cmake
Source/WTF/wtf/PlatformUserPreferredLanguages.h [deleted file]
Source/WTF/wtf/PlatformWPE.cmake
Source/WTF/wtf/PlatformWin.cmake
Source/WTF/wtf/cf/LanguageCF.cpp [moved from Source/WTF/wtf/PlatformUserPreferredLanguagesMac.mm with 65% similarity]
Source/WTF/wtf/unix/LanguageUnix.cpp [moved from Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp with 90% similarity]
Source/WTF/wtf/win/LanguageWin.cpp [moved from Source/WTF/wtf/PlatformUserPreferredLanguagesWin.cpp with 93% similarity]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/AccessibilitySVGElement.cpp
Source/WebCore/bindings/js/JSDOMWindowBase.cpp
Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/html/HTMLInputElement.cpp
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/track/TrackBase.cpp
Source/WebCore/page/CaptionUserPreferences.cpp
Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/Navigator.cpp
Source/WebCore/page/NavigatorBase.cpp
Source/WebCore/platform/graphics/FontGenericFamilies.cpp
Source/WebCore/platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm
Source/WebCore/platform/network/HTTPParsers.cpp
Source/WebCore/platform/text/PlatformLocale.h
Source/WebCore/platform/text/cf/HyphenationCF.cpp
Source/WebCore/platform/text/enchant/TextCheckerEnchant.cpp
Source/WebCore/platform/text/mac/LocaleMac.mm
Source/WebCore/platform/text/win/LocaleWin.cpp
Source/WebCore/svg/SVGTests.cpp
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/Internals.cpp
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Misc/WebNSUserDefaultsExtras.mm