WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
188111
REGRESSION(
r263094
): [GTK][WPE] API test /webkit/WebKitWebContext/languages is failing
https://bugs.webkit.org/show_bug.cgi?id=188111
Summary
REGRESSION(r263094): [GTK][WPE] API test /webkit/WebKitWebContext/languages i...
Michael Catanzaro
Reported
2018-07-27 12:23:38 PDT
API test /webkit/WebKitWebContext/languages always fails: /webkit/WebKitWebContext/languages: FAIL ERROR:/home/slave/webkitgtk/gtk-linux-64-release/build/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:476:void testWebContextLanguages(WebViewTest*, gconstpointer): assertion failed: (!javascriptResult)
Attachments
Patch
(10.68 KB, patch)
2021-02-24 03:09 PST
,
Carlos Garcia Campos
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2021-01-21 09:26:27 PST
Nowadays it fails even earlier: ERROR:../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:359:void testWebContextLanguages(WebViewTest*, gconstpointer): assertion failed (mainResourceDataSize == strlen(expectedLanguages)): (5 == 25) Problem is the language is set to "en-US" rather than the expected "en,ES-es;q=0.90,dE;q=0.80".
Carlos Garcia Campos
Comment 2
2021-02-24 02:44:04 PST
(In reply to Michael Catanzaro from
comment #1
)
> Nowadays it fails even earlier: > > ERROR:../../Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp: > 359:void testWebContextLanguages(WebViewTest*, gconstpointer): assertion > failed (mainResourceDataSize == strlen(expectedLanguages)): (5 == 25) > > Problem is the language is set to "en-US" rather than the expected > "en,ES-es;q=0.90,dE;q=0.80".
This one is fixed by
bug #222347
Carlos Garcia Campos
Comment 3
2021-02-24 03:09:34 PST
Created
attachment 421392
[details]
Patch
EWS Watchlist
Comment 4
2021-02-24 03:10:37 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Michael Catanzaro
Comment 5
2021-02-24 06:56:07 PST
Comment on
attachment 421392
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=421392&action=review
I was a bit confused how we wound up with a bug from 2018 fixing a regression from 2020. I see you just repurposed this bug to fix the new problem. OK.
> Source/WebKit/ChangeLog:9 > + are no loner sending the new overrides to the web process. Instead of calling overrideUserPreferredLanguages()
no longer
Michael Catanzaro
Comment 6
2021-02-24 06:56:25 PST
Hi Chris, could you review this one please?
Carlos Garcia Campos
Comment 7
2021-02-24 22:54:50 PST
I didn't know this bug was so old.
Michael Catanzaro
Comment 8
2021-02-25 08:09:02 PST
Comment on
attachment 421392
[details]
Patch Anyway it looks good to me, but requires owner approval (ideally from Chris).
Chris Dumez
Comment 9
2021-02-25 08:48:46 PST
Comment on
attachment 421392
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=421392&action=review
> Source/WebKit/UIProcess/WebProcessPool.cpp:-308 > - addLanguageChangeObserver(this, languageChanged);
I don't understand why we are getting rid of the language change observer in the UIProcess. Seems like we would want to know and notify the WebProcesses if the user changed the language, no?
Carlos Garcia Campos
Comment 10
2021-02-25 23:10:24 PST
(In reply to Chris Dumez from
comment #9
)
> Comment on
attachment 421392
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=421392&action=review
> > > Source/WebKit/UIProcess/WebProcessPool.cpp:-308 > > - addLanguageChangeObserver(this, languageChanged); > > I don't understand why we are getting rid of the language change observer in > the UIProcess. Seems like we would want to know and notify the WebProcesses > if the user changed the language, no?
Because after this patch overrideUserPreferredLanguages() is no longer called from the UI process. Right now is only called from the GLib API, unless I'm missing something.
Carlos Garcia Campos
Comment 11
2021-03-01 03:12:44 PST
Chris, are you ok with this then?
Chris Dumez
Comment 12
2021-03-02 08:27:07 PST
(In reply to Carlos Garcia Campos from
comment #11
)
> Chris, are you ok with this then?
I will look into this today. If this is not used on macOS then how do we detect and apply language change on macOS? macOS definitely has to do it in the UIProcess (and not WebProcess) due to sandboxing reasons). Seems like either macOS uses this or it doesn't and we may have a bug to fix (or there is another mechanism that macOS uses and that I am missing).
Chris Dumez
Comment 13
2021-03-02 10:16:23 PST
Comment on
attachment 421392
[details]
Patch LGTM. The WebProcess is able to listen to change notification on macOS.
EWS
Comment 14
2021-03-02 10:25:43 PST
Committed
r273735
: <
https://commits.webkit.org/r273735
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 421392
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug