[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
vestbo at webkit.org
vestbo at webkit.org
Wed Mar 17 17:57:22 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit df84cef7397c7554cbbea88294088ee35f0dba1a
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