REGRESSION (r172975): navigator.language unable to tell region for Traditional Chines...
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jun 2015 04:25:18 +0000 (04:25 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Jun 2015 04:25:18 +0000 (04:25 +0000)
commitae32de328ca142f280a386e02229148423a8600f
treeacf9ef6143c67e6b138f22fc2e2cece67766fd5a
parented7e1ede67d8709a415604d1421198e7520deebe
REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
https://bugs.webkit.org/show_bug.cgi?id=146121
rdar://problem/21395180

Reviewed by Darin Adler.

Source/WebCore:

Revert to previous behavior, which is wrong in many ways, but not as wrong as the new one.

* platform/mac/Language.mm:
(WebCore::httpStyleLanguageCode):
(WebCore::platformUserPreferredLanguages):
* platform/spi/cf/CFBundleSPI.h:

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/NavigatorLanguage.mm: Added.
(-[NavigatorLanguageDelegate webView:didFinishLoadForFrame:]):
(TestWebKitAPI::overrideAppleLanguages):
(TestWebKitAPI::languageForSystemLanguage):
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/mac/Language.mm
Source/WebCore/platform/spi/cf/CFBundleSPI.h
Tools/ChangeLog
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/mac/NavigatorLanguage.mm [new file with mode: 0644]