Changeset 148907 in webkit
- Timestamp:
- Apr 22, 2013 1:29:58 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r148898 r148907 1 2013-04-22 Eric Carlson <eric.carlson@apple.com> 2 3 [Mac] "automatic" track selection should only select a track that matches user language 4 https://bugs.webkit.org/show_bug.cgi?id=114976 5 6 Reviewed by Jer Noble. 7 8 * media/track/track-automatic-subtitles-expected.txt: Added. 9 * media/track/track-automatic-subtitles.html: Added. 10 * platform/mac/TestExpectations: Skip track-user-preferences.html, the logic is no longer 11 correct for the Mac port. 12 1 13 2013-04-22 Andy Estes <aestes@apple.com> 2 14 -
trunk/LayoutTests/platform/mac/TestExpectations
r148722 r148907 1368 1368 webkit.org/b/112492 media/track/track-prefer-captions.html [ Failure Pass ] 1369 1369 1370 # The logic in this test is no longer correct for Apple ports 1371 webkit.org/b/112492 media/track/track-user-preferences.html [ Skip ] 1372 1370 1373 webkit.org/b/104104 fast/overflow/scrollbar-click-retains-focus.html [ Failure ] 1371 1374 -
trunk/Source/WebCore/ChangeLog
r148906 r148907 1 2013-04-22 Eric Carlson <eric.carlson@apple.com> 2 3 [Mac] "automatic" track selection should only select a track that matches user language 4 https://bugs.webkit.org/show_bug.cgi?id=114976 5 6 Reviewed by Jer Noble. 7 8 Test: media/track/track-automatic-subtitles.html 9 10 * page/CaptionUserPreferencesMac.mm: 11 (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): When in "automatic" mode, only 12 consider text tracks that match the user's preferred language when the primary audio track 13 does not. 14 1 15 2013-04-22 Jer Noble <jer.noble@apple.com> 2 16 -
trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm
r148285 r148907 636 636 return 0; 637 637 638 String audioTrackLanguage; 638 String textTrackLanguage = track->language(); 639 if (textTrackLanguage.isEmpty()) 640 return 0; 639 641 640 642 Vector<String> languageList; 641 643 languageList.reserveCapacity(1); 642 644 645 String audioTrackLanguage; 643 646 if (testingMode()) 644 647 audioTrackLanguage = primaryAudioTrackLanguageOverride(); … … 650 653 651 654 if (displayMode == Automatic) { 652 // Only enable a text track if the current audio track is not in the user's preferred language.653 655 languageList.append(defaultLanguage()); 656 657 // Only enable a text track if the current audio track is NOT in the user's preferred language ... 654 658 size_t offset = indexOfBestMatchingLanguageInList(audioTrackLanguage, languageList); 659 if (!offset) 660 return 0; 661 662 // and the text track matches the user's preferred language. 663 offset = indexOfBestMatchingLanguageInList(textTrackLanguage, languageList); 655 664 if (offset) 656 665 return 0; 657 666 } else { 658 // Only consider a forced-only track if it is in the same language as the primary audio track.659 String trackLanguage = track->language();660 if (trackLanguage.isEmpty())661 return 0;662 663 667 languageList.append(audioTrackLanguage); 664 size_t offset = indexOfBestMatchingLanguageInList(trackLanguage, languageList); 668 size_t offset = indexOfBestMatchingLanguageInList(textTrackLanguage, languageList); 669 670 // Only consider a forced-only track if it IS in the same language as the primary audio track. 665 671 if (offset) 666 672 return 0;
Note: See TracChangeset
for help on using the changeset viewer.