<?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>21430</bug_id>
          
          <creation_ts>2013-03-28 23:13:01 +0000</creation_ts>
          <short_desc>[Templates]: &lt;template&gt;&lt;table&gt;Foo should result in &lt;template&gt; being the foster parent for &quot;Foo&quot;</short_desc>
          <delta_ts>2013-04-10 22:58:24 +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>PC</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></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>15476</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Rafael Weinstein">rafaelw</reporter>
          <assigned_to name="Dimitri Glazkov">dglazkov</assigned_to>
          <cc>adamk</cc>
    
    <cc>annevk</cc>
    
    <cc>dglazkov</cc>
    
    <cc>hsivonen</cc>
    
    <cc>ian</cc>
    
    <cc>tross</cc>
    
    <cc>wchen</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>85132</commentid>
    <comment_count>0</comment_count>
    <who name="Rafael Weinstein">rafaelw</who>
    <bug_when>2013-03-28 23:13:01 +0000</bug_when>
    <thetext>The spec says: &quot;The foster parent element is the parent element of the last table element in the stack of open elements, if there is a table element and it has such a parent element.&quot;

But the parent of the first table at this point will be the content document fragment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85133</commentid>
    <comment_count>1</comment_count>
    <who name="Rafael Weinstein">rafaelw</who>
    <bug_when>2013-03-28 23:24:39 +0000</bug_when>
    <thetext>Thinking about this more, I think it might be best to refactor the foster parent definition into an algorithm.

The two changes to the existing logic that the template element spec requires are:

1) Don&apos;t foster parent elements outside the &lt;template&gt;, e.g.

&lt;body&gt;&lt;table&gt;&lt;template&gt;&lt;tr&gt;&lt;div&gt;

-&lt;div&gt; should be foster parented to the &lt;template&gt;, not above it)

-this is currently covered in the template spec here: 

https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html#foster-parent-addition

2) Allow the &lt;template&gt; to be a foster parent, e.g.

&lt;template&gt;&lt;table&gt;Foo

-What prevents this is that the &lt;table&gt;&apos;s parent won&apos;t be an element.


----------
I&apos;m not sure how to express the required changes to the existing spec text cleanly in the template element spec.

Does anyone else think it&apos;s a good idea to create an algorithm here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85186</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-03-31 15:53:42 +0000</bug_when>
    <thetext>Can&apos;t we just change the text in HTML to say that if the parent is a &lt;template&gt;&apos;s DocumentFragment, use that? For clarity defining the foster parent element as a list of steps might be good though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85911</commentid>
    <comment_count>3</comment_count>
    <who name="Rafael Weinstein">rafaelw</who>
    <bug_when>2013-04-10 22:58:24 +0000</bug_when>
    <thetext>Ok. Fixed.

https://dvcs.w3.org/hg/webcomponents/rev/f2135772d3d4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>