[webkit-changes] [WebKit/WebKit] f2599a: REGRESSION (234750 at main): [GTK][WPE] preferred lan...
Olivier Blin
noreply at github.com
Fri Feb 2 12:58:27 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f2599adbe88142f918a4302fdde68d4a01ba9e2a
https://github.com/WebKit/WebKit/commit/f2599adbe88142f918a4302fdde68d4a01ba9e2a
Author: Olivier Blin <olivier.blin at softathome.com>
Date: 2024-02-02 (Fri, 02 Feb 2024)
Changed paths:
M Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp
Log Message:
-----------
REGRESSION (234750 at main): [GTK][WPE] preferred language not passed to NetworkProcess if set in WebContext before creating WebView
https://bugs.webkit.org/show_bug.cgi?id=268479
Reviewed by Adrian Perez de Castro.
In GLib ports, since 234750 at main, the user preferred language is not
properly passed to the NetworkProcess if it is set in WebContext
before creating the WebView.
This causes a wrong Accept-Language header in HTTP requests sent with libsoup.
The webkit_web_context_set_preferred_languages() API can be called
before passing the WebContext at WebView creation.
Since 234750 at main, this function calls the setOverrideLanguages()
WebProcessPool API instead of the overrideUserPreferredLanguages() WTF API.
So WebProcessPool::platformInitializeNetworkProcess() could not get the
real preferred language from the userPreferredLanguages() WTF API.
Instead, the NetworkProcess creation should use the overrideLanguages()
WebProcessPool API, like already done for the WebProcess creation
parameters (see also 226031 at main).
Keep userPreferredLanguages() as a fallback to get the default
language from platformLanguage() in WTF::LanguageUnix.
* Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
Canonical link: https://commits.webkit.org/274011@main
More information about the webkit-changes
mailing list