<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204601] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204601">204601</a></dd>
<dt>Author</dt> <dd>eric.carlson@apple.com</dd>
<dt>Date</dt> <dd>2016-08-18 11:05:56 -0700 (Thu, 18 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>AX: Audio Description tracks are not labeled correctly, causing user confusion
https://bugs.webkit.org/show_bug.cgi?id=160652
<rdar://problem/27742208>
Reviewed by Antoine Quint.
* http/tests/media/hls/hls-accessiblity-describes-video-menu-expected.txt: Added.
* http/tests/media/hls/hls-accessiblity-describes-video-menu.html: Added.
* media/trackmenu-test.js:
(clickCCButton): Fail immediately if "video" is null or not a media element. Make failure
logging more descriptive.
* platform/gtk/TestExpectations: Skip new test.
* platform/ios-simulator/media/video-controls-captions-trackmenu-expected.txt: Updated for
clickCCButton error message change.
* platform/ios-simulator/media/video-controls-captions-trackmenu-hide-on-click-expected.txt: Ditto.
* platform/ios-simulator/media/video-controls-captions-trackmenu-localized-expected.txt: Ditto.
* platform/ios-simulator/media/video-controls-captions-trackmenu-sorted-expected.txt: Ditto.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmediatrackmenutestjs">trunk/LayoutTests/media/trackmenu-test.js</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatormediavideocontrolscaptionstrackmenuexpectedtxt">trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatormediavideocontrolscaptionstrackmenuhideonclickexpectedtxt">trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-hide-on-click-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatormediavideocontrolscaptionstrackmenulocalizedexpectedtxt">trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-localized-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatormediavideocontrolscaptionstrackmenusortedexpectedtxt">trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-sorted-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreEnglishlprojLocalizablestrings">trunk/Source/WebCore/English.lproj/Localizable.strings</a></li>
<li><a href="#trunkSourceWebCorepageCaptionUserPreferencesMediaAFcpp">trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLocalizedStringscpp">trunk/Source/WebCore/platform/LocalizedStrings.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLocalizedStringsh">trunk/Source/WebCore/platform/LocalizedStrings.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsavfoundationAVTrackPrivateAVFObjCImplmm">trunk/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestshttptestsmediahlshlsaccessiblitydescribesvideomenuexpectedtxt">trunk/LayoutTests/http/tests/media/hls/hls-accessiblity-describes-video-menu-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsmediahlshlsaccessiblitydescribesvideomenuhtml">trunk/LayoutTests/http/tests/media/hls/hls-accessiblity-describes-video-menu.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/LayoutTests/ChangeLog        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-08-18 Eric Carlson <eric.carlson@apple.com>
+
+ AX: Audio Description tracks are not labeled correctly, causing user confusion
+ https://bugs.webkit.org/show_bug.cgi?id=160652
+ <rdar://problem/27742208>
+
+ Reviewed by Antoine Quint.
+
+ * http/tests/media/hls/hls-accessiblity-describes-video-menu-expected.txt: Added.
+ * http/tests/media/hls/hls-accessiblity-describes-video-menu.html: Added.
+
+ * media/trackmenu-test.js:
+ (clickCCButton): Fail immediately if "video" is null or not a media element. Make failure
+ logging more descriptive.
+
+ * platform/gtk/TestExpectations: Skip new test.
+
+ * platform/ios-simulator/media/video-controls-captions-trackmenu-expected.txt: Updated for
+ clickCCButton error message change.
+ * platform/ios-simulator/media/video-controls-captions-trackmenu-hide-on-click-expected.txt: Ditto.
+ * platform/ios-simulator/media/video-controls-captions-trackmenu-localized-expected.txt: Ditto.
+ * platform/ios-simulator/media/video-controls-captions-trackmenu-sorted-expected.txt: Ditto.
+
</ins><span class="cx"> 2016-08-18 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Rebaseline js/dom/global-constructors-attributes.html after r204594.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmediahlshlsaccessiblitydescribesvideomenuexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/media/hls/hls-accessiblity-describes-video-menu-expected.txt (0 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/media/hls/hls-accessiblity-describes-video-menu-expected.txt         (rev 0)
+++ trunk/LayoutTests/http/tests/media/hls/hls-accessiblity-describes-video-menu-expected.txt        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+This tests the track menu when a file has a descriptive audio track.
+
+This test only runs in DRT!
+
+
+EVENT: error
+PASS: We are using the apple idiom
+
+EVENT: canplaythrough
+
+Test when track menu is hidden
+
+PASS: Menu name is 'Track Menu'
+PASS: Menu does not exist
+
+Test with visible menu
+
+PASS: Menu name is 'Track Menu'
+PASS: Menu exists
+PASS: id is 'audioAndTextTrackMenu'
+PASS: Menu element contains <ul>
+PASS: DVS audio menu item name contains track name from manifest
+PASS: DVS menu item name has been augmented
+PASS: Standard audio menu item name is the track name from manifest
+
+Testing finished.
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsmediahlshlsaccessiblitydescribesvideomenuhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/media/hls/hls-accessiblity-describes-video-menu.html (0 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/media/hls/hls-accessiblity-describes-video-menu.html         (rev 0)
+++ trunk/LayoutTests/http/tests/media/hls/hls-accessiblity-describes-video-menu.html        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -0,0 +1,109 @@
</span><ins>+<!DOCTYPE html>
+<html>
+ <head>
+ <script src=../../media-resources/video-test.js></script>
+ <script src=../../media-resources/media-file.js></script>
+ <script src=../../media-resources/trackmenu-test.js></script>
+ <script src=../../media-resources/media-controls.js></script>
+ <script src=../../media-resources/controls/controls-test-helpers.js></script>
+ <script>
+
+ const tester = new ControlsTest("non-existent-media-file", "error")
+ .whenReady(setup)
+ .start();
+ let retryCount = 0;
+ const maximumRetries = 10;
+
+ function setup()
+ {
+ findMediaElement();
+
+ var currentState = tester.currentState;
+ tester.test("We are using the apple idiom")
+ .value(currentState.idiom)
+ .isEqualTo("apple");
+
+ tester.resetEventTrigger("canplaythrough")
+ .whenReady(runTestsWithHiddenMenu)
+ .media.src = "http://127.0.0.1:8000/media/resources/hls/audio-describes-video.m3u8";
+ tester.logBlankLine();
+ }
+
+ function runTestsWithHiddenMenu()
+ {
+ tester.startNewSection("Test when track menu is hidden");
+ const statusState = tester.stateForControlsElement("Track Menu");
+
+ tester.test("Menu name is 'Track Menu'")
+ .value(statusState.name)
+ .isEqualTo("Track Menu");
+
+ tester.test("Menu does not exist")
+ .value(statusState.element)
+ .isEqualTo(null);
+
+ // Show the track menu.
+ internals.suspendAnimations();
+ hideTrackMenu();
+ showTrackMenu();
+ requestAnimationFrame(runTestsWithVisibleMenu);
+ }
+
+ function runTestsWithVisibleMenu()
+ {
+ const menu = getTrackListElement();
+ if (menu === null || menu.firstChild === null) {
+ if (++retryCount > maximumRetries) {
+ tester.logFailure(`Track menu has not been configured after ${retryCount} retries`);
+ tester.end();
+ return;
+ }
+
+ requestAnimationFrame(runTestsWithVisibleMenu);
+ }
+
+ tester.startNewSection("Test with visible menu");
+ const statusState = tester.stateForControlsElement("Track Menu", true);
+
+ tester.test("Menu name is 'Track Menu'")
+ .value(statusState.name)
+ .isEqualTo("Track Menu");
+
+ tester.test("Menu exists")
+ .value(menu)
+ .isNotEqualTo(null);
+
+ tester.test("id is 'audioAndTextTrackMenu'")
+ .value(menu.id)
+ .isEqualTo("audioAndTextTrackMenu");
+
+ const menuList = menu.firstChild.children[1];
+ tester.test("Menu element contains <ul>")
+ .value(menuList.tagName)
+ .isEqualTo("UL");
+
+ const menuItem1 = menuList.children[0];
+ tester.test("DVS audio menu item name contains track name from manifest")
+ .value(menuItem1.textContent)
+ .contains("English DVS");
+
+ tester.test("DVS menu item name has been augmented")
+ .value(menuItem1.textContent)
+ .isNotEqualTo("English DVS");
+
+ const menuItem2 = menuList.children[1];
+ tester.test("Standard audio menu item name is the track name from manifest")
+ .value(menuItem2.textContent)
+ .isEqualTo("English Sound");
+
+ tester.end();
+ }
+
+ </script>
+ </head>
+ <body>
+ <p>This tests the track menu when a file has a descriptive audio track.</p>
+ <p>This test only runs in DRT!</p>
+ <video width="500" height="300" controls> </video>
+ </body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsmediatrackmenutestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/trackmenu-test.js (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/trackmenu-test.js        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/LayoutTests/media/trackmenu-test.js        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -2,11 +2,16 @@
</span><span class="cx">
</span><span class="cx"> function clickCCButton()
</span><span class="cx"> {
</span><ins>+ if (!video || (video.nodeName != "VIDEO" && video.nodeName != "AUDIO")) {
+ consoleWrite(`<br>*** ERROR: 'video' global = "${video} in clickCCButton`);
+ endTest();
+ }
+
</ins><span class="cx"> if (!captionsButtonCoordinates) {
</span><span class="cx"> try {
</span><span class="cx"> captionsButtonCoordinates = mediaControlsButtonCoordinates(video, "toggle-closed-captions-button");
</span><span class="cx"> } catch (exception) {
</span><del>- failTest(exception.description);
</del><ins>+ failTest(`clickCCButton failed with exception: "${exception.description}:`);
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -668,7 +668,6 @@
</span><span class="cx"> webkit.org/b/154390 [ Release ] http/tests/media/hls/hls-video-resize.html [ Timeout Failure ]
</span><span class="cx"> webkit.org/b/154390 [ Release ] http/tests/media/hls/hls-audio-tracks.html [ Timeout Failure ]
</span><span class="cx"> webkit.org/b/154390 [ Release ] http/tests/media/hls/hls-audio-tracks-has-audio.html [ Timeout Failure ]
</span><del>-webkit.org/b/154390 [ Release ] http/tests/media/hls/hls-accessiblity-describes-video.html [ Timeout Failure ]
</del><span class="cx"> webkit.org/b/154390 [ Release ] http/tests/media/hls/video-cookie.html [ Failure ]
</span><span class="cx"> webkit.org/b/154390 http/tests/security/local-video-source-from-remote.html [ Timeout Pass ]
</span><span class="cx">
</span><span class="lines">@@ -727,6 +726,10 @@
</span><span class="cx"> security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement-without-mime-type.html [ Skip ]
</span><span class="cx"> security/contentSecurityPolicy/plugins-types-blocks-youtube-plugin-replacement.html [ Skip ]
</span><span class="cx">
</span><ins>+# No support for descriptive audio tracks in HLS file
+http/tests/media/hls/hls-accessiblity-describes-video-menu.html [ Skip ]
+http/tests/media/hls/hls-accessiblity-describes-video.html [ Skip ]
+
</ins><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span><span class="cx"> # End of Expected failures
</span><span class="cx"> #////////////////////////////////////////////////////////////////////////////////////////
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatormediavideocontrolscaptionstrackmenuexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-expected.txt (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-expected.txt        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-expected.txt        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -5,6 +5,6 @@
</span><span class="cx">
</span><span class="cx"> *** Set the user language preference.
</span><span class="cx"> RUN(internals.setUserPreferredLanguages(['en']))
</span><del>-undefined FAIL
</del><ins>+clickCCButton failed with exception: "undefined: FAIL
</ins><span class="cx"> END OF TEST
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatormediavideocontrolscaptionstrackmenuhideonclickexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-hide-on-click-expected.txt (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-hide-on-click-expected.txt        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-hide-on-click-expected.txt        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -5,6 +5,6 @@
</span><span class="cx">
</span><span class="cx"> *** Set the user language preference.
</span><span class="cx"> RUN(internals.setUserPreferredLanguages(['en']))
</span><del>-undefined FAIL
</del><ins>+clickCCButton failed with exception: "undefined: FAIL
</ins><span class="cx"> END OF TEST
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatormediavideocontrolscaptionstrackmenulocalizedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-localized-expected.txt (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-localized-expected.txt        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-localized-expected.txt        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -5,6 +5,6 @@
</span><span class="cx">
</span><span class="cx"> *** Set the user language preference.
</span><span class="cx"> RUN(internals.setUserPreferredLanguages(['en']))
</span><del>-undefined FAIL
</del><ins>+clickCCButton failed with exception: "undefined: FAIL
</ins><span class="cx"> END OF TEST
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatormediavideocontrolscaptionstrackmenusortedexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-sorted-expected.txt (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-sorted-expected.txt        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/LayoutTests/platform/ios-simulator/media/video-controls-captions-trackmenu-sorted-expected.txt        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -5,6 +5,6 @@
</span><span class="cx">
</span><span class="cx"> *** Set the user language preference.
</span><span class="cx"> RUN(internals.setUserPreferredLanguages(['en']))
</span><del>-undefined FAIL
</del><ins>+clickCCButton failed with exception: "undefined: FAIL
</ins><span class="cx"> END OF TEST
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/Source/WebCore/ChangeLog        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2016-08-18 Eric Carlson <eric.carlson@apple.com>
+
+ AX: Audio Description tracks are not labeled correctly, causing user confusion
+ https://bugs.webkit.org/show_bug.cgi?id=160652
+ <rdar://problem/27742208>
+
+ Reviewed by Antoine Quint.
+
+ * http/tests/media/hls/hls-accessiblity-describes-video-menu-expected.txt: Added.
+ * http/tests/media/hls/hls-accessiblity-describes-video-menu.html: Added.
+
+ * media/trackmenu-test.js:
+ (clickCCButton): Fail immediately if "video" is null or not a media element. Make failure
+ logging more descriptive.
+
+ * platform/gtk/TestExpectations: Skip new test.
+
+ * platform/ios-simulator/media/video-controls-captions-trackmenu-expected.txt: Updated for
+ clickCCButton error message change.
+ * platform/ios-simulator/media/video-controls-captions-trackmenu-hide-on-click-expected.txt: Ditto.
+ * platform/ios-simulator/media/video-controls-captions-trackmenu-localized-expected.txt: Ditto.
+ * platform/ios-simulator/media/video-controls-captions-trackmenu-sorted-expected.txt: Ditto.
+
</ins><span class="cx"> 2016-08-18 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Fix WinCairo build after r204592.
</span></span></pre></div>
<a id="trunkSourceWebCoreEnglishlprojLocalizablestrings"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/English.lproj/Localizable.strings (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/English.lproj/Localizable.strings        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/Source/WebCore/English.lproj/Localizable.strings        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -34,6 +34,9 @@
</span><span class="cx"> /* Text track contains closed captions */
</span><span class="cx"> "%@ CC" = "%@ CC";
</span><span class="cx">
</span><ins>+/* Text track contains Audio Descriptions */
+"%@ AD" = "%@ AD";
+
</ins><span class="cx"> /* visible name of the database process. The argument is the application name. */
</span><span class="cx"> "%@ Database Storage" = "%@ Database Storage";
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageCaptionUserPreferencesMediaAFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -653,8 +653,11 @@
</span><span class="cx">
</span><span class="cx"> if (displayName.isEmpty())
</span><span class="cx"> displayName.append(audioTrackNoLabelText());
</span><del>-
- return displayName.toString();
</del><ins>+
+ if (track->kind() != AudioTrack::descriptionKeyword())
+ return displayName.toString();
+
+ return audioDescriptionTrackSuffixText(displayName.toString());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String CaptionUserPreferencesMediaAF::displayNameForTrack(AudioTrack* track) const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -1145,6 +1145,11 @@
</span><span class="cx"> {
</span><span class="cx"> return formatLocalizedString(WEB_UI_STRING("%@ Forced", "Text track contains forced subtitles"), title.createCFString().get());
</span><span class="cx"> }
</span><ins>+
+String audioDescriptionTrackSuffixText(const String& title)
+{
+ return formatLocalizedString(WEB_UI_STRING("%@ AD", "Text track contains Audio Descriptions"), title.createCFString().get());
+}
</ins><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLocalizedStringsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/LocalizedStrings.h (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/LocalizedStrings.h        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/Source/WebCore/platform/LocalizedStrings.h        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -266,6 +266,7 @@
</span><span class="cx"> String sdhTrackMenuItemText(const String&);
</span><span class="cx"> String easyReaderTrackMenuItemText(const String&);
</span><span class="cx"> String forcedTrackMenuItemText(const String&);
</span><ins>+ String audioDescriptionTrackSuffixText(const String&);
</ins><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsavfoundationAVTrackPrivateAVFObjCImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm (204600 => 204601)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm        2016-08-18 17:54:27 UTC (rev 204600)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm        2016-08-18 18:05:56 UTC (rev 204601)
</span><span class="lines">@@ -114,6 +114,8 @@
</span><span class="cx"> if (m_assetTrack) {
</span><span class="cx"> if ([m_assetTrack hasMediaCharacteristic:AVMediaCharacteristicIsAuxiliaryContent])
</span><span class="cx"> return AudioTrackPrivate::Alternative;
</span><ins>+ if ([m_assetTrack hasMediaCharacteristic:AVMediaCharacteristicDescribesVideoForAccessibility])
+ return AudioTrackPrivate::Description;
</ins><span class="cx"> if ([m_assetTrack hasMediaCharacteristic:AVMediaCharacteristicIsMainProgramContent])
</span><span class="cx"> return AudioTrackPrivate::Main;
</span><span class="cx"> return AudioTrackPrivate::None;
</span><span class="lines">@@ -123,6 +125,8 @@
</span><span class="cx"> AVMediaSelectionOption *option = m_mediaSelectionOption->avMediaSelectionOption();
</span><span class="cx"> if ([option hasMediaCharacteristic:AVMediaCharacteristicIsAuxiliaryContent])
</span><span class="cx"> return AudioTrackPrivate::Alternative;
</span><ins>+ if ([option hasMediaCharacteristic:AVMediaCharacteristicDescribesVideoForAccessibility])
+ return AudioTrackPrivate::Description;
</ins><span class="cx"> if ([option hasMediaCharacteristic:AVMediaCharacteristicIsMainProgramContent])
</span><span class="cx"> return AudioTrackPrivate::Main;
</span><span class="cx"> return AudioTrackPrivate::None;
</span></span></pre>
</div>
</div>
</body>
</html>