<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>58462</bug_id>
          
          <creation_ts>2011-04-13 11:33:50 -0700</creation_ts>
          <short_desc>Media engine fallback doesn&apos;t always work</short_desc>
          <delta_ts>2011-04-13 14:20:05 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, PlatformOnly</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Carlson">eric.carlson</reporter>
          <assigned_to name="Eric Carlson">eric.carlson</assigned_to>
          <cc>ap</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>385044</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2011-04-13 11:33:50 -0700</bug_when>
    <thetext>When a media engine fails to open a url before readyState reaches HAVE_METADATA, MediaPlayer::networkStateChanged is supposed to try to open it with the next media engine. This doesn&apos;t work when the file doesn&apos;t have a MIME type and doesn&apos;t have an extension, eg. opening https://bug-52552-attachments.webkit.org/attachment.cgi?id=79249 in a media document.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>385110</commentid>
    <comment_count>1</comment_count>
      <attachid>89424</attachid>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2011-04-13 12:00:00 -0700</bug_when>
    <thetext>Created attachment 89424
Proposed patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>385111</commentid>
    <comment_count>2</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2011-04-13 12:00:44 -0700</bug_when>
    <thetext>&lt;rdar://problem/9278261&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>385112</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-04-13 12:02:02 -0700</bug_when>
    <thetext>Attachment 89424 did not pass style-queue:

Failed to run &quot;[&apos;Tools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;Source/WebCore/ChangeLog&apos;, u&apos;Source/WebCor...&quot; exit_code: 1

Source/WebCore/platform/graphics/MediaPlayer.cpp:791:  Extra space after ( in if  [whitespace/parens] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>385114</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2011-04-13 12:03:53 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; Attachment 89424 [details] did not pass style-queue:
&gt; 
&gt; Failed to run &quot;[&apos;Tools/Scripts/check-webkit-style&apos;, &apos;--diff-files&apos;, u&apos;Source/WebCore/ChangeLog&apos;, u&apos;Source/WebCor...&quot; exit_code: 1
&gt; 
&gt; Source/WebCore/platform/graphics/MediaPlayer.cpp:791:  Extra space after ( in if  [whitespace/parens] [5]

Oh dear, I have been shamed by the pedantic-bot!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>385148</commentid>
    <comment_count>5</comment_count>
      <attachid>89424</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-04-13 12:33:52 -0700</bug_when>
    <thetext>Comment on attachment 89424
Proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=89424&amp;action=review

As discussed in person, it is wrong that we don&apos;t have a MIME type here - WebKit knew it when it decided to create a media document. Passing the MIME type down would be another way to fix this particular bug.

There are other ways to reach this code without a known MIME type, so the fix is still useful.

&gt; Source/WebCore/ChangeLog:8
&gt; +        No new tests, this was verified manually with the url noted in the bug.

This doesn&apos;t really explain why there is no regression test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>385221</commentid>
    <comment_count>6</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2011-04-13 14:20:05 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/83763</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>89424</attachid>
            <date>2011-04-13 12:00:00 -0700</date>
            <delta_ts>2011-04-13 12:33:52 -0700</delta_ts>
            <desc>Proposed patch.</desc>
            <filename>patch_1.txt</filename>
            <type>text/plain</type>
            <size>1822</size>
            <attacher name="Eric Carlson">eric.carlson</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDgzNzUwKQorKysgU291cmNlL1dlYkNvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTUgQEAKKzIwMTEtMDQtMTMgIEVyaWMgQ2Fy
bHNvbiAgPGVyaWMuY2FybHNvbkBhcHBsZS5jb20+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9C
T0RZIChPT1BTISkuCisKKyAgICAgICAgTWVkaWEgZW5naW5lIGZhbGxiYWNrIGRvZXNuJ3QgYWx3
YXlzIHdvcmsKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcm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ycm9yCi0gICAgICAg
ICYmIG1fcHJpdmF0ZS0+cmVhZHlTdGF0ZSgpIDwgSGF2ZU1ldGFkYXRhIAotICAgICAgICAmJiBp
bnN0YWxsZWRNZWRpYUVuZ2luZXMoKS5zaXplKCkgPiAxIAotICAgICAgICAmJiBiZXN0TWVkaWFF
bmdpbmVGb3JUeXBlQW5kQ29kZWNzKG1fY29udGVudE1JTUVUeXBlLCBtX2NvbnRlbnRUeXBlQ29k
ZWNzLCBtX2N1cnJlbnRNZWRpYUVuZ2luZSkpIHsKKyAgICAgICAgJiYgbV9wcml2YXRlLT5yZWFk
eVN0YXRlKCkgPCBIYXZlTWV0YWRhdGEKKyAgICAgICAgJiYgaW5zdGFsbGVkTWVkaWFFbmdpbmVz
KCkuc2l6ZSgpID4gMSkgeworICAgICAgICBpZiAoIG1fY29udGVudE1JTUVUeXBlLmlzRW1wdHko
KSB8fCBiZXN0TWVkaWFFbmdpbmVGb3JUeXBlQW5kQ29kZWNzKG1fY29udGVudE1JTUVUeXBlLCBt
X2NvbnRlbnRUeXBlQ29kZWNzLCBtX2N1cnJlbnRNZWRpYUVuZ2luZSkpIHsKICAgICAgICAgICAg
IG1fcmVsb2FkVGltZXIuc3RhcnRPbmVTaG90KDApOwogICAgICAgICAgICAgcmV0dXJuOworICAg
ICAgICB9CiAgICAgfQogICAgIGlmIChtX21lZGlhUGxheWVyQ2xpZW50KQogICAgICAgICBtX21l
ZGlhUGxheWVyQ2xpZW50LT5tZWRpYVBsYXllck5ldHdvcmtTdGF0ZUNoYW5nZWQodGhpcyk7Cg==
</data>
<flag name="review"
          id="82096"
          type_id="1"
          status="+"
          setter="ap"
    />
          </attachment>
      

    </bug>

</bugzilla>