<!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>[195912] 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/195912">195912</a></dd>
<dt>Author</dt> <dd>eric.carlson@apple.com</dd>
<dt>Date</dt> <dd>2016-01-30 14:19:08 -0800 (Sat, 30 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>More than one audio and/or text track sometimes selected in media controls menu
https://bugs.webkit.org/show_bug.cgi?id=153664

Source/WebCore:

Use an &lt;img&gt; element for the track menu item checkmark instead of a background image and
the ::before selector.

Reviewed by Jer Noble.

Test: media/controls/track-menu.html

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-closed-captions-container li:hover):
(audio::-webkit-media-controls-closed-captions-container li .checkmark-container):
(audio::-webkit-media-controls-closed-captions-container li.selected .checkmark-container):
(audio::-webkit-media-controls-closed-captions-container li.selected:hover .checkmark-container):
(audio::-webkit-media-controls-closed-captions-container li.selected::before): Deleted.
(audio::-webkit-media-controls-closed-captions-container li.selected:hover::before): Deleted.
* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.buildCaptionMenu):
(Controller.prototype.):
(Controller.prototype.getCurrentControlsStatus):

LayoutTests:

Reviewed by Jer Noble.

* media/controls/controls-test-helpers.js:
(ControlsTest.prototype.get currentState):
(ControlsTest.prototype.get video):
(ControlsTest.prototype.stateForControlsElement):
(ControlsTest.prototype.handleEvent):
(ControlsTest.prototype.setup):
(ControlsTest.prototype.start):
(ControlsTest.prototype.isEqualTo):
(ControlsTest.prototype.isNotEqualTo):
(ControlsTest.prototype.contains):
* media/controls/track-menu-expected.txt: Added.
* media/controls/track-menu.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsmediacontrolscontrolstesthelpersjs">trunk/LayoutTests/media/controls/controls-test-helpers.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsApplecss">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css</a></li>
<li><a href="#trunkSourceWebCoreModulesmediacontrolsmediaControlsApplejs">trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsmediacontrolstrackmenuexpectedtxt">trunk/LayoutTests/media/controls/track-menu-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediacontrolstrackmenuhtml">trunk/LayoutTests/media/controls/track-menu.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195911 => 195912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-30 21:53:47 UTC (rev 195911)
+++ trunk/LayoutTests/ChangeLog        2016-01-30 22:19:08 UTC (rev 195912)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-01-30  Eric Carlson  &lt;eric.carlson@apple.com&gt;
+
+        More than one audio and/or text track sometimes selected in media controls menu
+        https://bugs.webkit.org/show_bug.cgi?id=153664
+
+        Reviewed by Jer Noble.
+
+        * media/controls/controls-test-helpers.js:
+        (ControlsTest.prototype.get currentState):
+        (ControlsTest.prototype.get video):
+        (ControlsTest.prototype.stateForControlsElement):
+        (ControlsTest.prototype.handleEvent):
+        (ControlsTest.prototype.setup):
+        (ControlsTest.prototype.start):
+        (ControlsTest.prototype.isEqualTo):
+        (ControlsTest.prototype.isNotEqualTo):
+        (ControlsTest.prototype.contains):
+        * media/controls/track-menu-expected.txt: Added.
+        * media/controls/track-menu.html: Added.
+
</ins><span class="cx"> 2016-01-30  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [JS Bindings] prototype.constructor should be writable
</span></span></pre></div>
<a id="trunkLayoutTestsmediacontrolscontrolstesthelpersjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/controls/controls-test-helpers.js (195911 => 195912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/controls/controls-test-helpers.js        2016-01-30 21:53:47 UTC (rev 195911)
+++ trunk/LayoutTests/media/controls/controls-test-helpers.js        2016-01-30 22:19:08 UTC (rev 195912)
</span><span class="lines">@@ -35,6 +35,11 @@
</span><span class="cx">         return { idiom: &quot;apple&quot;, status: &quot;fail&quot; };
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    get video()
+    {
+        return this.media;
+    }
+
</ins><span class="cx">     stateForControlsElement(elementName, flushCachedState)
</span><span class="cx">     {
</span><span class="cx">         if (flushCachedState)
</span><span class="lines">@@ -53,7 +58,7 @@
</span><span class="cx">     handleEvent(event)
</span><span class="cx">     {
</span><span class="cx">         this.logMessage(`EVENT: ${event.type}`);
</span><del>-        if (event.type == this.eventTrigger &amp;&amp; this.callback)
</del><ins>+        if (event.type == this.eventTrigger &amp;&amp; this.callback &amp;&amp; window.testRunner)
</ins><span class="cx">             this.callback();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -87,11 +92,6 @@
</span><span class="cx"> 
</span><span class="cx">     setup()
</span><span class="cx">     {
</span><del>-        if (!window.testRunner) {
-            this.logFailure(&quot;Test requires DRT.&quot;);
-            return false;
-        }
-
</del><span class="cx">         this.console = document.createElement(&quot;div&quot;);
</span><span class="cx">         this.console.className = &quot;console&quot;;
</span><span class="cx">         document.body.appendChild(this.console);
</span><span class="lines">@@ -107,13 +107,20 @@
</span><span class="cx">         this.media.addEventListener(this.eventTrigger, this, false);
</span><span class="cx">         this.media.src = findMediaFile(&quot;video&quot;, this.mediaURL);
</span><span class="cx"> 
</span><ins>+        if (!window.testRunner) {
+            this.logFailure(&quot;Test requires DRT.&quot;);
+            return false;
+        }
+
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     start(msg)
</span><span class="cx">     {
</span><span class="cx">         window.addEventListener(&quot;load&quot;, function () {
</span><del>-            this.setup();
</del><ins>+            if (!this.setup())
+                return;
+
</ins><span class="cx">             if (msg)
</span><span class="cx">                 this.startNewSection(msg);
</span><span class="cx">         }.bind(this), false);
</span><span class="lines">@@ -149,6 +156,14 @@
</span><span class="cx">             this.logFailure(`${this.currentMessage} Expected: &quot;${value}&quot;. Actual: &quot;${this.currentValue}&quot;`);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    isNotEqualTo(value)
+    {
+        if (this.currentValue != value)
+            this.logSuccess(this.currentMessage);
+        else
+            this.logFailure(`${this.currentMessage} Expected to not be equal to: &quot;${value}&quot;. Actual: &quot;${this.currentValue}&quot;`);
+    }
+
</ins><span class="cx">     contains(value)
</span><span class="cx">     {
</span><span class="cx">         if (this.currentValue.indexOf(value) &gt;= 0)
</span></span></pre></div>
<a id="trunkLayoutTestsmediacontrolstrackmenuexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/controls/track-menu-expected.txt (0 => 195912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/controls/track-menu-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/controls/track-menu-expected.txt        2016-01-30 22:19:08 UTC (rev 195912)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+This tests the track menu.
+
+This test only runs in DRT!
+
+
+EVENT: canplaythrough
+PASS: We are using the apple idiom
+
+Test when track menu is hidden
+
+PASS: Menu name is 'Track Menu'
+PASS: Menu does not exist
+PASS: Text track not visible
+
+Test with visible menu
+
+PASS: Menu name is 'Track Menu'
+PASS: Menu exists
+PASS: id is 'audioAndTextTrackMenu'
+PASS: Menu element contains &lt;ul&gt;
+PASS: First menu item is selected
+PASS: First menu item contains checkmark &lt;img&gt;
+PASS: First menu item checkmark image is visible
+PASS: Second menu item is not selected
+PASS: Second menu item checkmark is not visible
+
+Testing finished.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediacontrolstrackmenuhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/media/controls/track-menu.html (0 => 195912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/controls/track-menu.html                                (rev 0)
+++ trunk/LayoutTests/media/controls/track-menu.html        2016-01-30 22:19:08 UTC (rev 195912)
</span><span class="lines">@@ -0,0 +1,104 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+    &lt;head&gt;
+        &lt;script src=&quot;../video-test.js&quot;&gt;&lt;/script&gt;
+        &lt;script src=&quot;../media-file.js&quot;&gt;&lt;/script&gt;
+        &lt;script src=&quot;../trackmenu-test.js&quot;&gt;&lt;/script&gt;
+        &lt;script src=&quot;../media-controls.js&quot;&gt;&lt;/script&gt;
+        &lt;script src=&quot;controls-test-helpers.js&quot;&gt;&lt;/script&gt;
+        &lt;script&gt;
+            var tester = new ControlsTest()
+                .whenReady(runTestsWithHiddenMenu)
+                .start();
+
+            function runTestsWithHiddenMenu()
+            {
+                findMediaElement();
+
+                var currentState = tester.currentState;
+                tester.test(&quot;We are using the apple idiom&quot;)
+                    .value(currentState.idiom)
+                    .isEqualTo(&quot;apple&quot;);
+
+                tester.startNewSection(&quot;Test when track menu is hidden&quot;);
+                var statusState = tester.stateForControlsElement(&quot;Track Menu&quot;);
+
+                tester.test(&quot;Menu name is 'Track Menu'&quot;)
+                    .value(statusState.name)
+                    .isEqualTo(&quot;Track Menu&quot;);
+
+                tester.test(&quot;Menu does not exist&quot;)
+                    .value(statusState.element)
+                    .isEqualTo(null);
+
+                tester.test(&quot;Text track not visible&quot;)
+                    .value(tester.video.textTracks[0].mode)
+                    .isEqualTo(&quot;disabled&quot;);
+
+                // Show the track menu.
+                internals.suspendAnimations();
+                hideTrackMenu();
+                showTrackMenu();
+                window.setTimeout(runTestsWithVisibleMenu, 100);
+            }
+
+            function runTestsWithVisibleMenu()
+            {
+                tester.startNewSection(&quot;Test with visible menu&quot;);
+                var statusState = tester.stateForControlsElement(&quot;Track Menu&quot;, true);
+
+                tester.test(&quot;Menu name is 'Track Menu'&quot;)
+                    .value(statusState.name)
+                    .isEqualTo(&quot;Track Menu&quot;);
+
+                var captionMenu = getTrackListElement();
+                tester.test(&quot;Menu exists&quot;)
+                    .value(captionMenu)
+                    .isNotEqualTo(null);
+
+                tester.test(&quot;id is 'audioAndTextTrackMenu'&quot;)
+                    .value(captionMenu.id)
+                    .isEqualTo(&quot;audioAndTextTrackMenu&quot;);
+
+                var menuList = captionMenu.firstChild.children[1];
+                tester.test(&quot;Menu element contains &lt;ul&gt;&quot;)
+                    .value(menuList.tagName)
+                    .isEqualTo(&quot;UL&quot;);
+
+                var menuItem = menuList.firstChild;
+                tester.test(&quot;First menu item is selected&quot;)
+                    .value(menuItem.className)
+                    .isEqualTo(&quot;selected&quot;);
+
+                var checkImage = menuItem.children[0];
+                tester.test(&quot;First menu item contains checkmark &lt;img&gt;&quot;)
+                    .value(checkImage.tagName)
+                    .isEqualTo(&quot;IMG&quot;);
+
+                tester.test(&quot;First menu item checkmark image is visible&quot;)
+                    .value(getComputedStyle(checkImage).content)
+                    .contains(&quot;url('data:image/svg+xml,&lt;svg xmlns=&quot;);
+
+                var menuItem = menuList.children[1];
+                tester.test(&quot;Second menu item is not selected&quot;)
+                    .value(menuItem.className)
+                    .isNotEqualTo(&quot;selected&quot;);
+
+                var checkImage = menuItem.children[0];
+                tester.test(&quot;Second menu item checkmark is not visible&quot;)
+                    .value(getComputedStyle(checkImage).content)
+                    .isEmptyString();
+
+                tester.end();
+            }
+
+        &lt;/script&gt;
+    &lt;/head&gt;
+    &lt;body&gt;
+        &lt;p&gt;This tests the track menu.&lt;/p&gt;
+        &lt;p&gt;This test only runs in DRT!&lt;/p&gt;
+        &lt;video width=&quot;500&quot; height=&quot;300&quot; controls&gt;
+            &lt;track kind=&quot;captions&quot; label=&quot;English Captions&quot; src=&quot;../track/captions-webvtt/captions-fast.vtt&quot; srclang=&quot;en&quot;&gt;
+        &lt;/video&gt;
+    &lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (195911 => 195912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-30 21:53:47 UTC (rev 195911)
+++ trunk/Source/WebCore/ChangeLog        2016-01-30 22:19:08 UTC (rev 195912)
</span><span class="lines">@@ -1,3 +1,27 @@
</span><ins>+2016-01-30  Eric Carlson  &lt;eric.carlson@apple.com&gt;
+
+        More than one audio and/or text track sometimes selected in media controls menu
+        https://bugs.webkit.org/show_bug.cgi?id=153664
+
+        Use an &lt;img&gt; element for the track menu item checkmark instead of a background image and
+        the ::before selector.
+
+        Reviewed by Jer Noble.
+
+        Test: media/controls/track-menu.html
+
+        * Modules/mediacontrols/mediaControlsApple.css:
+        (audio::-webkit-media-controls-closed-captions-container li:hover):
+        (audio::-webkit-media-controls-closed-captions-container li .checkmark-container):
+        (audio::-webkit-media-controls-closed-captions-container li.selected .checkmark-container):
+        (audio::-webkit-media-controls-closed-captions-container li.selected:hover .checkmark-container):
+        (audio::-webkit-media-controls-closed-captions-container li.selected::before): Deleted.
+        (audio::-webkit-media-controls-closed-captions-container li.selected:hover::before): Deleted.
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.buildCaptionMenu):
+        (Controller.prototype.):
+        (Controller.prototype.getCurrentControlsStatus):
+
</ins><span class="cx"> 2016-01-30  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Replace CaseFoldingHash with ASCIICaseInsensitiveHash
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsmediaControlsApplecss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css (195911 => 195912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css        2016-01-30 21:53:47 UTC (rev 195911)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.css        2016-01-30 22:19:08 UTC (rev 195912)
</span><span class="lines">@@ -458,24 +458,27 @@
</span><span class="cx">     background-color: rgba(26, 68, 243, 0.6);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-video::-webkit-media-controls-closed-captions-container li.selected::before,
-audio::-webkit-media-controls-closed-captions-container li.selected::before {
-    display: block;
-    content: &quot;&quot;;
</del><ins>+video::-webkit-media-controls-closed-captions-container li .checkmark-container,
+audio::-webkit-media-controls-closed-captions-container li .checkmark-container {
+    display: none;
</ins><span class="cx">     position: absolute;
</span><span class="cx">     top: 0.25em;
</span><ins>+    left: 1em;
</ins><span class="cx">     width: 1.1em;
</span><span class="cx">     height: 1.1em;
</span><del>-    -webkit-margin-start: -20px;
-    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 300 300&quot;&gt;&lt;polygon fill=&quot;rgb(163, 163, 163)&quot; points=&quot;252.301,4.477 126.667,194.104 43.358,108.3 6.868,161.408 132.515,290.814 297.732,49.926&quot;/&gt;&lt;/svg&gt;');
-    background-repeat: no-repeat;
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-video::-webkit-media-controls-closed-captions-container li.selected:hover::before,
-audio::-webkit-media-controls-closed-captions-container li.selected:hover::before {
-    background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 300 300&quot;&gt;&lt;polygon fill=&quot;rgba(255,255,255,0.45)&quot; points=&quot;252.301,4.477 126.667,194.104 43.358,108.3 6.868,161.408 132.515,290.814 297.732,49.926&quot;/&gt;&lt;/svg&gt;');
</del><ins>+video::-webkit-media-controls-closed-captions-container li.selected .checkmark-container,
+audio::-webkit-media-controls-closed-captions-container li.selected .checkmark-container {
+    display: inline-block;
+    content: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 300 300&quot;&gt;&lt;polygon fill=&quot;rgb(163, 163, 163)&quot; points=&quot;252.301,4.477 126.667,194.104 43.358,108.3 6.868,161.408 132.515,290.814 297.732,49.926&quot;/&gt;&lt;/svg&gt;');
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+video::-webkit-media-controls-closed-captions-container li.selected:hover .checkmark-container,
+audio::-webkit-media-controls-closed-captions-container li.selected:hover .checkmark-container {
+    content: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 300 300&quot;&gt;&lt;polygon fill=&quot;rgba(255,255,255,0.45)&quot; points=&quot;252.301,4.477 126.667,194.104 43.358,108.3 6.868,161.408 132.515,290.814 297.732,49.926&quot;/&gt;&lt;/svg&gt;');
+}
+
</ins><span class="cx"> video::-webkit-media-controls-fullscreen-button,
</span><span class="cx"> audio::-webkit-media-controls-fullscreen-button {
</span><span class="cx">     background-image: url('data:image/svg+xml,&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; viewBox=&quot;0 0 14 15&quot; stroke=&quot;rgba(255,255,255,0.45)&quot; fill=&quot;none&quot;&gt;&lt;path d=&quot;M 7,1.5 L 12.5,1.5 L 12.5,7&quot;/&gt;&lt;path d=&quot;M 0.5,8 L 0.5,13.5 L 6,13.5&quot;/&gt;&lt;path stroke-linecap=&quot;round&quot; d=&quot;M 12.5,1.5 L 7.5,6.5&quot;/&gt;&lt;path stroke-linecap=&quot;round&quot; d=&quot;M 0.5,13.5 L 5.5,8.5&quot;/&gt;&lt;/svg&gt;');
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediacontrolsmediaControlsApplejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (195911 => 195912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js        2016-01-30 21:53:47 UTC (rev 195911)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js        2016-01-30 22:19:08 UTC (rev 195912)
</span><span class="lines">@@ -475,7 +475,7 @@
</span><span class="cx">         captionButton.setAttribute('pseudo', '-webkit-media-controls-toggle-closed-captions-button');
</span><span class="cx">         captionButton.setAttribute('aria-label', this.UIString('Captions'));
</span><span class="cx">         captionButton.setAttribute('aria-haspopup', 'true');
</span><del>-        captionButton.setAttribute('aria-owns', 'audioTrackMenu');
</del><ins>+        captionButton.setAttribute('aria-owns', 'audioAndTextTrackMenu');
</ins><span class="cx">         this.listenFor(captionButton, 'click', this.handleCaptionButtonClicked);
</span><span class="cx"> 
</span><span class="cx">         var fullscreenButton = this.controls.fullscreenButton = document.createElement('button');
</span><span class="lines">@@ -1737,7 +1737,7 @@
</span><span class="cx"> 
</span><span class="cx">         this.captionMenu = document.createElement('div');
</span><span class="cx">         this.captionMenu.setAttribute('pseudo', '-webkit-media-controls-closed-captions-container');
</span><del>-        this.captionMenu.setAttribute('id', 'audioTrackMenu');
</del><ins>+        this.captionMenu.setAttribute('id', 'audioAndTextTrackMenu');
</ins><span class="cx">         this.base.appendChild(this.captionMenu);
</span><span class="cx">         this.captionMenuItems = [];
</span><span class="cx"> 
</span><span class="lines">@@ -1773,6 +1773,10 @@
</span><span class="cx">                 menuItem.innerText = this.host.displayNameForTrack(track);
</span><span class="cx">                 menuItem.track = track;
</span><span class="cx"> 
</span><ins>+                var itemCheckmark = document.createElement(&quot;img&quot;);
+                itemCheckmark.classList.add(&quot;checkmark-container&quot;);
+                menuItem.insertBefore(itemCheckmark, menuItem.firstChild);
+
</ins><span class="cx">                 if (track.enabled) {
</span><span class="cx">                     menuItem.classList.add(this.ClassNames.selected);
</span><span class="cx">                     menuItem.setAttribute('tabindex', '0');
</span><span class="lines">@@ -1805,6 +1809,10 @@
</span><span class="cx">                 menuItem.innerText = this.host.displayNameForTrack(track);
</span><span class="cx">                 menuItem.track = track;
</span><span class="cx"> 
</span><ins>+                var itemCheckmark = document.createElement(&quot;img&quot;);
+                itemCheckmark.classList.add(&quot;checkmark-container&quot;);
+                menuItem.insertBefore(itemCheckmark, menuItem.firstChild);
+
</ins><span class="cx">                 if (track === offItem) {
</span><span class="cx">                     var offMenu = menuItem;
</span><span class="cx">                     continue;
</span><span class="lines">@@ -1830,8 +1838,8 @@
</span><span class="cx"> 
</span><span class="cx">             if (offMenu &amp;&amp; displayMode === 'forced-only' &amp;&amp; !trackMenuItemSelected) {
</span><span class="cx">                 offMenu.classList.add(this.ClassNames.selected);
</span><del>-                menuItem.setAttribute('tabindex', '0');
-                menuItem.setAttribute('aria-checked', 'true');
</del><ins>+                offMenu.setAttribute('tabindex', '0');
+                offMenu.setAttribute('aria-checked', 'true');
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -2242,6 +2250,10 @@
</span><span class="cx">                 name: &quot;Picture-in-picture Button&quot;,
</span><span class="cx">                 object: this.controls.pictureInPictureButton
</span><span class="cx">             },
</span><ins>+            {
+                name: &quot;Track Menu&quot;,
+                object: this.captionMenu
+            },
</ins><span class="cx">         ];
</span><span class="cx"> 
</span><span class="cx">         elements.forEach(function (element) {
</span><span class="lines">@@ -2249,7 +2261,7 @@
</span><span class="cx">             delete element.object;
</span><span class="cx"> 
</span><span class="cx">             element.computedStyle = {};
</span><del>-            if (element.styleValues) {
</del><ins>+            if (obj &amp;&amp; element.styleValues) {
</ins><span class="cx">                 var computedStyle = window.getComputedStyle(obj);
</span><span class="cx">                 element.styleValues.forEach(function (propertyName) {
</span><span class="cx">                     element.computedStyle[propertyName] = computedStyle[propertyName];
</span><span class="lines">@@ -2257,16 +2269,18 @@
</span><span class="cx">                 delete element.styleValues;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            element.bounds = obj.getBoundingClientRect();
-            element.className = obj.className;
-            element.ariaLabel = obj.getAttribute('aria-label');
</del><ins>+            element.bounds = obj ? obj.getBoundingClientRect() : null;
+            element.className = obj ? obj.className : null;
+            element.ariaLabel = obj ? obj.getAttribute('aria-label') : null;
</ins><span class="cx"> 
</span><span class="cx">             if (element.extraProperties) {
</span><span class="cx">                 element.extraProperties.forEach(function (property) {
</span><del>-                    element[property] = obj[property];
</del><ins>+                    element[property] = obj ? obj[property] : null;
</ins><span class="cx">                 });
</span><span class="cx">                 delete element.extraProperties;
</span><span class="cx">             }
</span><ins>+
+             element.element = obj;
</ins><span class="cx">         });
</span><span class="cx"> 
</span><span class="cx">         result.elements = elements;
</span></span></pre>
</div>
</div>

</body>
</html>