[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-142-g786665c

eric.carlson at apple.com eric.carlson at apple.com
Mon Dec 27 16:31:06 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit bcc2854d3f7a39458edb202eb502e4c65a1fd2be
Author: eric.carlson at apple.com <eric.carlson at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 22 22:11:14 2010 +0000

    2010-12-22  Eric Carlson  <eric.carlson at apple.com>
    
            Reviewed by Darin Adler.
    
            MediaPlayer should look for MIME type in data: URL
            https://bugs.webkit.org/show_bug.cgi?id=51195
    
            If no MIME type is passed from the media element for a data: URL, try to get it from
            the URL itself.
    
            No new tests are possible because the MIME type is just passed to the media engine.
    
            * platform/graphics/MediaPlayer.cpp:
            (WebCore::MediaPlayer::load):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74504 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index b345d03..8499342 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-12-22  Eric Carlson  <eric.carlson at apple.com>
+
+        Reviewed by Darin Adler.
+
+        MediaPlayer should look for MIME type in data: URL
+        https://bugs.webkit.org/show_bug.cgi?id=51195
+
+        If no MIME type is passed from the media element for a data: URL, try to get it from
+        the URL itself.
+
+        No new tests are possible because the MIME type is just passed to the media engine.
+
+        * platform/graphics/MediaPlayer.cpp:
+        (WebCore::MediaPlayer::load):
+
 2010-12-22  W. James MacLean  <wjmaclean at chromium.org>
 
         Reviewed by Kenneth Russell.
diff --git a/WebCore/platform/graphics/MediaPlayer.cpp b/WebCore/platform/graphics/MediaPlayer.cpp
index 2baee95..abf5105 100644
--- a/WebCore/platform/graphics/MediaPlayer.cpp
+++ b/WebCore/platform/graphics/MediaPlayer.cpp
@@ -302,14 +302,18 @@ void MediaPlayer::load(const String& url, const ContentType& contentType)
     String type = contentType.type().lower();
     String typeCodecs = contentType.parameter(codecs());
 
-    // If the MIME type is unhelpful, see if the type registry has a match for the file extension.
+    // If the MIME type is missing or is not meaningful, try to figure it out from the URL.
     if (type.isEmpty() || type == applicationOctetStream() || type == textPlain()) {
-        size_t pos = url.reverseFind('.');
-        if (pos != notFound) {
-            String extension = url.substring(pos + 1);
-            String mediaType = MIMETypeRegistry::getMediaMIMETypeForExtension(extension);
-            if (!mediaType.isEmpty())
-                type = mediaType;
+        if (protocolIs(url, "data"))
+            type = mimeTypeFromDataURL(url);
+        else {
+            size_t pos = url.reverseFind('.');
+            if (pos != notFound) {
+                String extension = url.substring(pos + 1);
+                String mediaType = MIMETypeRegistry::getMediaMIMETypeForExtension(extension);
+                if (!mediaType.isEmpty())
+                    type = mediaType;
+            }
         }
     }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list