[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

eric.carlson at apple.com eric.carlson at apple.com
Wed Dec 22 12:47:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit e28be3463d01dc1063ba934bed6666a94f0f2373
Author: eric.carlson at apple.com <eric.carlson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 30 17:18:32 2010 +0000

    2010-08-30  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Dan Bernstein.
    
            Disable automatic looping
            https://bugs.webkit.org/show_bug.cgi?id=44844
    
            Test: media/video-does-not-loop.html
    
            * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
            (WebCore::MediaPlayerPrivate::createQTMovie): Disable QuickTime automatic looping.
    
            * platform/graphics/win/QTMovie.cpp:
            (QTMoviePrivate::createMovieController): Ditto.
    
    2010-08-30  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Dan Bernstein.
    
            Disable automatic looping
            https://bugs.webkit.org/show_bug.cgi?id=44844
    
            * media/content/silence-loop.mov: Added.
            * media/video-does-not-loop-expected.txt: Added.
            * media/video-does-not-loop.html: Added.
            * platform/chromium/test_expectations.txt: Skip new test.
            * platform/gtk/Skipped: Ditto.
            * platform/qt/Skipped: Ditto.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66395 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 0a812e4..2fa789d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-30  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Disable automatic looping
+        https://bugs.webkit.org/show_bug.cgi?id=44844
+
+        * media/content/silence-loop.mov: Added.
+        * media/video-does-not-loop-expected.txt: Added.
+        * media/video-does-not-loop.html: Added.
+        * platform/chromium/test_expectations.txt: Skip new test.
+        * platform/gtk/Skipped: Ditto.
+        * platform/qt/Skipped: Ditto.
+
 2010-08-30  Martin Robinson  <mrobinson at igalia.com>
 
         Adding layout and pixel results in preparation for landing GTK+ shadow performance improvements.
diff --git a/LayoutTests/media/content/silence-loop.mov b/LayoutTests/media/content/silence-loop.mov
new file mode 100644
index 0000000..2a4bfe4
Binary files /dev/null and b/LayoutTests/media/content/silence-loop.mov differ
diff --git a/LayoutTests/media/video-does-not-loop-expected.txt b/LayoutTests/media/video-does-not-loop-expected.txt
new file mode 100644
index 0000000..da4ad7d
--- /dev/null
+++ b/LayoutTests/media/video-does-not-loop-expected.txt
@@ -0,0 +1,23 @@
+Test to make sure QuickTime movie saved with 'loop' user data does not loop automatically.
+
+++ Test initial state.
+EXPECTED (video.loop == 'false') OK
+EVENT(loadedmetadata)
+
+++ seek to near the end to reduce test time.
+RUN(video.currentTime = video.duration - 0.4)
+EVENT(seeked)
+
+++ seek completed, beginning playback.
+EXPECTED (video.paused == 'true') OK
+EXPECTED (video.ended == 'false') OK
+RUN(video.play())
+
+EVENT(ended)
+
+++ played to end and stopped.
+EXPECTED (video.ended == 'true') OK
+EXPECTED (mediaElement.currentTime == 'mediaElement.duration') OK
+
+END OF TEST
+
diff --git a/LayoutTests/media/video-does-not-loop.html b/LayoutTests/media/video-does-not-loop.html
new file mode 100644
index 0000000..3a30d74
--- /dev/null
+++ b/LayoutTests/media/video-does-not-loop.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <style> video { height: 25px; width: 300px; } </style>
+        <script src=video-test.js></script>
+    
+        <script>
+            var seekCount = 0;
+    
+            function loadedmetadata()
+            {
+                consoleWrite("<br><em>++ seek to near the end to reduce test time.</em>");
+                run("video.currentTime = video.duration - 0.4");
+            }
+
+            function seeked()
+            {
+                if (++seekCount == 1)
+                {
+                    consoleWrite("<br><em>++ seek completed, beginning playback.</em>");
+                    testExpected("video.paused", true);
+                    testExpected("video.ended", false);
+                    run("video.play()");
+                    consoleWrite("");
+                }
+            }
+    
+            function ended() 
+            {
+                consoleWrite("<br><em>++ played to end and stopped.</em>");
+                testExpected("video.ended", true);
+
+                // don't use "testExpected()" so we won't log the actual duration as the floating point result may differ with different engines
+                reportExpected(mediaElement.currentTime == mediaElement.duration, "mediaElement.currentTime", "==", "mediaElement.duration", mediaElement.currentTime);
+
+                consoleWrite("");
+                endTest();
+            }
+    
+            function start()
+            {
+                findMediaElement();
+
+                consoleWrite("<em>++ Test initial state.</em>");
+                testExpected("video.loop", false);
+            
+                waitForEvent('pause');
+                waitForEvent("ended", ended);
+                waitForEvent("seeked", seeked);
+                waitForEvent("loadedmetadata", loadedmetadata);
+
+                video.src = "content/silence-loop.mov";
+            }
+        </script>
+
+    </head>
+    <body>
+        <video controls ></video>
+        <p>Test to make sure QuickTime movie saved with 'loop' user data does not loop automatically.</p>
+        <script>start()</script>
+    </body>
+</html>
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 44efe11..04bbb61 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -3215,3 +3215,5 @@ BUG53796 : fast/js/array-splice.html = TEXT
 // Need rebasline to pick the results.
 BUG47946 WIN LINUX MAC : scrollbars/custom-scrollbar-with-incomplete-style.html = MISSING
 
+// Doesn't apply to Chromium (QuickTime-specific behavior)
+WONTFIX SKIP : media/video-does-not-loop.html = TIMEOUT
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 1b23a45..837d3ac 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -3271,6 +3271,9 @@ media/media-captions.html
 # https://bugs.webkit.org/show_bug.cgi?id=33541 - Need platform specific results
 media/video-poster-scale.html
 
+# Test specific to QuickTime media engine
+media/video-does-not-loop.html
+
 # Tests in plugins/ directory
 #   Tests failing
 plugins/embed-attributes-setting.html
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index e75e24d..1750797 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -730,6 +730,9 @@ media/video-zoom.html
 # Video size reported as 0,0 due to how size-hints are reported by QtMultimedia
 media/video-poster-delayed.html
 
+# Test specific to QuickTime media engine
+media/video-does-not-loop.html
+
 # ============================================================================= #
 # Crashing tests due to re-enabled Phonon support in Buildbot's Qt              #
 # Skip these until a proper solution for the Phonon related crashes found.      #
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6b55d33..1bddea8 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-30  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Dan Bernstein.
+
+        Disable automatic looping
+        https://bugs.webkit.org/show_bug.cgi?id=44844
+
+        Test: media/video-does-not-loop.html
+
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        (WebCore::MediaPlayerPrivate::createQTMovie): Disable QuickTime automatic looping.
+
+        * platform/graphics/win/QTMovie.cpp:
+        (QTMoviePrivate::createMovieController): Ditto.
+
 2010-08-30  Ryosuke Niwa  <rniwa at webkit.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
index 769c0f0..665092a 100644
--- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
+++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
@@ -82,6 +82,7 @@ SOFT_LINK_POINTER(QTKit, QTMediaTypeSound, NSString *)
 SOFT_LINK_POINTER(QTKit, QTMediaTypeText, NSString *)
 SOFT_LINK_POINTER(QTKit, QTMediaTypeVideo, NSString *)
 SOFT_LINK_POINTER(QTKit, QTMovieAskUnresolvedDataRefsAttribute, NSString *)
+SOFT_LINK_POINTER(QTKit, QTMovieLoopsAttribute, NSString *)
 SOFT_LINK_POINTER(QTKit, QTMovieDataSizeAttribute, NSString *)
 SOFT_LINK_POINTER(QTKit, QTMovieDidEndNotification, NSString *)
 SOFT_LINK_POINTER(QTKit, QTMovieHasVideoAttribute, NSString *)
@@ -118,6 +119,7 @@ SOFT_LINK_POINTER(QTKit, QTMovieApertureModeAttribute, NSString *)
 #define QTMediaTypeText getQTMediaTypeText()
 #define QTMediaTypeVideo getQTMediaTypeVideo()
 #define QTMovieAskUnresolvedDataRefsAttribute getQTMovieAskUnresolvedDataRefsAttribute()
+#define QTMovieLoopsAttribute getQTMovieLoopsAttribute()
 #define QTMovieDataSizeAttribute getQTMovieDataSizeAttribute()
 #define QTMovieDidEndNotification getQTMovieDidEndNotification()
 #define QTMovieHasVideoAttribute getQTMovieHasVideoAttribute()
@@ -247,6 +249,7 @@ void MediaPlayerPrivate::createQTMovie(const String& url)
                        [NSNumber numberWithBool:YES], QTMoviePreventExternalURLLinksAttribute,
                        [NSNumber numberWithBool:YES], QTSecurityPolicyNoCrossSiteAttribute,
                        [NSNumber numberWithBool:NO], QTMovieAskUnresolvedDataRefsAttribute,
+                       [NSNumber numberWithBool:NO], QTMovieLoopsAttribute,
 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
                        [NSNumber numberWithBool:YES], @"QTMovieOpenForPlaybackAttribute",
 #endif
diff --git a/WebCore/platform/graphics/win/QTMovie.cpp b/WebCore/platform/graphics/win/QTMovie.cpp
index 032b446..cc1349a 100644
--- a/WebCore/platform/graphics/win/QTMovie.cpp
+++ b/WebCore/platform/graphics/win/QTMovie.cpp
@@ -240,6 +240,9 @@ void QTMoviePrivate::createMovieController()
     m_movieController = NewMovieController(m_movie, &bounds, flags);
     if (!m_movieController)
         return;
+
+    // Disable automatic looping.
+    MCDoAction(m_movieController, mcActionSetLooping, 0);
 }
 
 void QTMoviePrivate::cacheMovieScale()

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list