[Mac] "automatic" track selection should only select a track that matches user language
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Apr 2013 20:29:58 +0000 (20:29 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 Apr 2013 20:29:58 +0000 (20:29 +0000)
commit9660124b6320d147dcc0ea4bae6fb5f49a0be125
treea22f5ec21d211d20cede7763cd7f36b796abc483
parente03d7084f380809fd91a4adb1f3e387918fad699
[Mac] "automatic" track selection should only select a track that matches user language
https://bugs.webkit.org/show_bug.cgi?id=114976

Reviewed by Jer Noble.

Source/WebCore:

Test: media/track/track-automatic-subtitles.html

* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): When in "automatic" mode, only
    consider text tracks that match the user's preferred language when the primary audio track
    does not.

LayoutTests:

* media/track/track-automatic-subtitles-expected.txt: Added.
* media/track/track-automatic-subtitles.html: Added.
* platform/mac/TestExpectations: Skip track-user-preferences.html, the logic is no longer
     correct for the Mac port.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/track/track-automatic-subtitles-expected.txt [new file with mode: 0644]
LayoutTests/media/track/track-automatic-subtitles.html [new file with mode: 0644]
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/CaptionUserPreferencesMac.mm