Changeset 141630 in webkit


Ignore:
Timestamp:
Feb 1, 2013 12:44:28 PM (11 years ago)
Author:
jer.noble@apple.com
Message:

REGRESSION (r141281): Navigating to this HTTP Live Streaming (application/vnd.apple.mpegurl) URL downloads a file instead of playing it in the browser
https://bugs.webkit.org/show_bug.cgi?id=108674
<rdar://problem/13133595>

Reviewed by Eric Carlson.

When passed a HashSet of available MIME types to fill out, QTKit was overwriting the contents, which were
AVFoundation's supported types. Instead, it should be appending to the list of supported types.

  • platform/graphics/mac/MediaPlayerPrivateQTKit.mm:

(WebCore::concatenateHashSets): Added static utility function.
(WebCore::MediaPlayerPrivateQTKit::getSupportedTypes): Concatenate instead of overwriting the passed in MIME types.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141625 r141630  
     12013-02-01  Jer Noble  <jer.noble@apple.com>
     2
     3        REGRESSION (r141281): Navigating to this HTTP Live Streaming (application/vnd.apple.mpegurl) URL downloads a file instead of playing it in the browser
     4        https://bugs.webkit.org/show_bug.cgi?id=108674
     5        <rdar://problem/13133595>
     6
     7        Reviewed by Eric Carlson.
     8
     9        When passed a HashSet of available MIME types to fill out, QTKit was overwriting the contents, which were
     10        AVFoundation's supported types. Instead, it should be appending to the list of supported types.
     11
     12        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
     13        (WebCore::concatenateHashSets): Added static utility function.
     14        (WebCore::MediaPlayerPrivateQTKit::getSupportedTypes): Concatenate instead of overwriting the passed in MIME types.
     15
    1162013-02-01  Beth Dakin  <bdakin@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm

    r141281 r141630  
    15171517   
    15181518    return cache;
    1519 }
     1519}
     1520
     1521static void concatenateHashSets(HashSet<String>& destination, const HashSet<String>& source)
     1522{
     1523    HashSet<String>::const_iterator it = source.begin();
     1524    HashSet<String>::const_iterator end = source.end();
     1525    for (; it != end; ++it)
     1526        destination.add(*it);
     1527}
    15201528
    15211529void MediaPlayerPrivateQTKit::getSupportedTypes(HashSet<String>& supportedTypes)
    15221530{
    1523     supportedTypes = mimeModernTypesCache();
    1524    
     1531    concatenateHashSets(supportedTypes, mimeModernTypesCache());
     1532
    15251533    // Note: this method starts QTKitServer if it isn't already running when in 64-bit because it has to return the list
    15261534    // of every MIME type supported by QTKit.
    1527     HashSet<String> commonTypes = mimeCommonTypesCache();
    1528     HashSet<String>::const_iterator it = commonTypes.begin();
    1529     HashSet<String>::const_iterator end = commonTypes.end();
    1530     for (; it != end; ++it)
    1531         supportedTypes.add(*it);
    1532 }
     1535    concatenateHashSets(supportedTypes, mimeCommonTypesCache());
     1536}
    15331537
    15341538MediaPlayer::SupportsType MediaPlayerPrivateQTKit::supportsType(const String& type, const String& codecs, const KURL&)
Note: See TracChangeset for help on using the changeset viewer.