This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21430 - [Templates]: <template><table>Foo should result in <template> being the foster parent for "Foo"
Summary: [Templates]: <template><table>Foo should result in <template> being the foste...
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 15476
  Show dependency treegraph
 
Reported: 2013-03-28 23:13 UTC by Rafael Weinstein
Modified: 2013-04-10 22:58 UTC (History)
7 users (show)

See Also:


Attachments

Description Rafael Weinstein 2013-03-28 23:13:01 UTC
The spec says: "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."

But the parent of the first table at this point will be the content document fragment.
Comment 1 Rafael Weinstein 2013-03-28 23:24:39 UTC
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't foster parent elements outside the <template>, e.g.

<body><table><template><tr><div>

-<div> should be foster parented to the <template>, 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 <template> to be a foster parent, e.g.

<template><table>Foo

-What prevents this is that the <table>'s parent won't be an element.


----------
I'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's a good idea to create an algorithm here?
Comment 2 Anne 2013-03-31 15:53:42 UTC
Can't we just change the text in HTML to say that if the parent is a <template>'s DocumentFragment, use that? For clarity defining the foster parent element as a list of steps might be good though.
Comment 3 Rafael Weinstein 2013-04-10 22:58:24 UTC
Ok. Fixed.

https://dvcs.w3.org/hg/webcomponents/rev/f2135772d3d4