Changeset 141864 in webkit


Ignore:
Timestamp:
Feb 5, 2013 12:03:22 AM (11 years ago)
Author:
dino@apple.com
Message:

[Mac] Captions menu should indicate language and type of track
https://bugs.webkit.org/show_bug.cgi?id=108882

Reviewed by Eric Carlson.

Source/WebCore:

On Mac, we want a specific format for menu items in a caption list. Since
other ports might want different formats, move the generation of the label
into CaptionsUserPreferences where it can be overridden.

This required CaptionsUserPreferences to become public on the PageGroup, so
it could be used when creating the menu. Also, since CaptionsUserPreferences
was hidden on Mountain Lion and below, be a little more specific about
which pieces can be seen on which builds.

Covered by existing media/video-controls-captions-trackmenu tests.

  • English.lproj/Localizable.strings: Remove textTrackClosedCaptionsText.
  • html/shadow/MediaControlElements.cpp:

(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Build only

one section and get the track's display name from the user preferences.

  • page/CaptionUserPreferences.h:

(WebCore::CaptionUserPreferences::displayNameForTrack): Default implementation of

virtual function that provides a label for a captions menu item.

  • page/CaptionUserPreferencesMac.h: Add the new virtual function, and expose just

a bit of this class outside 10.9 builds.

  • page/CaptionUserPreferencesMac.mm:

(WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac): Guard features for system version.
(WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac): Ditto.
(WebCore::CaptionUserPreferencesMac::displayNameForTrack): New OS X-specific method that

returns a string for the menu label.

  • page/PageGroup.cpp:

(WebCore::PageGroup::captionPreferences): Unguard for system version.

  • page/PageGroup.h: Make captionPreferences public.
  • platform/LocalizedStrings.cpp: Remove textTrackClosedCaptionsText - not needed any more.
  • platform/LocalizedStrings.h: Remove textTrackClosedCaptionsText.

LayoutTests:

Now that the captions menu can be labelled in a platform-specific way, move
the results into the platform directory. At the moment, they are skipped
everywhere but Mac. Also update the tests to the new menu structure, which
only has a single list of entries.

  • media/video-controls-captions-trackmenu-localized.html: Updated for new menu structure.
  • media/video-controls-captions-trackmenu-expected.txt: Removed.
  • media/video-controls-captions-trackmenu-localized-expected.txt: Removed.
  • media/video-controls-captions-trackmenu-sorted-expected.txt: Removed.
  • media/video-controls-captions-trackmenu-sorted.html: Updated for new menu structure.
  • media/video-controls-captions-trackmenu.html: Updated for new menu structure.
  • platform/mac/media/video-controls-captions-trackmenu-expected.txt: New platform specific results.
  • platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt: Ditto.
  • platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt: Ditto.
Location:
trunk
Files:
1 added
1 deleted
14 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r141861 r141864  
     12013-02-04  Dean Jackson  <dino@apple.com>
     2
     3        [Mac] Captions menu should indicate language and type of track
     4        https://bugs.webkit.org/show_bug.cgi?id=108882
     5
     6        Reviewed by Eric Carlson.
     7
     8        Now that the captions menu can be labelled in a platform-specific way, move
     9        the results into the platform directory. At the moment, they are skipped
     10        everywhere but Mac. Also update the tests to the new menu structure, which
     11        only has a single list of entries.
     12
     13        * media/video-controls-captions-trackmenu-localized.html: Updated for new menu structure.
     14        * media/video-controls-captions-trackmenu-expected.txt: Removed.
     15        * media/video-controls-captions-trackmenu-localized-expected.txt: Removed.
     16        * media/video-controls-captions-trackmenu-sorted-expected.txt: Removed.
     17        * media/video-controls-captions-trackmenu-sorted.html: Updated for new menu structure.
     18        * media/video-controls-captions-trackmenu.html: Updated for new menu structure.
     19        * platform/mac/media/video-controls-captions-trackmenu-expected.txt: New platform specific results.
     20        * platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt: Ditto.
     21        * platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt: Ditto.
     22
    1232013-02-04  Hajime Morrita <morrita@google.com>
    224
  • trunk/LayoutTests/media/video-controls-captions-trackmenu-localized.html

    r138283 r141864  
    99        <script>
    1010
    11         var captionsSection;
     11        var trackListSection;
    1212        var item;
    1313
     
    2121                return;
    2222
    23             // Track list should have two <section> elements.
    24             var trackListSections = trackListElement.querySelectorAll("h3");
    25             if (!trackListSections || trackListSections.length != 2) {
    26                 failTest("There should be two section elements in track list menu");
     23            trackListSection = trackListElement.querySelector("h3");
     24            if (!trackListSection) {
     25                failTest("There should be a single section element in track list menu");
    2726                return;
    2827            }
    2928
    30             captionsSection = trackListSections[0];
    31             logConsole("First section should be labelled 'Closed Captions'");
    32             testExpected("captionsSection.textContent", "Closed Captions");
    33             captionsSection = trackListSections[1];
    34             logConsole("Second section should be labelled 'Subtitles'");
    35             testExpected("captionsSection.textContent", "Subtitles");
     29            logConsole("Heading should be labelled 'Subtitles'");
     30            testExpected("trackListSection.textContent", "Subtitles");
    3631
    3732            var captionsEntries = trackListElement.querySelectorAll("li");
  • trunk/LayoutTests/media/video-controls-captions-trackmenu-sorted.html

    r138283 r141864  
    1616                if (!trackListElement)
    1717                    return;
    18                 // Track list should have two <ul> elements.
    19                 var trackListSections = trackListElement.querySelectorAll("ul");
    20                 if (!trackListSections || trackListSections.length != 2) {
    21                     failTest("There should be two ul elements in track list menu");
     18                var trackListSection = trackListElement.querySelector("ul");
     19                if (!trackListSection) {
     20                    failTest("There should be a ul element in track list menu");
    2221                    return;
    2322                }
    24                 for (var i = 0; i < trackListSections.length; i++) {
    25                     consoleWrite("<br>*** Test menu section " + i + ".");
    26                     var lastTrackLabel = null;
    27                     var trackListItems = trackListSections[i].querySelectorAll("li");
    28                     if (!trackListItems || trackListItems.length != 5) {
    29                         failTest("There should be five li elements in this section");
    30                         return;
     23                var lastTrackLabel = null;
     24                var trackListItems = trackListSection.querySelectorAll("li");
     25                if (!trackListItems || trackListItems.length != 7) {
     26                    failTest("There should be seven li elements in the menu");
     27                    return;
     28                }
     29                for (var j = 0; j < trackListItems.length; j++) {
     30                    var item = trackListItems[j];
     31                    if (j == 0)
     32                        logResult(item.textContent == "Off", "First item should be labelled off");
     33                    else {
     34                        if (lastTrackLabel)
     35                            logResult(item.textContent > lastTrackLabel, lastTrackLabel + " comes before " + item.textContent);
     36                        else
     37                            logResult(true, item.textContent + " is the first real item in the list");
     38                        lastTrackLabel = item.textContent;
    3139                    }
    32                     for (var j = 0; j < trackListItems.length; j++) {
    33                         var item = trackListItems[j];
    34                         if (j == 0)
    35                             logResult(item.textContent == "Off", "First item should be labelled off");
    36                         else {
    37                             if (lastTrackLabel)
    38                                 logResult(item.textContent > lastTrackLabel, lastTrackLabel + " comes before " + item.textContent);
    39                             else
    40                                 logResult(true, item.textContent + " is the first real item in the list");
    41                             lastTrackLabel = item.textContent;
    42                         }
    43                     }
    44                     consoleWrite("Menu section " + i + " was ok.<br>");
    4540                }
    4641                endTest();
     
    6257            <track label="b" kind="captions" src="track/captions-webvtt/captions-fast.vtt" srclang="en-au">
    6358            <track label="a" kind="captions" src="track/captions-webvtt/captions-fast.vtt" srclang="en">
    64             <track label="d" kind="captions" src="track/captions-webvtt/captions-fast.vtt" srclang="ja">
    6559            <track label="b" kind="subtitles" src="track/captions-webvtt/captions-fast.vtt" srclang="ja">
    6660            <track label="a" kind="subtitles" src="track/captions-webvtt/captions-fast.vtt" srclang="en-au">
    6761            <track label="c" kind="subtitles" src="track/captions-webvtt/captions-fast.vtt" srclang="en">
    68             <track label="d" kind="subtitles" src="track/captions-webvtt/captions-fast.vtt" srclang="ja">
    6962        </video>
    7063    </body>
  • trunk/LayoutTests/media/video-controls-captions-trackmenu.html

    r138322 r141864  
    2323                if (!trackListElement)
    2424                    return;
    25                 // Track list should have a <ul> with five <li> children (One of them is "Off").
     25                // Track list should have a <ul> with <li> children (One of them is "Off").
    2626                var trackList = trackListElement.querySelector("ul");
    2727                if (!trackList) {
     
    7171                testExpected("video.textTracks.length", 4);
    7272                consoleWrite("Track 0 should be showing");
    73                 testExpected("video.textTracks[0].mode", "disabled");
     73                testExpected("video.textTracks[0].mode", "showing");
    7474                consoleWrite("Track 1 should be disabled");
    75                 testExpected("video.textTracks[1].mode", "showing");
     75                testExpected("video.textTracks[1].mode", "disabled");
    7676                consoleWrite("Track 2 should be disabled");
    7777                testExpected("video.textTracks[2].mode", "disabled");
  • trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-expected.txt

    r141862 r141864  
    1313EXPECTED (video.textTracks.length == '4') OK
    1414Track 0 should be showing
    15 EXPECTED (video.textTracks[0].mode == 'disabled') OK
     15EXPECTED (video.textTracks[0].mode == 'showing') OK
    1616Track 1 should be disabled
    17 EXPECTED (video.textTracks[1].mode == 'showing') OK
     17EXPECTED (video.textTracks[1].mode == 'disabled') OK
    1818Track 2 should be disabled
    1919EXPECTED (video.textTracks[2].mode == 'disabled') OK
  • trunk/LayoutTests/platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt

    r141862 r141864  
    55*** Set the user language preference.
    66RUN(internals.setUserPreferredLanguages(['en']))
    7 EXPECTED (captionsSection.textContent == 'Closed Captions') OK
    8 EXPECTED (captionsSection.textContent == 'Subtitles') OK
     7EXPECTED (trackListSection.textContent == 'Subtitles') OK
    98EXPECTED (item.textContent == 'Off') OK
    109EXPECTED (item.textContent == 'No label') OK
  • trunk/Source/WebCore/ChangeLog

    r141862 r141864  
     12013-02-04  Dean Jackson  <dino@apple.com>
     2
     3        [Mac] Captions menu should indicate language and type of track
     4        https://bugs.webkit.org/show_bug.cgi?id=108882
     5
     6        Reviewed by Eric Carlson.
     7
     8        On Mac, we want a specific format for menu items in a caption list. Since
     9        other ports might want different formats, move the generation of the label
     10        into CaptionsUserPreferences where it can be overridden.
     11
     12        This required CaptionsUserPreferences to become public on the PageGroup, so
     13        it could be used when creating the menu. Also, since CaptionsUserPreferences
     14        was hidden on Mountain Lion and below, be a little more specific about
     15        which pieces can be seen on which builds.
     16
     17        Covered by exisiting media/video-controls-captions-trackmenu tests.
     18
     19        * English.lproj/Localizable.strings: Remove textTrackClosedCaptionsText.
     20        * html/shadow/MediaControlElements.cpp:
     21        (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Build only
     22            one section and get the track's display name from the user preferences.
     23        * page/CaptionUserPreferences.h:
     24        (WebCore::CaptionUserPreferences::displayNameForTrack): Default implementation of
     25            virtual function that provides a label for a captions menu item.
     26        * page/CaptionUserPreferencesMac.h: Add the new virtual function, and expose just
     27            a bit of this class outside 10.9 builds.
     28        * page/CaptionUserPreferencesMac.mm:
     29        (WebCore::CaptionUserPreferencesMac::CaptionUserPreferencesMac): Guard features for system version.
     30        (WebCore::CaptionUserPreferencesMac::~CaptionUserPreferencesMac): Ditto.
     31        (WebCore::CaptionUserPreferencesMac::displayNameForTrack): New OS X-specific method that
     32            returns a string for the menu label.
     33        * page/PageGroup.cpp:
     34        (WebCore::PageGroup::captionPreferences): Unguard for system version.
     35        * page/PageGroup.h: Make captionPreferences public.
     36        * platform/LocalizedStrings.cpp: Remove textTrackClosedCaptionsText - not needed any more.
     37        * platform/LocalizedStrings.h: Remove textTrackClosedCaptionsText.
     38
    1392013-02-04  Kentaro Hara  <haraken@chromium.org>
    240
  • trunk/Source/WebCore/English.lproj/Localizable.strings

    r140974 r141864  
    9898"Click to exit full screen mode" = "Click to exit full screen mode";
    9999
    100 /* Menu section heading for closed captions */
    101 "Closed Captions" = "Closed Captions";
    102 
    103100/* WebKitErrorCannotShowMIMEType description */
    104101"Content with specified MIME type can’t be shown" = "Content with specified MIME type can’t be shown";
     
    611608"current movie time in seconds" = "current movie time in seconds";
    612609
    613 /* definition detail */
     610/* role description of ARIA definition role */
    614611"definition" = "definition";
    615612
     
    872869"temporarily redirected" = "temporarily redirected";
    873870
    874 /* term word of a definition */
     871/* term word of a description list */
    875872"term" = "term";
    876873
  • trunk/Source/WebCore/html/shadow/MediaControlElements.cpp

    r141790 r141864  
    3333#include "MediaControlElements.h"
    3434
     35#include "CaptionUserPreferences.h"
    3536#include "DOMTokenList.h"
    3637#include "EventNames.h"
     
    872873
    873874    Document* doc = document();
     875    CaptionUserPreferences* captionsUserPreferences = doc->page()->group().captionPreferences();
    874876
    875877    RefPtr<Element> captionsSection = doc->createElement(sectionTag, ASSERT_NO_EXCEPTION);
    876878    RefPtr<Element> captionsHeader = doc->createElement(h3Tag, ASSERT_NO_EXCEPTION);
    877     captionsHeader->appendChild(doc->createTextNode(textTrackClosedCaptionsText()));
     879    captionsHeader->appendChild(doc->createTextNode(textTrackSubtitlesText()));
    878880    captionsSection->appendChild(captionsHeader);
    879881    RefPtr<Element> captionsMenuList = doc->createElement(ulTag, ASSERT_NO_EXCEPTION);
    880 
    881     RefPtr<Element> subtitlesSection = doc->createElement(sectionTag, ASSERT_NO_EXCEPTION);
    882     RefPtr<Element> subtitlesHeader = doc->createElement(h3Tag, ASSERT_NO_EXCEPTION);
    883     subtitlesHeader->appendChild(doc->createTextNode(textTrackSubtitlesText()));
    884     subtitlesSection->appendChild(subtitlesHeader);
    885     RefPtr<Element> subtitlesMenuList = doc->createElement(ulTag, ASSERT_NO_EXCEPTION);
    886882
    887883    RefPtr<Element> trackItem;
     
    893889    m_menuItems.append(trackItem);
    894890
    895     trackItem = doc->createElement(liTag, ASSERT_NO_EXCEPTION);
    896     trackItem->appendChild(doc->createTextNode(textTrackOffText()));
    897     trackItem->setAttribute(trackIndexAttributeName(), textTracksOffAttrValue, ASSERT_NO_EXCEPTION);
    898     subtitlesMenuList->appendChild(trackItem);
    899     m_menuItems.append(trackItem);
    900 
    901     bool hasCaptions = false;
    902     bool hasSubtitles = false;
    903 
    904891    for (unsigned i = 0, length = trackList->length(); i < length; ++i) {
    905892        TextTrack* track = trackList->item(i);
     
    912899        trackItem->setAttribute(trackIndexAttributeName(), String::number(i), ASSERT_NO_EXCEPTION);
    913900
    914         AtomicString labelText = track->label();
    915         if (labelText.isNull() || labelText.isEmpty())
    916             labelText = displayNameForLanguageLocale(track->language());
    917         if (labelText.isNull() || labelText.isEmpty())
    918             labelText = textTrackNoLabelText();
    919         trackItem->appendChild(doc->createTextNode(labelText));
    920 
    921         if (track->kind() == track->captionsKeyword()) {
    922             hasCaptions = true;
    923             insertTextTrackMenuItemIntoSortedContainer(trackItem, captionsMenuList);
    924         }
    925         if (track->kind() == track->subtitlesKeyword()) {
    926             hasSubtitles = true;
    927             insertTextTrackMenuItemIntoSortedContainer(trackItem, subtitlesMenuList);
    928         }
     901        if (captionsUserPreferences)
     902            trackItem->appendChild(doc->createTextNode(captionsUserPreferences->displayNameForTrack(track)));
     903        else
     904            trackItem->appendChild(doc->createTextNode(track->label()));
     905
     906        insertTextTrackMenuItemIntoSortedContainer(trackItem, captionsMenuList);
    929907        m_menuItems.append(trackItem);
    930908    }
    931909
    932910    captionsSection->appendChild(captionsMenuList);
    933     subtitlesSection->appendChild(subtitlesMenuList);
    934 
    935     if (hasCaptions)
    936         appendChild(captionsSection);
    937     if (hasSubtitles)
    938         appendChild(subtitlesSection);
     911    appendChild(captionsSection);
    939912
    940913    updateDisplay();
  • trunk/Source/WebCore/page/CaptionUserPreferences.h

    r141790 r141864  
    3030
    3131#include "Language.h"
     32#include "LocalizedStrings.h"
     33#include "TextTrack.h"
    3234#include <wtf/PassOwnPtr.h>
    3335#include <wtf/text/AtomicString.h>
     
    6062    virtual Vector<String> preferredLanguages() const { return platformUserPreferredLanguages(); }
    6163
     64    virtual String displayNameForTrack(TextTrack* track) const
     65    {
     66        if (track->label().isEmpty() && track->language().isEmpty())
     67            return textTrackNoLabelText();
     68        if (!track->label().isEmpty())
     69            return track->label();
     70        return track->language();
     71    }
     72
    6273    PageGroup* pageGroup() { return m_pageGroup; }
    6374
  • trunk/Source/WebCore/page/CaptionUserPreferencesMac.h

    r141790 r141864  
    2727#define CaptionUserPreferencesMac_h
    2828
    29 #if ENABLE(VIDEO_TRACK) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     29#if ENABLE(VIDEO_TRACK)
    3030
    3131#include "CSSPropertyNames.h"
     
    4141    virtual ~CaptionUserPreferencesMac();
    4242
     43#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    4344    virtual bool userPrefersCaptions() const OVERRIDE;
    4445    virtual void setUserPrefersCaptions(bool) OVERRIDE;
     
    5354
    5455    void captionPreferencesChanged();
     56#endif
     57
     58    virtual String displayNameForTrack(TextTrack*) const OVERRIDE;
    5559
    5660private:
    5761    CaptionUserPreferencesMac(PageGroup*);
    5862
     63#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    5964    String captionsWindowCSS() const;
    6065    String captionsBackgroundCSS() const;
     
    7277    HashSet<CaptionPreferencesChangedListener*> m_captionPreferenceChangeListeners;
    7378    bool m_listeningForPreferenceChanges;
     79#endif
    7480};
    7581   
  • trunk/Source/WebCore/page/CaptionUserPreferencesMac.mm

    r141790 r141864  
    2626#import "config.h"
    2727
    28 #if ENABLE(VIDEO_TRACK) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     28#if ENABLE(VIDEO_TRACK)
    2929
    3030#import "CaptionUserPreferencesMac.h"
     
    3535#import "FloatConversion.h"
    3636#import "KURL.h"
     37#import "Language.h"
     38#import "LocalizedStrings.h"
     39#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    3740#import "MediaAccessibility/MediaAccessibility.h"
     41#endif
    3842#import "PageGroup.h"
    3943#import "SoftLinking.h"
     
    4246#import <wtf/RetainPtr.h>
    4347#import <wtf/text/StringBuilder.h>
     48
     49#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    4450
    4551SOFT_LINK_FRAMEWORK_OPTIONAL(MediaAccessibility)
     
    6369#define kMAXCaptionAppearanceSettingsChangedNotification getkMAXCaptionAppearanceSettingsChangedNotification()
    6470
     71#endif
     72
    6573using namespace std;
    6674
    6775namespace WebCore {
    6876
     77#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    6978static void userCaptionPreferencesChangedNotificationCallback(CFNotificationCenterRef, void* observer, CFStringRef, const void *, CFDictionaryRef)
    7079{
    7180    static_cast<CaptionUserPreferencesMac*>(observer)->captionPreferencesChanged();
    7281}
     82#endif
    7383
    7484CaptionUserPreferencesMac::CaptionUserPreferencesMac(PageGroup* group)
    7585    : CaptionUserPreferences(group)
     86#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    7687    , m_listeningForPreferenceChanges(false)
     88#endif
    7789{
    7890}
     
    8092CaptionUserPreferencesMac::~CaptionUserPreferencesMac()
    8193{
     94#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    8295    if (kMAXCaptionAppearanceSettingsChangedNotification)
    8396        CFNotificationCenterRemoveObserver(CFNotificationCenterGetLocalCenter(), this, kMAXCaptionAppearanceSettingsChangedNotification, NULL);
    84 }
    85 
     97#endif
     98}
     99
     100#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
    86101bool CaptionUserPreferencesMac::userPrefersCaptions() const
    87102{
     
    398413    return userPreferredLanguages;
    399414}
     415#endif
     416
     417String CaptionUserPreferencesMac::displayNameForTrack(TextTrack* track) const
     418{
     419    String label = track->label();
     420    String language = track->language();
     421    String preferredLanguage = defaultLanguage();
     422    StringBuilder displayName;
     423
     424    if (label.isEmpty() && language.isEmpty()) {
     425        displayName.append(textTrackNoLabelText());
     426        return displayName.toString();
     427    }
     428
     429    if (!label.isEmpty())
     430        displayName.append(label);
     431
     432    AtomicString localeDisplayName = displayNameForLanguageLocale(language);
     433    if (!label.contains(localeDisplayName)) {
     434        if (displayName.length() > 0)
     435            displayName.append(" ");
     436        displayName.append(localeDisplayName);
     437    }
     438
     439    if (track->kind() == track->captionsKeyword()) {
     440        if (track->isClosedCaptions())
     441            displayName.append(" CC");
     442        else
     443            displayName.append(" SDH");
     444    }
     445
     446    return displayName.toString();
     447}
    400448
    401449}
  • trunk/Source/WebCore/page/PageGroup.cpp

    r141790 r141864  
    4040
    4141#if ENABLE(VIDEO_TRACK)
    42 #if PLATFORM(MAC) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     42#if PLATFORM(MAC)
    4343#include "CaptionUserPreferencesMac.h"
    4444#else
     
    421421{
    422422    if (!m_captionPreferences)
    423 #if PLATFORM(MAC) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     423#if PLATFORM(MAC)
    424424        m_captionPreferences = CaptionUserPreferencesMac::create(this);
    425425#else
  • trunk/Source/WebCore/page/PageGroup.h

    r141790 r141864  
    115115        void registerForCaptionPreferencesChangedCallbacks(CaptionPreferencesChangedListener*);
    116116        void unregisterForCaptionPreferencesChangedCallbacks(CaptionPreferencesChangedListener*);
     117        CaptionUserPreferences* captionPreferences();
    117118#endif
    118119
     
    123124        void invalidatedInjectedStyleSheetCacheInAllFrames();
    124125 
    125 #if ENABLE(VIDEO_TRACK)
    126         CaptionUserPreferences* captionPreferences();
    127 #endif
    128126        String m_name;
    129127
  • trunk/Source/WebCore/platform/LocalizedStrings.cpp

    r140974 r141864  
    10161016
    10171017#if ENABLE(VIDEO_TRACK)
    1018 String textTrackClosedCaptionsText()
    1019 {
    1020     return WEB_UI_STRING("Closed Captions", "Menu section heading for closed captions");
    1021 }
    1022 
    10231018String textTrackSubtitlesText()
    10241019{
  • trunk/Source/WebCore/platform/LocalizedStrings.h

    r140974 r141864  
    266266
    267267#if ENABLE(VIDEO_TRACK)
    268     String textTrackClosedCaptionsText();
    269268    String textTrackSubtitlesText();
    270269    String textTrackOffText();
Note: See TracChangeset for help on using the changeset viewer.