<?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>22560</bug_id>
          
          <creation_ts>2013-07-03 17:27:36 +0000</creation_ts>
          <short_desc>[imports]: Recursion?</short_desc>
          <delta_ts>2013-07-19 15:03:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>HISTORICAL - Component Model</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>20683</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Nathan Hammond">w3.org</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>w3.org</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90243</commentid>
    <comment_count>0</comment_count>
    <who name="Nathan Hammond">w3.org</who>
    <bug_when>2013-07-03 17:27:36 +0000</bug_when>
    <thetext>It&apos;s sub-imports all the way down if we&apos;re not careful. This should probably specify how to handle the case where a document imports itself, or, more likely, accidentally imports a cycle.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90942</commentid>
    <comment_count>1</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-18 20:11:33 +0000</bug_when>
    <thetext>I am pretty sure we already handle recursion, even this early in the spec:

&quot;If LOCATION is already in the loaded import list, let IMPORT be the imported document for LOCATION and stop.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90951</commentid>
    <comment_count>2</comment_count>
    <who name="Nathan Hammond">w3.org</who>
    <bug_when>2013-07-18 21:59:29 +0000</bug_when>
    <thetext>My concern isn&apos;t for infinite recursion of pulling in the resource (easily handled with the collection of downloaded resources), it&apos;s that the user-agent rendering approach is unspecified when it encounters that behavior. (I don&apos;t know if there is a solution to this in the HTML Parsing spec, say for example, with iframes, if so, please forgive my ignorance.)

Aside: imports that load in a dynamically generated file that is different on each request could get hairy, but that might be an edge case that this spec doesn&apos;t care about.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90952</commentid>
    <comment_count>3</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-18 22:03:52 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; My concern isn&apos;t for infinite recursion of pulling in the resource (easily
&gt; handled with the collection of downloaded resources), it&apos;s that the
&gt; user-agent rendering approach is unspecified when it encounters that
&gt; behavior. (I don&apos;t know if there is a solution to this in the HTML Parsing
&gt; spec, say for example, with iframes, if so, please forgive my ignorance.)

Can you explain this to me a bit more? I don&apos;t understand the problem yet.

&gt; Aside: imports that load in a dynamically generated file that is different
&gt; on each request could get hairy, but that might be an edge case that this
&gt; spec doesn&apos;t care about.

Sure. You should be allowed to shoot yourself in the foot. We&apos;re not a nanny state system :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90968</commentid>
    <comment_count>4</comment_count>
    <who name="Nathan Hammond">w3.org</who>
    <bug_when>2013-07-19 03:45:32 +0000</bug_when>
    <thetext>I think it is easiest to describe by example:

***

GET /recursion.html

&lt;html&gt;
&lt;head&gt;&lt;title&gt;RECURSION!&lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;This is recursion.html&lt;/h1&gt;
&lt;iframe src=&quot;/recursion.html&quot; /&gt;
&lt;/body&gt;
&lt;/body&gt;
&lt;/html&gt;

***

- Firefox currently doesn&apos;t render the iframe&apos;s content at all.
- WebKit (Chrome + Safari) renders one deep.
- Opera (Presto) renders 4 deep.
- Cycles stop at number in cycle (N) * (rendering depth) from above.

What *should* the behavior be for the representation of rendering for recursive imports? It doesn&apos;t appear to be specified anywhere as there isn&apos;t a single agreeing implementation across the three engines I have readily accessible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90992</commentid>
    <comment_count>5</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2013-07-19 15:03:08 +0000</bug_when>
    <thetext>(In reply to comment #4)

&gt; What *should* the behavior be for the representation of rendering for
&gt; recursive imports? 

Unlike iframes, the imports aren&apos;t rendered. I still don&apos;t understand the problem you&apos;re trying to describe.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>