Changeset 180984 in webkit


Ignore:
Timestamp:
Mar 3, 2015 7:33:42 PM (9 years ago)
Author:
ap@apple.com
Message:

[Mac] Track localized name follows locale instead of primary language
https://bugs.webkit.org/show_bug.cgi?id=142242
rdar://problem/20000365

Reviewed by Eric Carlson.

Source/WebCore:

  • page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Use the

language for localization, as CFBundle does.

LayoutTests:

  • platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt: This

test now successfully switches to Japanese, as originally intended.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r180978 r180984  
     12015-03-03  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [Mac] Track localized name follows locale instead of primary language
     4        https://bugs.webkit.org/show_bug.cgi?id=142242
     5        rdar://problem/20000365
     6
     7        Reviewed by Eric Carlson.
     8
     9        * platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt: This
     10        test now successfully switches to Japanese, as originally intended.
     11
    1122015-03-03  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt

    r180441 r180984  
    2626EXPECTED (trackMenuItems[0].textContent == 'Off') OK
    2727EXPECTED (trackMenuItems[1].textContent == 'Auto (Recommended)') OK
    28 EXPECTED (trackMenuItems[2].textContent == 'z (Japanese)') OK
    29 EXPECTED (trackMenuItems[3].textContent == 'v (English)') OK
    30 EXPECTED (trackMenuItems[4].textContent == 'x (English-Australia)') OK
     28EXPECTED (trackMenuItems[2].textContent == 'z (Japanese)'), OBSERVED 'z (日本語)' FAIL
     29EXPECTED (trackMenuItems[3].textContent == 'v (English)'), OBSERVED 'v (英語)' FAIL
     30EXPECTED (trackMenuItems[4].textContent == 'x (English-Australia)'), OBSERVED 'x (英語-オーストラリア)' FAIL
    3131EXPECTED (video.textTracks.length == '6') OK
    3232EXPECTED (trackMenuItems.length == '5') OK
  • trunk/Source/WebCore/ChangeLog

    r180979 r180984  
     12015-03-03  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [Mac] Track localized name follows locale instead of primary language
     4        https://bugs.webkit.org/show_bug.cgi?id=142242
     5        rdar://problem/20000365
     6
     7        Reviewed by Eric Carlson.
     8
     9        * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Use the
     10        language for localization, as CFBundle does.
     11
    1122015-03-03  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp

    r180127 r180984  
    593593    String trackLanguageIdentifier = track->language();
    594594
    595     RetainPtr<CFLocaleRef> currentLocale = adoptCF(CFLocaleCopyCurrent());
     595    RetainPtr<CFLocaleRef> currentLocale = adoptCF(CFLocaleCreate(kCFAllocatorDefault, defaultLanguage().createCFString().get()));
    596596    RetainPtr<CFStringRef> localeIdentifier = adoptCF(CFLocaleCreateCanonicalLocaleIdentifierFromString(kCFAllocatorDefault, trackLanguageIdentifier.createCFString().get()));
    597597    RetainPtr<CFStringRef> languageCF = adoptCF(CFLocaleCopyDisplayNameForPropertyValue(currentLocale.get(), kCFLocaleLanguageCode, localeIdentifier.get()));
Note: See TracChangeset for help on using the changeset viewer.