Changeset 66541 in webkit


Ignore:
Timestamp:
Aug 31, 2010 2:51:45 PM (14 years ago)
Author:
eric.carlson@apple.com
Message:

2010-08-31 Eric Carlson <eric.carlson@apple.com>

Reviewed by Darin Adler.

canPlayType("application/octet-stream") must return ""
https://bugs.webkit.org/show_bug.cgi?id=44985

  • platform/graphics/MediaPlayer.cpp: (WebCore::MediaPlayer::supportsType): Always return IsNotSupported for application/octet-stream

2010-08-31 Eric Carlson <eric.carlson@apple.com>

Reviewed by Darin Adler.

canPlayType("application/octet-stream") must return ""
https://bugs.webkit.org/show_bug.cgi?id=44985

  • media/media-can-play-octet-stream-expected.txt:
  • media/media-can-play-octet-stream.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r66539 r66541  
     12010-08-31  Eric Carlson  <eric.carlson@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        canPlayType("application/octet-stream") must return ""
     6        https://bugs.webkit.org/show_bug.cgi?id=44985
     7
     8        * media/media-can-play-octet-stream-expected.txt:
     9        * media/media-can-play-octet-stream.html:
     10
    1112010-08-31  Darin Adler  <darin@apple.com>
    212
  • trunk/LayoutTests/media/media-can-play-octet-stream-expected.txt

    r66023 r66541  
    22
    33++ Test with <video> element.
    4 EXPECTED (mediaElement.canPlayType('APPLICATION/octet-stream') == 'maybe') OK
     4EXPECTED (mediaElement.canPlayType('APPLICATION/octet-stream') == '') OK
    55EXPECTED (mediaElement.canPlayType('application/octet-stream;codecs=theora') == '') OK
    66EXPECTED (mediaElement.canPlayType('application/octet-stream;codecs=mp4') == '') OK
    77
    88++ Test with <audio> element.
    9 EXPECTED (mediaElement.canPlayType('APPLICATION/octet-stream') == 'maybe') OK
     9EXPECTED (mediaElement.canPlayType('APPLICATION/octet-stream') == '') OK
    1010EXPECTED (mediaElement.canPlayType('application/octet-stream;codecs=theora') == '') OK
    1111EXPECTED (mediaElement.canPlayType('application/octet-stream;codecs=mp4') == '') OK
  • trunk/LayoutTests/media/media-can-play-octet-stream.html

    r66023 r66541  
    1010            function test()
    1111            {
    12                 testExpected("mediaElement.canPlayType('APPLICATION/octet-stream')", "maybe");
     12                testExpected("mediaElement.canPlayType('APPLICATION/octet-stream')", "");
    1313                testExpected("mediaElement.canPlayType('application/octet-stream;codecs=theora')", "");
    1414                testExpected("mediaElement.canPlayType('application/octet-stream;codecs=mp4')", "");
  • trunk/WebCore/ChangeLog

    r66540 r66541  
     12010-08-31  Eric Carlson  <eric.carlson@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        canPlayType("application/octet-stream") must return ""
     6        https://bugs.webkit.org/show_bug.cgi?id=44985
     7
     8        * platform/graphics/MediaPlayer.cpp:
     9        (WebCore::MediaPlayer::supportsType): Always return IsNotSupported for application/octet-stream
     10
    1112010-08-31  Martin Robinson  <mrobinson@igalia.com>
    212
  • trunk/WebCore/platform/graphics/MediaPlayer.cpp

    r66023 r66541  
    560560    String typeCodecs = contentType.parameter(codecs());
    561561
    562     // 4.8.10.3 MIME types - In the absence of a specification to the contrary, the MIME type "application/octet-stream"
    563     // when used with parameters, e.g. "application/octet-stream;codecs=theora", is a type that the user agent knows
    564     // it cannot render.
    565     if (type == applicationOctetStream()) {
    566         if (!typeCodecs.isEmpty())
    567             return IsNotSupported;
    568        
    569         // The MIME type "application/octet-stream" with no parameters is never a type that the user agent knows it
    570         // cannot render.
    571         return MayBeSupported;
    572     }
     562    // 4.8.10.3 MIME types - The canPlayType(type) method must return the empty string if type is a type that the
     563    // user agent knows it cannot render or is the type "application/octet-stream"
     564    if (type == applicationOctetStream())
     565        return IsNotSupported;
    573566
    574567    MediaPlayerFactory* engine = chooseBestEngineForTypeAndCodecs(type, typeCodecs);
Note: See TracChangeset for help on using the changeset viewer.