Not all subtitle tracks are SDH
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jun 2013 21:29:12 +0000 (21:29 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jun 2013 21:29:12 +0000 (21:29 +0000)
commitaa435718bc9274eef545cf11a32dc467f53fbb63
tree056bda99c7d474dfec7a1e5dc5e4e7052baa8fad
parent2ae65aac0b7544da07e45c3fdca6d5850548152a
Not all subtitle tracks are SDH
https://bugs.webkit.org/show_bug.cgi?id=117738

Reviewed by Dean Jackson.

Source/WebCore:

No new tests, existing tests updated.

* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::isSDH): New.

* html/track/InbandTextTrack.h: Add isSDH override.
* html/track/TextTrack.h:

* page/CaptionUserPreferencesMac.mm:
(WebCore::trackDisplayName): Only add "SDH" label if a track claims to be SDH.

* platform/graphics/InbandTextTrackPrivate.h:
(WebCore::InbandTextTrackPrivate::isSDH): New.

* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
(WebCore::InbandTextTrackPrivateAVFObjC::isSDH): Return true if track has both "transcribes
    spoken dialog for accessibility" and "describes music and sound for accessibility"
    characteristics.

LayoutTests:

* media/video-controls-captions-trackmenu-localized.html:
* media/video-controls-captions-trackmenu-sorted.html:
* platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt:
* platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@151697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/media/video-controls-captions-trackmenu-localized.html
LayoutTests/media/video-controls-captions-trackmenu-sorted.html
LayoutTests/platform/mac/media/video-controls-captions-trackmenu-localized-expected.txt
LayoutTests/platform/mac/media/video-controls-captions-trackmenu-sorted-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/html/track/InbandTextTrack.cpp
Source/WebCore/html/track/InbandTextTrack.h
Source/WebCore/html/track/TextTrack.h
Source/WebCore/page/CaptionUserPreferencesMac.mm
Source/WebCore/platform/graphics/InbandTextTrackPrivate.h
Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm