Bug 225994

Summary: [Modern Media Controls] don't add the language when generating a display name for a `TrackBase` if it's in the user's default language
Product: WebKit Reporter: Devin Rousso <hi>
Component: MediaAssignee: Devin Rousso <hi>
Status: RESOLVED MOVED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, hi, jer.noble, peng.liu6, philipj, sergio
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=225900
https://bugs.webkit.org/show_bug.cgi?id=226038
Attachments:
Description Flags
Patch none

Description Devin Rousso 2021-05-19 16:34:47 PDT
.
Comment 1 Devin Rousso 2021-05-19 17:12:17 PDT
Created attachment 429117 [details]
Patch
Comment 2 Eric Carlson 2021-05-20 10:30:32 PDT
Comment on attachment 429117 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=429117&action=review

> Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp:587
> +        if (language.isEmpty() || label.contains(language) || userPreferredLanguages().contains(trackLanguageIdentifier))

`userPreferredLanguages().contains` _should_ include all of the user's configured languages (modulo the change made last year), not just the preferred language, so either this test is wrong or the bug title is wrong.
Comment 3 Devin Rousso 2021-05-20 11:12:36 PDT
Comment on attachment 429117 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=429117&action=review

>> Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp:587
>> +        if (language.isEmpty() || label.contains(language) || userPreferredLanguages().contains(trackLanguageIdentifier))
> 
> `userPreferredLanguages().contains` _should_ include all of the user's configured languages (modulo the change made last year), not just the preferred language, so either this test is wrong or the bug title is wrong.

I'm working on fixing this now :)
Comment 4 Devin Rousso 2021-05-20 12:47:47 PDT
I'll handle this in <https://webkit.org/b/226038>