Changeset 147000 in webkit


Ignore:
Timestamp:
Mar 27, 2013 11:33:16 AM (11 years ago)
Author:
eric.carlson@apple.com
Message:

[Mac] Text track menu items sometimes labeled incorrectly
https://bugs.webkit.org/show_bug.cgi?id=113406

Reviewed by Jer Noble.

Source/WebCore:

media/video-controls-captions-trackmenu-localized.html was updated to test this.

  • page/CaptionUserPreferencesMac.mm:

(WebCore::trackDisplayName): Use the 'label' attribute for the menu text when necessary.

LayoutTests:

  • media/video-controls-captions-trackmenu-localized.html:
  • platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r146999 r147000  
    1 2013-03-27  Sergio Villar Senin  <svillar@igalia.com>
    2 
    3         Inserting a blank (" ") at the end of a line does not insert anything in Overtype mode
    4         https://bugs.webkit.org/show_bug.cgi?id=113413
    5 
    6         Reviewed by Ryosuke Niwa.
    7 
    8         Updated the test to include the case of inserting a whitespace
    9         both in the middle or at the end of a line.
    10 
    11         * editing/execCommand/overtype-expected.txt:
    12         * editing/execCommand/overtype.html:
     12013-03-27  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Mac] Text track menu items sometimes labeled incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=113406
     5
     6        Reviewed by Jer Noble.
     7
     8        * media/video-controls-captions-trackmenu-localized.html:
     9        * platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt:
    1310
    14112013-03-27  Zan Dobersek  <zdobersek@igalia.com>
  • trunk/LayoutTests/media/video-controls-captions-trackmenu-localized.html

    r146380 r147000  
    4545
    4646            item = captionsEntries[2];
    47             consoleWrite("<br>Third item in captions menu should be labelled 'Unknown SDH'");
    48             testExpected("item.textContent", "Unknown SDH");
     47            consoleWrite("<br>Third item in captions menu should be labelled 'Laugh Track (English-United States)'");
     48            testExpected("item.textContent", "Laugh Track (English-United States)");
    4949
    5050            item = captionsEntries[3];
    51             consoleWrite("<br>Fourth item in captions menu should be labelled 'Unknown'");
    52             testExpected("item.textContent", "Unknown");
     51            consoleWrite("<br>Fourth item in captions menu should be labelled 'Unknown SDH'");
     52            testExpected("item.textContent", "Unknown SDH");
    5353
    5454            endTest();
     
    6868        <video width="500" height="300" controls>
    6969            <track kind="captions" src="track/captions-webvtt/captions-fast.vtt">
    70             <track kind="subtitles" src="track/captions-webvtt/captions-fast.vtt">
     70            <track kind="subtitles" src="track/captions-webvtt/captions-fast.vtt" label="Laugh Track" srclang="en-US">
    7171        </video>
    7272    </body>
  • trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt

    r146380 r147000  
    1212
    1313Second item in captions menu should be labelled 'English CC'
    14 EXPECTED (item.textContent == 'English CC'), OBSERVED 'Unknown SDH' FAIL
     14EXPECTED (item.textContent == 'English CC'), OBSERVED 'Laugh Track (English-United States)' FAIL
    1515
    16 Third item in captions menu should be labelled 'Unknown SDH'
    17 EXPECTED (item.textContent == 'Unknown SDH'), OBSERVED 'Unknown' FAIL
     16Third item in captions menu should be labelled 'Laugh Track (English-United States)'
     17EXPECTED (item.textContent == 'Laugh Track (English-United States)'), OBSERVED 'Unknown SDH' FAIL
    1818
    19 Fourth item in captions menu should be labelled 'Unknown'
     19Fourth item in captions menu should be labelled 'Unknown SDH'
    2020TypeError: 'undefined' is not an object (evaluating 'item.textContent')
    2121END OF TEST
  • trunk/Source/WebCore/ChangeLog

    r146999 r147000  
     12013-03-27  Eric Carlson  <eric.carlson@apple.com>
     2
     3        [Mac] Text track menu items sometimes labeled incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=113406
     5
     6        Reviewed by Jer Noble.
     7
     8        media/video-controls-captions-trackmenu-localized.html was updated to test this.
     9
     10        * page/CaptionUserPreferencesMac.mm:
     11        (WebCore::trackDisplayName): Use the 'label' attribute for the menu text when necessary.
     12
    1132013-03-27  Sergio Villar Senin  <svillar@igalia.com>
    214
  • trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm

    r146647 r147000  
    537537    String language = languageCF.get();
    538538    if (!label.isEmpty()) {
    539         if (!language.isEmpty() && !label.contains(language)) {
     539        if (language.isEmpty() || label.contains(language)) {
     540            displayName.append(label);
     541        } else {
    540542            RetainPtr<CFDictionaryRef> localeDict(AdoptCF, CFLocaleCreateComponentsFromLocaleIdentifier(kCFAllocatorDefault, localeIdentifier.get()));
    541543            if (localeDict) {
Note: See TracChangeset for help on using the changeset viewer.