Bug 225994 - [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
Summary: [Modern Media Controls] don't add the language when generating a display name...
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-19 16:34 PDT by Devin Rousso
Modified: 2021-05-20 12:47 PDT (History)
8 users (show)

See Also:


Attachments
Patch (1.53 KB, patch)
2021-05-19 17:12 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>