[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

vestbo at webkit.org vestbo at webkit.org
Thu Apr 8 01:57:02 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 75728b3218bb47ee78219b52a6cdb01d5992c904
Author: vestbo at webkit.org <vestbo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 23 16:00:07 2010 +0000

    [Qt] Prevent the media backend from handling non-audio or -video mime types
    
    Reviewed by Eric Carlson.
    
    * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55153 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 08acc4d..08e4b1b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,11 @@
+2010-02-23  Tor Arne Vestbø  <tor.arne.vestbo at nokia.com>
+
+        Reviewed by Eric Carlson.
+
+        [Qt] Prevent the media backend from handling non-audio or -video mime types
+
+        * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
+
 2010-02-23  Evan Martin  <evan at chromium.org>
 
         Reviewed by Jeremy Orlow.
diff --git a/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp b/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp
index 6a7b4a2..1b75fdd 100644
--- a/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp
+++ b/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp
@@ -65,12 +65,18 @@ void MediaPlayerPrivate::getSupportedTypes(HashSet<String> &supported)
 {
     QStringList types = QMediaPlayer::supportedMimeTypes();
 
-    for (int i = 0; i < types.size(); i++)
-        supported.add(types.at(i));
+    for (int i = 0; i < types.size(); i++) {
+        QString mime = types.at(i);
+        if (mime.startsWith("audio/") || mime.startsWith("video/"))
+            supported.add(mime);
+    }
 }
 
 MediaPlayer::SupportsType MediaPlayerPrivate::supportsType(const String& mime, const String& codec)
 {
+    if (!mime.startsWith("audio/") || !mime.startsWith("video/"))
+        return MediaPlayer::IsNotSupported;
+
     if (QMediaPlayer::hasSupport(mime, QStringList(codec)) >= QtMultimedia::ProbablySupported)
         return MediaPlayer::IsSupported;
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list