<?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>16155</bug_id>
          
          <creation_ts>2012-02-28 23:28:38 +0000</creation_ts>
          <short_desc>Specify behavior for embedded content elements that have no browsing context</short_desc>
          <delta_ts>2013-02-18 12:07:16 +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>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</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>15653</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dimitri Glazkov">dglazkov</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>rafaelw</cc>
    
    <cc>robin</cc>
    
    <cc>tross</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>64701</commentid>
    <comment_count>0</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-02-28 23:28:38 +0000</bug_when>
    <thetext>Gecko, WebKit, and IE all implement the same behavior for IMG, AUDIO, and VIDEO elements that have no associated browsing context: they don&apos;t fetch resources, since there is not document URL to resolve against.

We should add this to the spec. Perhaps a step in http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#resolve-a-url?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64823</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-03-01 15:10:11 +0000</bug_when>
    <thetext>There is absolutely a document url; I don&apos;t see how there could not be.  There is always a document url.

I believe we should simply define all of these elements to not do any fetches while their ownerDocument has no defaultView.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64832</commentid>
    <comment_count>2</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-03-01 17:23:18 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; There is absolutely a document url; I don&apos;t see how there could not be.  There
&gt; is always a document url.

Maybe this just need to be fleshed out in the DOM4 spec, but as of now, the URL is not set for document when creating it using DOMImplementation.createHTMLDocument:

http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domimplementation-createhtmldocument

WebKit in this case provides an empty URL (which seems in line with the spec):

http://jsfiddle.net/dglazkov/9pESJ/1/

Gecko returns &quot;about:blank&quot;.

IE9 returns the main document URL.

&gt; 
&gt; I believe we should simply define all of these elements to not do any fetches
&gt; while their ownerDocument has no defaultView.

Sure, that sounds good too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64838</commentid>
    <comment_count>3</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-03-01 17:40:12 +0000</bug_when>
    <thetext>&gt; as of now, the URL is not set for document when creating it using
&gt; DOMImplementation.createHTMLDocument:

There is an existing open bug on that, last I checked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64840</commentid>
    <comment_count>4</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-03-01 18:27:52 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; &gt; as of now, the URL is not set for document when creating it using
&gt; &gt; DOMImplementation.createHTMLDocument:
&gt; 
&gt; There is an existing open bug on that, last I checked.

Nifty. I can&apos;t seem to find it :( Maybe it doesn&apos;t have an URL? ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64844</commentid>
    <comment_count>5</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-03-01 18:37:33 +0000</bug_when>
    <thetext>Looks like it&apos;s not longer open.  https://www.w3.org/Bugs/Public/show_bug.cgi?id=13045

And DOMCore clearly says:

  Unless explicitly given when a document is created its encoding is utf-8, its
  content type is &quot;application/xml&quot;, and its URL is &quot;about:blank&quot;. 

right at http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-document-url</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64845</commentid>
    <comment_count>6</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-03-01 18:46:45 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Looks like it&apos;s not longer open. 
&gt; https://www.w3.org/Bugs/Public/show_bug.cgi?id=13045
&gt; 
&gt; And DOMCore clearly says:
&gt; 
&gt;   Unless explicitly given when a document is created its encoding is utf-8, its
&gt;   content type is &quot;application/xml&quot;, and its URL is &quot;about:blank&quot;. 
&gt; 
&gt; right at
&gt; http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-document-url

Great. So the task as you formulated it is:

Update the spec to define that elements do not do any fetches
while their ownerDocument has no associated browsing context (that&apos;s the equivalent of defaultView being null, right?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64847</commentid>
    <comment_count>7</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-03-01 18:56:49 +0000</bug_when>
    <thetext>It&apos;s not, actually.  

And neither one is equivalent to the document being the current document of the associated browsing context (if any), as far as I can tell.

Which one we want depends on the behavior we want for things like prerendered documents, unloaded documents, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64848</commentid>
    <comment_count>8</comment_count>
    <who name="Dimitri Glazkov">dglazkov</who>
    <bug_when>2012-03-01 19:08:37 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; It&apos;s not, actually.  
&gt; 
&gt; And neither one is equivalent to the document being the current document of the
&gt; associated browsing context (if any), as far as I can tell.
&gt; 
&gt; Which one we want depends on the behavior we want for things like prerendered
&gt; documents, unloaded documents, etc.

Interesting. You&apos;re drawing a distinction between whether the browsing context simply isn&apos;t associated with a given document (like when it&apos;s created using DOMImplementation), or the user agent decides to not to create browsing contexts (when prerendering, data mining, etc.) for a document.

Is this distinction anywhere in the spec?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64851</commentid>
    <comment_count>9</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-03-01 19:20:33 +0000</bug_when>
    <thetext>No, I&apos;m making a distinction between documents which have no associated browsing context and documents which do have one but are not the current document in that browsing context.  That distinction is most certainly in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70127</commentid>
    <comment_count>10</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 06:57:39 +0000</bug_when>
    <thetext>This bug was cloned to create bug 17828 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83264</commentid>
    <comment_count>11</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2013-02-18 12:07:16 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: none
Rationale: See https://www.w3.org/Bugs/Public/show_bug.cgi?id=17828</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>