Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[GTK] Add API to set preferred languages to WebKit2 GTK+
https://bugs.webkit.org/show_bug.cgi?id=90878 Source/WebCore: Unreviewed. Fix mac build. * WebCore.exp.in: Export WebCore::languageDidChange(). Source/WebKit2: Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_set_preferred_languages): Public API to set a list of preferred languages sorted from most desirable to least desirable. * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol. * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp: (testWebContextLanguages): (serverCallback): (beforeAll): (afterAll): * UIProcess/API/gtk/tests/WebViewTest.cpp: (resourceGetDataCallback): (WebViewTest::mainResourceData): Moved from TestWebKitWebContext to make it available to all WebViewTests. * UIProcess/API/gtk/tests/WebViewTest.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::userPreferredLanguagesChanged): Notify our observer that the languages have been overriden. * WebProcess/gtk/WebProcessGtk.cpp: (WebKit::buildAcceptLanguages): Helper function to build the accept languages as specified in RFC 2616. (WebKit::setSoupSessionAcceptLanguage): Set the accept-language property of the default SoupSession. (WebKit::languageChanged): Update the preferred languages in SoupSession. (WebKit::WebProcess::platformInitializeWebProcess): Add an observer to be notified when the list of preferred languages is updated. (WebKit::WebProcess::platformTerminate): Remove the observer added in platformInitializeWebProcess(). Canonical link: https://commits.webkit.org/112266@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
f97b43e
commit 10a4f66
Showing
11 changed files
with
218 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters