Changing the system language does not update navigator.language on macOS WK2.
Created attachment 422004 [details] Patch
Created attachment 422021 [details] Patch
Created attachment 422027 [details] Patch
Looks like my new api test is failing in the bot. The bot has CFPREFS_DIRECT_MODE disabled, which is a configuration I cannot test easily. I will try and figure it out. @Per: please let me know if the issue is obvious to you since you are more familiar with this code.
Created attachment 422082 [details] Patch
Created attachment 422083 [details] Patch
Created attachment 422104 [details] Patch
Created attachment 422116 [details] Patch
Comment on attachment 422116 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=422116&action=review R=me. > Tools/TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm:121 > + system([NSString stringWithFormat:@"defaults write NSGlobalDomain AppleLanguages '(\"en-GB\")'"].UTF8String); Does TestWebKitAPI need to be brought into the foreground for the preference change to be picked up, since the preference observer in the UI process is started when the UI process becomes foreground?
Comment on attachment 422116 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=422116&action=review > Tools/TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm:98 > + [[NSNotificationCenter defaultCenter] postNotificationName:NSApplicationDidBecomeActiveNotification object:NSApp userInfo:nil]; See here. >> Tools/TestWebKitAPI/Tests/WebKit/OverrideAppleLanguagesPreference.mm:121 >> + system([NSString stringWithFormat:@"defaults write NSGlobalDomain AppleLanguages '(\"en-GB\")'"].UTF8String); > > Does TestWebKitAPI need to be brought into the foreground for the preference change to be picked up, since the preference observer in the UI process is started when the UI process becomes foreground? Yes, it does. See my earlier comment.
Committed r273851: <https://commits.webkit.org/r273851> All reviewed patches have been landed. Closing bug and clearing flags on attachment 422116 [details].
<rdar://problem/75007471>
19 fast/text/international/system-language tests are failing after this change on Big Sur bots. See https://bugs.webkit.org/show_bug.cgi?id=222702
Reverted r273851 for reason: Caused some tests failures on macOS Big Sur Committed r273867 (234828@main): <https://commits.webkit.org/234828@main>
Created attachment 422239 [details] Patch
ChangeLog entry in Source/WebKitLegacy/mac/ChangeLog contains OOPS!.
Created attachment 422250 [details] Patch
Committed r273904: <https://commits.webkit.org/r273904> All reviewed patches have been landed. Closing bug and clearing flags on attachment 422250 [details].