Title: [180696] trunk/Source/WebCore
Revision
180696
Author
d...@apple.com
Date
2015-02-26 13:04:06 -0800 (Thu, 26 Feb 2015)

Log Message

[iOS Media] incorrect front padding on time values
https://bugs.webkit.org/show_bug.cgi?id=142027
<rdar://problem/19960790>

Reviewed by Brent Fulgham.

My last commit was updating the OS X file,
not the iOS file.

We don't want to prefix times with a "0".

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.formatTime):
* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.formatTime):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (180695 => 180696)


--- trunk/Source/WebCore/ChangeLog	2015-02-26 20:40:57 UTC (rev 180695)
+++ trunk/Source/WebCore/ChangeLog	2015-02-26 21:04:06 UTC (rev 180696)
@@ -1,3 +1,21 @@
+2015-02-26  Dean Jackson  <d...@apple.com>
+
+        [iOS Media] incorrect front padding on time values
+        https://bugs.webkit.org/show_bug.cgi?id=142027
+        <rdar://problem/19960790>
+
+        Reviewed by Brent Fulgham.
+
+        My last commit was updating the OS X file,
+        not the iOS file.
+
+        We don't want to prefix times with a "0".
+
+        * Modules/mediacontrols/mediaControlsApple.js:
+        (Controller.prototype.formatTime):
+        * Modules/mediacontrols/mediaControlsiOS.js:
+        (ControllerIOS.prototype.formatTime):
+
 2015-02-26  Mark Lam  <mark....@apple.com>
 
         Rolling out r180602, r180608, r180613, r180617, r180671.

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js (180695 => 180696)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2015-02-26 20:40:57 UTC (rev 180695)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsApple.js	2015-02-26 21:04:06 UTC (rev 180696)
@@ -1009,7 +1009,7 @@
         if (intHours > 0)
             return sign + intHours + ':' + String('00' + intMinutes).slice(-2) + ":" + String('00' + intSeconds).slice(-2);
 
-        return (time < 0 ? '-' : String()) + String('00' + intMinutes).slice(-2) + ":" + String('00' + intSeconds).slice(-2)
+        return sign + String('00' + intMinutes).slice(-2) + ":" + String('00' + intSeconds).slice(-2)
     },
 
     updatePlaying: function()

Modified: trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js (180695 => 180696)


--- trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js	2015-02-26 20:40:57 UTC (rev 180695)
+++ trunk/Source/WebCore/Modules/mediacontrols/mediaControlsiOS.js	2015-02-26 21:04:06 UTC (rev 180696)
@@ -361,9 +361,9 @@
         var sign = time < 0 ? '-' : String();
 
         if (intHours > 0)
-            return sign + intHours + ':' + String('00' + intMinutes).slice(-2) + ":" + String('00' + intSeconds).slice(-2);
+            return sign + intHours + ':' + String('0' + intMinutes).slice(-2) + ":" + String('0' + intSeconds).slice(-2);
 
-        return sign + String('00' + intMinutes).slice(-2) + ":" + String('00' + intSeconds).slice(-2);
+        return sign + String('0' + intMinutes).slice(intMinutes >= 10 ? -2 : -1) + ":" + String('0' + intSeconds).slice(-2);
     },
 
     handleTimelineChange: function(event) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to