Title: [98988] trunk
- Revision
- 98988
- Author
- jer.no...@apple.com
- Date
- 2011-11-01 12:05:22 -0700 (Tue, 01 Nov 2011)
Log Message
Four media tests failing on Lion due to incorrect cached times.
https://bugs.webkit.org/show_bug.cgi?id=69574
Reviewed by Eric Carlson.
Source/WebCore:
Do not invalidate the cached time when receiving a mediaPlayerRateChanged notification
while paused. AVFoundation in particular can return different results for currentTime()
when asked after being paused, breaking layout tests.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerRateChanged):
LayoutTests:
Some media engines will cause multiple timeupdate events after pausing; so deregister
the timeupdate event listener after receiving the first one.
* media/video-pause-immediately.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (98987 => 98988)
--- trunk/LayoutTests/ChangeLog 2011-11-01 18:54:51 UTC (rev 98987)
+++ trunk/LayoutTests/ChangeLog 2011-11-01 19:05:22 UTC (rev 98988)
@@ -1,3 +1,15 @@
+2011-11-01 Jer Noble <jer.no...@apple.com>
+
+ Four media tests failing on Lion due to incorrect cached times.
+ https://bugs.webkit.org/show_bug.cgi?id=69574
+
+ Reviewed by Eric Carlson.
+
+ Some media engines will cause multiple timeupdate events after pausing; so deregister
+ the timeupdate event listener after receiving the first one.
+
+ * media/video-pause-immediately.html:
+
2011-11-01 Ryosuke Niwa <rn...@webkit.org>
Rebaseline after r98896.
Modified: trunk/LayoutTests/media/video-pause-immediately.html (98987 => 98988)
--- trunk/LayoutTests/media/video-pause-immediately.html 2011-11-01 18:54:51 UTC (rev 98987)
+++ trunk/LayoutTests/media/video-pause-immediately.html 2011-11-01 19:05:22 UTC (rev 98988)
@@ -27,6 +27,7 @@
function timeupdate()
{
+ video.removeEventListener("timeupdate", timeupdate);
if (video.currentTime > 0) {
video.pause();
timeAfterPause = video.currentTime;
Modified: trunk/Source/WebCore/ChangeLog (98987 => 98988)
--- trunk/Source/WebCore/ChangeLog 2011-11-01 18:54:51 UTC (rev 98987)
+++ trunk/Source/WebCore/ChangeLog 2011-11-01 19:05:22 UTC (rev 98988)
@@ -1,3 +1,17 @@
+2011-11-01 Jer Noble <jer.no...@apple.com>
+
+ Four media tests failing on Lion due to incorrect cached times.
+ https://bugs.webkit.org/show_bug.cgi?id=69574
+
+ Reviewed by Eric Carlson.
+
+ Do not invalidate the cached time when receiving a mediaPlayerRateChanged notification
+ while paused. AVFoundation in particular can return different results for currentTime()
+ when asked after being paused, breaking layout tests.
+
+ * html/HTMLMediaElement.cpp:
+ (WebCore::HTMLMediaElement::mediaPlayerRateChanged):
+
2011-11-01 Gavin Peters <gav...@chromium.org>
properly end requests when a bad status code return happens
Modified: trunk/Source/WebCore/html/HTMLMediaElement.cpp (98987 => 98988)
--- trunk/Source/WebCore/html/HTMLMediaElement.cpp 2011-11-01 18:54:51 UTC (rev 98987)
+++ trunk/Source/WebCore/html/HTMLMediaElement.cpp 2011-11-01 19:05:22 UTC (rev 98988)
@@ -2294,12 +2294,11 @@
beginProcessingMediaPlayerCallback();
- invalidateCachedTime();
-
// Stash the rate in case the one we tried to set isn't what the engine is
// using (eg. it can't handle the rate we set)
m_playbackRate = m_player->rate();
- invalidateCachedTime();
+ if (m_playing)
+ invalidateCachedTime();
endProcessingMediaPlayerCallback();
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes