Title: [120090] branches/safari-536-branch
- Revision
- 120090
- Author
- lforsch...@apple.com
- Date
- 2012-06-12 10:11:35 -0700 (Tue, 12 Jun 2012)
Log Message
Merged r119739 -> <rdar://problem/11616643>
Modified Paths
Added Paths
Diff
Modified: branches/safari-536-branch/LayoutTests/ChangeLog (120089 => 120090)
--- branches/safari-536-branch/LayoutTests/ChangeLog 2012-06-12 17:08:25 UTC (rev 120089)
+++ branches/safari-536-branch/LayoutTests/ChangeLog 2012-06-12 17:11:35 UTC (rev 120090)
@@ -1,5 +1,19 @@
2012-06-12 Lucas Forschler <lforsch...@apple.com>
+ Merge 119739
+
+ 2012-06-07 Jer Noble <jer.no...@apple.com>
+
+ sometimes all slaved videos don't start playing
+ https://bugs.webkit.org/show_bug.cgi?id=88553
+
+ Reviewed by Darin Adler.
+
+ * media/media-controller-time-clamp-expected.txt: Added.
+ * media/media-controller-time-clamp.html: Added.
+
+2012-06-12 Lucas Forschler <lforsch...@apple.com>
+
Merge 119644
2012-06-06 Brady Eidson <beid...@apple.com>
Copied: branches/safari-536-branch/LayoutTests/media/media-controller-time-clamp-expected.txt (from rev 119739, trunk/LayoutTests/media/media-controller-time-clamp-expected.txt) (0 => 120090)
--- branches/safari-536-branch/LayoutTests/media/media-controller-time-clamp-expected.txt (rev 0)
+++ branches/safari-536-branch/LayoutTests/media/media-controller-time-clamp-expected.txt 2012-06-12 17:11:35 UTC (rev 120090)
@@ -0,0 +1,9 @@
+RUN(controller = video.controller)
+EVENT(canplaythrough)
+RUN(controller.currentTime = controller.duration - 0.05)
+RUN(video.play())
+RUN(controller.play())
+EVENT(ended)
+EXPECTED (controller.currentTime <= controller.duration == 'true') OK
+END OF TEST
+
Copied: branches/safari-536-branch/LayoutTests/media/media-controller-time-clamp.html (from rev 119739, trunk/LayoutTests/media/media-controller-time-clamp.html) (0 => 120090)
--- branches/safari-536-branch/LayoutTests/media/media-controller-time-clamp.html (rev 0)
+++ branches/safari-536-branch/LayoutTests/media/media-controller-time-clamp.html 2012-06-12 17:11:35 UTC (rev 120090)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src=""
+ <script src=""
+
+ <script>
+ var controller;
+ var video;
+
+ function start() {
+ video = document.getElementById('video');
+ run('controller = video.controller');
+ controller.addEventListener('canplaythrough', canplaythrough, true);
+ var src = "" 'content/test');
+ video.src = ""
+ }
+
+ function canplaythrough() {
+ consoleWrite("EVENT(canplaythrough)");
+ controller.removeEventListener('canplaythrough', canplaythrough, true);
+ controller.addEventListener('ended', ended, true);
+ // 0.05 is greater than one frame of this 25fps video.
+ run('controller.currentTime = controller.duration - 0.05');
+ run('video.play()');
+ run('controller.play()');
+ }
+
+ function ended() {
+ consoleWrite("EVENT(ended)");
+ testExpected("controller.currentTime <= controller.duration", true);
+ endTest();
+ }
+ </script>
+ </head>
+ <body _onload_="start()">
+ <video id="video" mediaGroup="group" controls></video>
+ </body>
+</html>
\ No newline at end of file
Modified: branches/safari-536-branch/Source/WebCore/ChangeLog (120089 => 120090)
--- branches/safari-536-branch/Source/WebCore/ChangeLog 2012-06-12 17:08:25 UTC (rev 120089)
+++ branches/safari-536-branch/Source/WebCore/ChangeLog 2012-06-12 17:11:35 UTC (rev 120090)
@@ -1,5 +1,25 @@
2012-06-12 Lucas Forschler <lforsch...@apple.com>
+ Merge 119739
+
+ 2012-06-07 Jer Noble <jer.no...@apple.com>
+
+ sometimes all slaved videos don't start playing
+ https://bugs.webkit.org/show_bug.cgi?id=88553
+
+ Reviewed by Darin Adler.
+
+ Test: media/media-controller-time-clamp.html
+
+ Some PlatformClock classes will occasionally return times < 0 and will
+ always return times slightly > duration() when playback has ended. Clamp
+ the value of currentTime() to the specified [0..duration] range.
+
+ * html/MediaController.cpp:
+ (MediaController::currentTime):
+
+2012-06-12 Lucas Forschler <lforsch...@apple.com>
+
Merge 119644
2012-06-06 Brady Eidson <beid...@apple.com>
Modified: branches/safari-536-branch/Source/WebCore/html/MediaController.cpp (120089 => 120090)
--- branches/safari-536-branch/Source/WebCore/html/MediaController.cpp 2012-06-12 17:08:25 UTC (rev 120089)
+++ branches/safari-536-branch/Source/WebCore/html/MediaController.cpp 2012-06-12 17:11:35 UTC (rev 120090)
@@ -142,8 +142,9 @@
{
if (m_mediaElements.isEmpty())
return 0;
-
- return m_clock->currentTime();
+
+ // Some clocks may return times outside the range of [0..duration].
+ return max(0.0f, min(duration(), m_clock->currentTime()));
}
void MediaController::setCurrentTime(float time, ExceptionCode& code)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes