<!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>[213980] 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/213980">213980</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-03-15 05:42:38 -0700 (Wed, 15 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Modern Media Controls] Always use six digits to display time when overall media duration is an hour or more
https://bugs.webkit.org/show_bug.cgi?id=169668
&lt;rdar://problem/31059699&gt;

Patch by Antoine Quint &lt;graouts@apple.com&gt; on 2017-03-15
Reviewed by Dean Jackson.

Source/WebCore:

Always use six digits to display times when the overall media duration is an hour or more. This
ensures that we don't display too much white space around labels when we know we will eventually
need six digits to display the full time, but the current time to display is under an hour.

Test: media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html

* Modules/modern-media-controls/controls/time-control.js:
(TimeControl.prototype.get useSixDigitsForTimeLabels):
(TimeControl.prototype.set useSixDigitsForTimeLabels):
(TimeControl.prototype.set width):
(TimeControl.prototype.get isSufficientlyWide):
(TimeControl.prototype._availableWidthHasChanged):
(TimeControl.prototype.get labelsMayDisplayTimesOverAnHour): Deleted.
(TimeControl.prototype.set labelsMayDisplayTimesOverAnHour): Deleted.
* Modules/modern-media-controls/controls/time-label.js:
(TimeLabel.prototype._formattedTime):
* Modules/modern-media-controls/media/time-labels-support.js:
(TimeLabelsSupport.prototype.syncControl):
(TimeLabelsSupport):

LayoutTests:

Rebase some tests due to the rename of the labelsMayDisplayTimesOverAnHour property to
useSixDigitsForTimeLabels. We also add an assertion in long-time.html to check that
we currently use six digits to display a time that is under an hour but where the
media duration is over an hour.

* http/tests/media/modern-media-controls/time-labels-support/long-time-expected.txt:
* http/tests/media/modern-media-controls/time-labels-support/long-time.html:
* media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels-expected.txt: Renamed from LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour-expected.txt.
* media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html: Renamed from LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour.html.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestshttptestsmediamodernmediacontrolstimelabelssupportlongtimeexpectedtxt">trunk/LayoutTests/http/tests/media/modern-media-controls/time-labels-support/long-time-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsmediamodernmediacontrolstimelabelssupportlongtimehtml">trunk/LayoutTests/http/tests/media/modern-media-controls/time-labels-support/long-time.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolscontrolstimecontroljs">trunk/Source/WebCore/Modules/modern-media-controls/controls/time-control.js</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolscontrolstimelabeljs">trunk/Source/WebCore/Modules/modern-media-controls/controls/time-label.js</a></li>
<li><a href="#trunkSourceWebCoreModulesmodernmediacontrolsmediatimelabelssupportjs">trunk/Source/WebCore/Modules/modern-media-controls/media/time-labels-support.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrolusesixdigitsfortimelabelsexpectedtxt">trunk/LayoutTests/media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrolusesixdigitsfortimelabelshtml">trunk/LayoutTests/media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrollabelsmaydisplaytimesoveranhourexpectedtxt">trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrollabelsmaydisplaytimesoveranhourhtml">trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (213979 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-03-15 10:19:04 UTC (rev 213979)
+++ trunk/LayoutTests/ChangeLog        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -1,5 +1,23 @@
</span><span class="cx"> 2017-03-15  Antoine Quint  &lt;graouts@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        [Modern Media Controls] Always use six digits to display time when overall media duration is an hour or more
+        https://bugs.webkit.org/show_bug.cgi?id=169668
+        &lt;rdar://problem/31059699&gt;
+
+        Reviewed by Dean Jackson.
+
+        Rebase some tests due to the rename of the labelsMayDisplayTimesOverAnHour property to
+        useSixDigitsForTimeLabels. We also add an assertion in long-time.html to check that
+        we currently use six digits to display a time that is under an hour but where the
+        media duration is over an hour.
+
+        * http/tests/media/modern-media-controls/time-labels-support/long-time-expected.txt:
+        * http/tests/media/modern-media-controls/time-labels-support/long-time.html:
+        * media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels-expected.txt: Renamed from LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour-expected.txt.
+        * media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html: Renamed from LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour.html.
+
+2017-03-15  Antoine Quint  &lt;graouts@apple.com&gt;
+
</ins><span class="cx">         [mac-wk1 debug] LayoutTest media/modern-media-controls/airplay-placard/airplay-placard-text-section.html is a flaky timeout
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=169654
</span><span class="cx">         &lt;rdar://problem/31059092&gt;
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmediamodernmediacontrolstimelabelssupportlongtimeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/media/modern-media-controls/time-labels-support/long-time-expected.txt (213979 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/media/modern-media-controls/time-labels-support/long-time-expected.txt        2017-03-15 10:19:04 UTC (rev 213979)
+++ trunk/LayoutTests/http/tests/media/modern-media-controls/time-labels-support/long-time-expected.txt        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -3,7 +3,8 @@
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS mediaController.controls.timeControl.labelsMayDisplayTimesOverAnHour is true
</del><ins>+PASS mediaController.controls.timeControl.useSixDigitsForTimeLabels is true
+PASS mediaController.controls.timeControl.elapsedTimeLabel.element.textContent became &quot;00:00:05&quot;
</ins><span class="cx"> 
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsmediamodernmediacontrolstimelabelssupportlongtimehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/http/tests/media/modern-media-controls/time-labels-support/long-time.html (213979 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/media/modern-media-controls/time-labels-support/long-time.html        2017-03-15 10:19:04 UTC (rev 213979)
+++ trunk/LayoutTests/http/tests/media/modern-media-controls/time-labels-support/long-time.html        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -14,11 +14,14 @@
</span><span class="cx"> const mediaController = createControls(shadowRoot, media, null);
</span><span class="cx"> 
</span><span class="cx"> media.addEventListener(&quot;durationchange&quot;, function() {
</span><del>-    shouldBeTrue(&quot;mediaController.controls.timeControl.labelsMayDisplayTimesOverAnHour&quot;);
-    debug(&quot;&quot;);
-    shadowRoot.host.remove();
-    media.remove();
-    finishJSTest();
</del><ins>+    media.currentTime = 5;
+    shouldBeTrue(&quot;mediaController.controls.timeControl.useSixDigitsForTimeLabels&quot;);
+    shouldBecomeEqualToString(&quot;mediaController.controls.timeControl.elapsedTimeLabel.element.textContent&quot;, &quot;00:00:05&quot;, () =&gt; {
+        debug(&quot;&quot;);
+        shadowRoot.host.remove();
+        media.remove();
+        finishJSTest();
+    });
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrollabelsmaydisplaytimesoveranhourexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour-expected.txt (213979 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour-expected.txt        2017-03-15 10:19:04 UTC (rev 213979)
+++ trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour-expected.txt        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -1,20 +0,0 @@
</span><del>-Testing the TimeControl class property labelsMayDisplayTimesOverAnHour.
-
-On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
-
-
-Testing default value
-PASS timeControl.labelsMayDisplayTimesOverAnHour is false
-
-Setting timeControl.labelsMayDisplayTimesOverAnHour = true
-PASS timeControl.labelsMayDisplayTimesOverAnHour is true
-
-PASS timeControl.elapsedTimeLabel.x is -2
-PASS timeControl.scrubber.x is 65
-PASS timeControl.scrubber.width is 362
-PASS timeControl.remainingTimeLabel.x is 432
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrollabelsmaydisplaytimesoveranhourhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour.html (213979 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour.html        2017-03-15 10:19:04 UTC (rev 213979)
+++ trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour.html        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -1,30 +0,0 @@
</span><del>-&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../resources/media-controls-loader.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../resources/media-controls-utils.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
-&lt;body&gt;
-&lt;script type=&quot;text/javascript&quot;&gt;
-
-description(&quot;Testing the &lt;code&gt;TimeControl&lt;/code&gt; class property labelsMayDisplayTimesOverAnHour.&quot;);
-
-const timeControl = new TimeControl;
-
-debug(&quot;Testing default value&quot;);
-shouldBeFalse(&quot;timeControl.labelsMayDisplayTimesOverAnHour&quot;);
-
-debug(&quot;&quot;);
-debug(&quot;Setting timeControl.labelsMayDisplayTimesOverAnHour = true&quot;);
-timeControl.labelsMayDisplayTimesOverAnHour = true;
-shouldBeTrue(&quot;timeControl.labelsMayDisplayTimesOverAnHour&quot;);
-
-timeControl.width = 500;
-debug(&quot;&quot;);
-shouldBe(&quot;timeControl.elapsedTimeLabel.x&quot;, &quot;-2&quot;);
-shouldBe(&quot;timeControl.scrubber.x&quot;, &quot;65&quot;);
-shouldBe(&quot;timeControl.scrubber.width&quot;, &quot;362&quot;);
-shouldBe(&quot;timeControl.remainingTimeLabel.x&quot;, &quot;432&quot;);
-
-debug(&quot;&quot;);
-
-&lt;/script&gt;
-&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
-&lt;/body&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrolusesixdigitsfortimelabelsexpectedtxtfromrev213979trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrollabelsmaydisplaytimesoveranhourexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels-expected.txt (from rev 213979, trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour-expected.txt) (0 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels-expected.txt                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels-expected.txt        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+Testing the TimeControl class property useSixDigitsForTimeLabels.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Testing default value
+PASS timeControl.useSixDigitsForTimeLabels is false
+
+Setting timeControl.useSixDigitsForTimeLabels = true
+PASS timeControl.useSixDigitsForTimeLabels is true
+
+PASS timeControl.elapsedTimeLabel.x is -2
+PASS timeControl.scrubber.x is 65
+PASS timeControl.scrubber.width is 362
+PASS timeControl.remainingTimeLabel.x is 432
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrolusesixdigitsfortimelabelshtmlfromrev213979trunkLayoutTestsmediamodernmediacontrolstimecontroltimecontrollabelsmaydisplaytimesoveranhourhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html (from rev 213979, trunk/LayoutTests/media/modern-media-controls/time-control/time-control-labels-may-display-times-over-an-hour.html) (0 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html                                (rev 0)
+++ trunk/LayoutTests/media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/media-controls-loader.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/media-controls-utils.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;script type=&quot;text/javascript&quot;&gt;
+
+description(&quot;Testing the &lt;code&gt;TimeControl&lt;/code&gt; class property useSixDigitsForTimeLabels.&quot;);
+
+const timeControl = new TimeControl;
+
+debug(&quot;Testing default value&quot;);
+shouldBeFalse(&quot;timeControl.useSixDigitsForTimeLabels&quot;);
+
+debug(&quot;&quot;);
+debug(&quot;Setting timeControl.useSixDigitsForTimeLabels = true&quot;);
+timeControl.useSixDigitsForTimeLabels = true;
+shouldBeTrue(&quot;timeControl.useSixDigitsForTimeLabels&quot;);
+
+timeControl.width = 500;
+debug(&quot;&quot;);
+shouldBe(&quot;timeControl.elapsedTimeLabel.x&quot;, &quot;-2&quot;);
+shouldBe(&quot;timeControl.scrubber.x&quot;, &quot;65&quot;);
+shouldBe(&quot;timeControl.scrubber.width&quot;, &quot;362&quot;);
+shouldBe(&quot;timeControl.remainingTimeLabel.x&quot;, &quot;432&quot;);
+
+debug(&quot;&quot;);
+
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (213979 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-15 10:19:04 UTC (rev 213979)
+++ trunk/Source/WebCore/ChangeLog        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2017-03-15  Antoine Quint  &lt;graouts@apple.com&gt;
+
+        [Modern Media Controls] Always use six digits to display time when overall media duration is an hour or more
+        https://bugs.webkit.org/show_bug.cgi?id=169668
+        &lt;rdar://problem/31059699&gt;
+
+        Reviewed by Dean Jackson.
+
+        Always use six digits to display times when the overall media duration is an hour or more. This
+        ensures that we don't display too much white space around labels when we know we will eventually
+        need six digits to display the full time, but the current time to display is under an hour.
+
+        Test: media/modern-media-controls/time-control/time-control-use-six-digits-for-time-labels.html
+
+        * Modules/modern-media-controls/controls/time-control.js:
+        (TimeControl.prototype.get useSixDigitsForTimeLabels):
+        (TimeControl.prototype.set useSixDigitsForTimeLabels):
+        (TimeControl.prototype.set width):
+        (TimeControl.prototype.get isSufficientlyWide):
+        (TimeControl.prototype._availableWidthHasChanged):
+        (TimeControl.prototype.get labelsMayDisplayTimesOverAnHour): Deleted.
+        (TimeControl.prototype.set labelsMayDisplayTimesOverAnHour): Deleted.
+        * Modules/modern-media-controls/controls/time-label.js:
+        (TimeLabel.prototype._formattedTime):
+        * Modules/modern-media-controls/media/time-labels-support.js:
+        (TimeLabelsSupport.prototype.syncControl):
+        (TimeLabelsSupport):
+
</ins><span class="cx"> 2017-03-15  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Sort Xcode project files
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolstimecontroljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/time-control.js (213979 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/time-control.js        2017-03-15 10:19:04 UTC (rev 213979)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/time-control.js        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -41,29 +41,29 @@
</span><span class="cx">             layoutDelegate
</span><span class="cx">         });
</span><span class="cx"> 
</span><del>-        this.elapsedTimeLabel = new TimeLabel;
</del><ins>+        this._useSixDigitsForTimeLabels = false;
+
+        this.elapsedTimeLabel = new TimeLabel(this);
</ins><span class="cx">         this.scrubber = new Scrubber(layoutDelegate);
</span><del>-        this.remainingTimeLabel = new TimeLabel;
</del><ins>+        this.remainingTimeLabel = new TimeLabel(this);
</ins><span class="cx"> 
</span><span class="cx">         this.children = [this.elapsedTimeLabel, this.scrubber, this.remainingTimeLabel];
</span><del>-
-        this._labelsMayDisplayTimesOverAnHour = false;
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><del>-    get labelsMayDisplayTimesOverAnHour()
</del><ins>+    get useSixDigitsForTimeLabels()
</ins><span class="cx">     {
</span><del>-        return this._labelsMayDisplayTimesOverAnHour;
</del><ins>+        return this._useSixDigitsForTimeLabels;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    set labelsMayDisplayTimesOverAnHour(flag)
</del><ins>+    set useSixDigitsForTimeLabels(flag)
</ins><span class="cx">     {
</span><del>-        if (this._labelsMayDisplayTimesOverAnHour === flag)
</del><ins>+        if (this._useSixDigitsForTimeLabels === flag)
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        this._labelsMayDisplayTimesOverAnHour = flag;
-        this.layout();
</del><ins>+        this._useSixDigitsForTimeLabels = flag;
+        this._availableWidthHasChanged();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     get width()
</span><span class="lines">@@ -74,8 +74,19 @@
</span><span class="cx">     set width(width)
</span><span class="cx">     {
</span><span class="cx">         super.width = width;
</span><ins>+        this._availableWidthHasChanged();
+    }
</ins><span class="cx"> 
</span><del>-        const extraWidth = this._labelsMayDisplayTimesOverAnHour ? AdditionalTimeLabelWidthOverAnHour : 0;
</del><ins>+    get isSufficientlyWide()
+    {
+        return this.scrubber.width &gt;= ((this.layoutTraits &amp; LayoutTraits.Compact) ? MinimumScrubberWidthCompact : MinimumScrubberWidthDefault);
+    }
+
+    // Protected
+
+    _availableWidthHasChanged()
+    {
+        const extraWidth = this._useSixDigitsForTimeLabels ? AdditionalTimeLabelWidthOverAnHour : 0;
</ins><span class="cx">         const elapsedTimeLabelWidth = ElapsedTimeLabelWidth + extraWidth;
</span><span class="cx">         const remainingTimeLabelWidth = RemainingTimeLabelWidth + extraWidth;
</span><span class="cx"> 
</span><span class="lines">@@ -82,13 +93,8 @@
</span><span class="cx">         this.elapsedTimeLabel.x = ElapsedTimeLabelLeftMargin;
</span><span class="cx">         this.elapsedTimeLabel.width = elapsedTimeLabelWidth;
</span><span class="cx">         this.scrubber.x = this.elapsedTimeLabel.x + elapsedTimeLabelWidth + ScrubberMargin;
</span><del>-        this.scrubber.width = this._width - elapsedTimeLabelWidth - ScrubberMargin - remainingTimeLabelWidth;
</del><ins>+        this.scrubber.width = this.width - elapsedTimeLabelWidth - ScrubberMargin - remainingTimeLabelWidth;
</ins><span class="cx">         this.remainingTimeLabel.x = this.scrubber.x + this.scrubber.width + ScrubberMargin;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    get isSufficientlyWide()
-    {
-        return this.scrubber.width &gt;= ((this.layoutTraits &amp; LayoutTraits.Compact) ? MinimumScrubberWidthCompact : MinimumScrubberWidthDefault);
-    }
-
</del><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolscontrolstimelabeljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/modern-media-controls/controls/time-label.js (213979 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/controls/time-label.js        2017-03-15 10:19:04 UTC (rev 213979)
+++ trunk/Source/WebCore/Modules/modern-media-controls/controls/time-label.js        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -26,11 +26,12 @@
</span><span class="cx"> class TimeLabel extends LayoutNode
</span><span class="cx"> {
</span><span class="cx"> 
</span><del>-    constructor()
</del><ins>+    constructor(timeControl)
</ins><span class="cx">     {
</span><span class="cx">         super(`&lt;div class=&quot;time-label&quot;&gt;&lt;/div&gt;`);
</span><span class="cx"> 
</span><span class="cx">         this.value = 0;
</span><ins>+        this._timeControl = timeControl;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Public
</span><span class="lines">@@ -70,7 +71,7 @@
</span><span class="cx">         const intHours = Math.floor(absTime / (60 * 60)).toFixed(0);
</span><span class="cx"> 
</span><span class="cx">         const timeStrings = [intMinutes, intSeconds];
</span><del>-        if (intHours &gt; 0)
</del><ins>+        if (intHours &gt; 0 || (this._timeControl &amp;&amp; this._timeControl.useSixDigitsForTimeLabels))
</ins><span class="cx">             timeStrings.unshift(intHours);
</span><span class="cx"> 
</span><span class="cx">         const sign = time &lt; 0 ? &quot;-&quot; : &quot;&quot;;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmodernmediacontrolsmediatimelabelssupportjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/modern-media-controls/media/time-labels-support.js (213979 => 213980)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/modern-media-controls/media/time-labels-support.js        2017-03-15 10:19:04 UTC (rev 213979)
+++ trunk/Source/WebCore/Modules/modern-media-controls/media/time-labels-support.js        2017-03-15 12:42:38 UTC (rev 213980)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx">         this.control.elapsedTimeLabel.value = shouldShowZeroDurations ? 0 : media.currentTime;
</span><span class="cx">         this.control.remainingTimeLabel.value = shouldShowZeroDurations ? 0 : (media.currentTime - media.duration);
</span><del>-        this.control.labelsMayDisplayTimesOverAnHour = !shouldShowZeroDurations &amp;&amp; media.duration &gt;= (60 * 60);
</del><ins>+        this.control.useSixDigitsForTimeLabels = !shouldShowZeroDurations &amp;&amp; media.duration &gt;= (60 * 60);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>