There is no need to copy the default AppleLanguage preference from the UI process to the WebContent process. The value of this key is available in the WebContent process using the preferences API.
Created attachment 402512 [details] Patch
Comment on attachment 402512 [details] Patch r=me
(In reply to Geoffrey Garen from comment #2) > Comment on attachment 402512 [details] > Patch > > r=me Thanks for reviewing!
Comment on attachment 402512 [details] Patch It looks like you are reverting my fix from a few days ago.
Comment on attachment 402512 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=402512&action=review > Source/WebKit/UIProcess/WebProcessProxy.cpp:-321 > - overrideLanguages = platformOverrideLanguages(); With this change, if a user did: dvdo defaults write com.apple.Safari AppleLanguages '("en-US", "fr-FR")' navigator.languages would not be impacted by the Safari user default anymore. We need to read the UIProcess UserDefault for AppleLanguages here, send it over XPC and then set AppleLanguages to this value in the WebProcess.
(In reply to Chris Dumez from comment #5) > Comment on attachment 402512 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=402512&action=review > > > Source/WebKit/UIProcess/WebProcessProxy.cpp:-321 > > - overrideLanguages = platformOverrideLanguages(); > > With this change, if a user did: > dvdo defaults write com.apple.Safari AppleLanguages '("en-US", "fr-FR")' > > navigator.languages would not be impacted by the Safari user default > anymore. We need to read the UIProcess UserDefault for AppleLanguages here, > send it over XPC and then set AppleLanguages to this value in the WebProcess. Right, I see how this change would break that. Thanks for reviewing!