[EFL] media/video-seek-past-end-playing.html is flaky
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jun 2012 01:32:28 +0000 (01:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Jun 2012 01:32:28 +0000 (01:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=89301

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-18
Reviewed by Philippe Normand.

Source/WebCore:

Switch to double for media duration and playback position
calculations to avoid precision problems.
This patch also removes the workaround for the precision
problem in didEnd() which is no longer needed.

Test: media/video-seek-past-end-playing.html

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
(WebCore::MediaPlayerPrivateGStreamer::duration):

LayoutTests:

Unskip media/video-seek-past-end-playing.html now that the
precision problem in MediaPlayerPrivateGStreamer is fixed.

* platform/efl/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120654 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/efl/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

index 71a86f0..7d5bbbd 100644 (file)
@@ -1,3 +1,15 @@
+2012-06-18  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [EFL] media/video-seek-past-end-playing.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=89301
+
+        Reviewed by Philippe Normand.
+
+        Unskip media/video-seek-past-end-playing.html now that the
+        precision problem in MediaPlayerPrivateGStreamer is fixed.
+
+        * platform/efl/TestExpectations:
+
 2012-06-18  Andrew Scherkus  <scherkus@chromium.org>
 
         [Chromium] Unreviewed. Rebaseline media layout tests due to updated controls.
index 1e69d37..9a13740 100644 (file)
@@ -155,7 +155,6 @@ BUGWK86081 : loader/navigation-while-deferring-loads.html = TEXT PASS
 BUGWK86082 : security/block-test.html = TEXT PASS
 BUGWK86084 : svg/dom/SVGScriptElement/script-onerror-bubbling.svg = TEXT PASS
 BUGWK60103 : fast/replaced/border-radius-clip.html = TEXT PASS
-BUGWK89301 : media/video-seek-past-end-playing.html = TEXT PASS
 
 //////////////////////////////////////////////////////////////////////////////////////////
 // FAILING TESTS
index 9db9a3f..57505d9 100644 (file)
@@ -1,3 +1,21 @@
+2012-06-18  Christophe Dumez  <christophe.dumez@intel.com>
+
+        [EFL] media/video-seek-past-end-playing.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=89301
+
+        Reviewed by Philippe Normand.
+
+        Switch to double for media duration and playback position
+        calculations to avoid precision problems.
+        This patch also removes the workaround for the precision
+        problem in didEnd() which is no longer needed.
+
+        Test: media/video-seek-past-end-playing.html
+
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::playbackPosition):
+        (WebCore::MediaPlayerPrivateGStreamer::duration):
+
 2012-06-18  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r120593.
index e5d99ee..ac33ca7 100644 (file)
@@ -331,7 +331,7 @@ float MediaPlayerPrivateGStreamer::playbackPosition() const
     // Position is available only if the pipeline is not in GST_STATE_NULL or
     // GST_STATE_READY state.
     if (position != static_cast<gint64>(GST_CLOCK_TIME_NONE))
-        ret = static_cast<float>(position) / static_cast<float>(GST_SECOND);
+        ret = static_cast<double>(position) / GST_SECOND;
 
     LOG_VERBOSE(Media, "Position %" GST_TIME_FORMAT, GST_TIME_ARGS(position));
 
@@ -411,7 +411,7 @@ float MediaPlayerPrivateGStreamer::duration() const
 
     LOG_VERBOSE(Media, "Duration: %" GST_TIME_FORMAT, GST_TIME_ARGS(timeLength));
 
-    return (float) ((guint64) timeLength / 1000000000.0);
+    return static_cast<double>(timeLength) / GST_SECOND;
     // FIXME: handle 3.14.9.5 properly
 }
 
@@ -1356,12 +1356,10 @@ void MediaPlayerPrivateGStreamer::timeChanged()
 void MediaPlayerPrivateGStreamer::didEnd()
 {
     // EOS was reached but the position is not always 0 in case of
-    // reverse playback (or the same as duration in case of forward
-    // playback). So to not confuse the HTMLMediaElement, we
+    // reverse playback. So to not confuse the HTMLMediaElement, we
     // synchronize position and duration values.
     float now = currentTime();
-    if ((now > 0 && m_playbackRate < 0)
-        || (now < duration() && m_playbackRate > 0)) {
+    if (now > 0 && m_playbackRate < 0) {
         m_mediaDuration = now;
         m_mediaDurationKnown = true;
         m_player->durationChanged();