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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>7631</bug_id>
          
          <creation_ts>2009-09-15 14:39:14 +0000</creation_ts>
          <short_desc>Don&apos;t invoke resource selection algorithm when inserting &lt;source&gt; if src=&quot;&quot; is present</short_desc>
          <delta_ts>2010-10-04 13:57:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>NE</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>27181</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2009-09-15 14:39:14 +0000</bug_when>
    <thetext>The spec says

&quot;If a source element is inserted as a child of a media element that is in a Document and whose networkState has the value NETWORK_EMPTY, the user agent must invoke the media element&apos;s resource selection algorithm.&quot;

A media element can have networkState be NETWORK_EMPTY while also having a src=&quot;&quot; attribute if:

...the connection is interrupted, causing the user agent to give up trying to fetch the resource, or
...the media data is corrupted, or
...the media data fetching process is aborted by the user, and the media element&apos;s readyState attribute had a value equal to HAVE_NOTHING

When inserting a &lt;source&gt; element into such a media element, the resource selection algorithm will be run, and it will see that there is a src attribute and try to use it again, which will fail in the same way.

If an author inserts a &lt;source&gt; in the onemptied=&quot;&quot; event listener, then there will be an infinite (async) loop.

Maybe the spec should also check that the media element does not have a src attribute before running the resource selection algorithm when inserting a &lt;source&gt; element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27185</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2009-09-15 15:33:09 +0000</bug_when>
    <thetext>Alternatively, maybe the spec should say that those three cases don&apos;t set networkState to NETWORK_EMPTY but to something else (e.g. NETWORK_NO_SOURCE).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>27373</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2009-09-21 09:27:56 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r3924.
Check-in comment: Avoid inserting a &lt;source&gt; being the trigger for retrying the src=&apos;&apos;, since that makes no sense.
http://html5.org/tools/web-apps-tracker?from=3923&amp;to=3924
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>