[html5] r5732 - [c] (0) Rewrite the rules for 'transparent' so that you can't put a <param> in a [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Dec 31 21:28:38 PST 2010


Author: ianh
Date: 2010-12-31 21:28:37 -0800 (Fri, 31 Dec 2010)
New Revision: 5732

Modified:
   complete.html
   index
   source
Log:
[c] (0) Rewrite the rules for 'transparent' so that you can't put a <param> in an <ins> in an <object> (or similar things).
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=11363

Modified: complete.html
===================================================================
--- complete.html	2010-12-31 07:07:54 UTC (rev 5731)
+++ complete.html	2011-01-01 05:28:37 UTC (rev 5732)
@@ -221,7 +221,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Draft Standard — 31 December 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 1 January 2011</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -10918,31 +10918,78 @@
   <h5 id=transparent-content-models><span class=secno>3.2.5.2 </span>Transparent content models</h5>
 
   <p>Some elements are described as <dfn id=transparent>transparent</dfn>; they have
-  "transparent" in the description of their content model.</p>
+  "transparent" in the description of their content model. The content
+  model of a <a href=#transparent>transparent</a> element is derived from the
+  content model of its parent element: the elements required in the
+  part of the content model that is "transparent" are the same
+  elements as required in the part of the content model of the parent
+  of the transparent element in which the transparent element finds
+  itself.</p>
 
-  <p>When a content model includes a part that is "transparent", those
-  parts must not contain content that would not be conformant if all
-  transparent elements in the tree were replaced, in their parent
-  element, by the children in the "transparent" part of their content
-  model, retaining order.</p>
-
   <div class=example>
 
+   <p>For instance, an <code><a href=#the-ins-element>ins</a></code> element inside a
+   <code><a href=#the-ruby-element>ruby</a></code> element cannot contain an <code><a href=#the-rt-element>rt</a></code>
+   element, because the part of the <code><a href=#the-ruby-element>ruby</a></code> element's
+   content model that allows <code><a href=#the-ins-element>ins</a></code> elements is the part
+   that allows <a href=#phrasing-content>phrasing content</a>, and the <code><a href=#the-rt-element>rt</a></code>
+   element is not <a href=#phrasing-content>phrasing content</a>.</p>
+
+  </div>
+
+<!--(as far as I can tell, there's no way to violate this requirement
+     without first violating the earlier requirement)
+  <p>Furthermore, when a content model includes a part that is
+  "transparent", those parts must not contain content that would not
+  be conformant if all transparent elements in the tree were replaced,
+  in their parent element, by the children in the "transparent" part
+  of their content model, retaining order.</p>
+
+  <div class="example">
+
    <p>Consider the following markup fragment:</p>
 
-   <pre><p>Hello <a href="world.html"><em>wonderful</em> world</a>!</p></pre>
+   <pre><p>Hello <a href="world.html"><em>wonderful</em> world</a>!</p></pre>
 
    <p>Its DOM looks like the following:</p>
 
-   <ul class=domTree><li class=t1><code><a href=#the-p-element>p</a></code><ul><li class=t3><code>#text</code>: <span title="">Hello </span><li class=t1><code><a href=#the-a-element>a</a></code> <span class=t2 title=""><code class="attribute name">href</code>="<code class="attribute value">world.html</code>"</span><ul><li class=t1><code><a href=#the-em-element>em</a></code><ul><li class=t3><code>#text</code>: <span title="">wonderful</span></ul><li class=t3><code>#text</code>: <span title=""> world</span></ul><li class=t3><code>#text</code>: <span title="">!</span></ul></ul><p>The content model of the <code><a href=#the-a-element>a</a></code> element is
-   <a href=#transparent>transparent</a>. To see if its contents are conforming,
+   <ul class="domTree"><li class="t1"><code>p</code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code>a</code> <span class="t2" title=""><code class="attribute name">href</code>="<code class="attribute value">world.html</code>"</span><ul><li class="t1"><code>em</code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></li></ul></li><li class="t3"><code>#text</code>: <span title=""> world</span></li></ul></li><li class="t3"><code>#text</code>: <span title="">!</span></li></ul></li></ul>
+
+   <p>The content model of the <code>a</code> element is
+   <span>transparent</span>. To see if its contents are conforming,
    therefore, the element is replaced by its contents:</p>
 
-   <ul class=domTree><li class=t1><code><a href=#the-p-element>p</a></code><ul><li class=t3><code>#text</code>: <span title="">Hello </span><li class=t1><code><a href=#the-em-element>em</a></code><ul><li class=t3><code>#text</code>: <span title="">wonderful</span></ul><li class=t3><code>#text</code>: <span title=""> world</span><li class=t3><code>#text</code>: <span title="">!</span></ul></ul><p>Since that is conforming, the contents of the <code><a href=#the-a-element>a</a></code> are
-   conforming in the original fragment.</p>
+   <ul class="domTree"><li class="t1"><code>p</code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code>em</code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></li></ul></li><li class="t3"><code>#text</code>: <span title=""> world</span></li><li class="t3"><code>#text</code>: <span title="">!</span></li></ul></li></ul>
 
+   <p>Since that is conforming, the contents of the <code>a</code> are
+   conforming in the original fragment (there is no complication
+   regarding the various parts of the <code>p</code> element's content
+   model, since that element's content model has only one part).</p>
+
   </div>
+-->
 
+  <p class=note>In some cases, where transparent elements are nested
+  in each other, the process has to be applied iteratively.</p>
+
+  <div class=example>
+
+   <p>Consider the following markup fragment:</p>
+
+   <pre><p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p></pre>
+
+   <p>To check whether "Apples" is allowed inside the <code><a href=#the-a-element>a</a></code>
+   element, the content models are examined. The <code><a href=#the-a-element>a</a></code>
+   element's content model is transparent, as is the <code><a href=#the-map-element>map</a></code>
+   element's, as is the <code><a href=#the-ins-element>ins</a></code> element's, as is the part of
+   the <code><a href=#the-object-element>object</a></code> element's in which the <code><a href=#the-ins-element>ins</a></code>
+   element is found. The <code><a href=#the-object-element>object</a></code> element is found in the
+   <code><a href=#the-p-element>p</a></code> element, whose content model is <a href=#phrasing-content>phrasing
+   content</a>. Thus, "Apples" is allowed, as text is phrasing
+   content.</p>
+
+  </div>
+
   <p>When a transparent element has no parent, then the part of its
   content model that is "transparent" must instead be treated as
   accepting any <a href=#flow-content>flow content</a>.</p>
@@ -89945,7 +89992,7 @@
          <a href=#category-submit title=category-submit>submittable</a>;
          <a href=#form-associated-element title="Form-associated element">form-associated</a></td>
      <td><a href=#phrasing-content title="Phrasing content">phrasing</a></td>
-     <td><a href=#phrasing-content>Phrasing content</a>*</td>
+     <td><a href=#phrasing-content title="Phrasing content">phrasing</a>*</td>
      <td><a href=#global-attributes title="global attributes">globals</a>;
          <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code>;
          <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code>;
@@ -90090,7 +90137,7 @@
      <td>Legend for corresponding <code><a href=#the-dd-element>dd</a></code> element(s)</td>
      <td>none</td>
      <td><code><a href=#the-dl-element>dl</a></code></td>
-     <td>varies*</td>
+     <td><a href=#phrasing-content title="Phrasing content">phrasing</a></td>
      <td><a href=#global-attributes title="global attributes">globals</a></td>
      <td><code><a href=#htmlelement>HTMLElement</a></code></td>
     <tr><th><code><a href=#the-em-element>em</a></code></th>

Modified: index
===================================================================
--- index	2010-12-31 07:07:54 UTC (rev 5731)
+++ index	2011-01-01 05:28:37 UTC (rev 5732)
@@ -225,7 +225,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1>HTML5 (including next generation additions still in development)</h1>
-    <h2 class="no-num no-toc">Draft Standard — 31 December 2010</h2>
+    <h2 class="no-num no-toc">Draft Standard — 1 January 2011</h2>
    </hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -10897,31 +10897,78 @@
   <h5 id=transparent-content-models><span class=secno>3.2.5.2 </span>Transparent content models</h5>
 
   <p>Some elements are described as <dfn id=transparent>transparent</dfn>; they have
-  "transparent" in the description of their content model.</p>
+  "transparent" in the description of their content model. The content
+  model of a <a href=#transparent>transparent</a> element is derived from the
+  content model of its parent element: the elements required in the
+  part of the content model that is "transparent" are the same
+  elements as required in the part of the content model of the parent
+  of the transparent element in which the transparent element finds
+  itself.</p>
 
-  <p>When a content model includes a part that is "transparent", those
-  parts must not contain content that would not be conformant if all
-  transparent elements in the tree were replaced, in their parent
-  element, by the children in the "transparent" part of their content
-  model, retaining order.</p>
-
   <div class=example>
 
+   <p>For instance, an <code><a href=#the-ins-element>ins</a></code> element inside a
+   <code><a href=#the-ruby-element>ruby</a></code> element cannot contain an <code><a href=#the-rt-element>rt</a></code>
+   element, because the part of the <code><a href=#the-ruby-element>ruby</a></code> element's
+   content model that allows <code><a href=#the-ins-element>ins</a></code> elements is the part
+   that allows <a href=#phrasing-content>phrasing content</a>, and the <code><a href=#the-rt-element>rt</a></code>
+   element is not <a href=#phrasing-content>phrasing content</a>.</p>
+
+  </div>
+
+<!--(as far as I can tell, there's no way to violate this requirement
+     without first violating the earlier requirement)
+  <p>Furthermore, when a content model includes a part that is
+  "transparent", those parts must not contain content that would not
+  be conformant if all transparent elements in the tree were replaced,
+  in their parent element, by the children in the "transparent" part
+  of their content model, retaining order.</p>
+
+  <div class="example">
+
    <p>Consider the following markup fragment:</p>
 
-   <pre><p>Hello <a href="world.html"><em>wonderful</em> world</a>!</p></pre>
+   <pre><p>Hello <a href="world.html"><em>wonderful</em> world</a>!</p></pre>
 
    <p>Its DOM looks like the following:</p>
 
-   <ul class=domTree><li class=t1><code><a href=#the-p-element>p</a></code><ul><li class=t3><code>#text</code>: <span title="">Hello </span><li class=t1><code><a href=#the-a-element>a</a></code> <span class=t2 title=""><code class="attribute name">href</code>="<code class="attribute value">world.html</code>"</span><ul><li class=t1><code><a href=#the-em-element>em</a></code><ul><li class=t3><code>#text</code>: <span title="">wonderful</span></ul><li class=t3><code>#text</code>: <span title=""> world</span></ul><li class=t3><code>#text</code>: <span title="">!</span></ul></ul><p>The content model of the <code><a href=#the-a-element>a</a></code> element is
-   <a href=#transparent>transparent</a>. To see if its contents are conforming,
+   <ul class="domTree"><li class="t1"><code>p</code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code>a</code> <span class="t2" title=""><code class="attribute name">href</code>="<code class="attribute value">world.html</code>"</span><ul><li class="t1"><code>em</code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></li></ul></li><li class="t3"><code>#text</code>: <span title=""> world</span></li></ul></li><li class="t3"><code>#text</code>: <span title="">!</span></li></ul></li></ul>
+
+   <p>The content model of the <code>a</code> element is
+   <span>transparent</span>. To see if its contents are conforming,
    therefore, the element is replaced by its contents:</p>
 
-   <ul class=domTree><li class=t1><code><a href=#the-p-element>p</a></code><ul><li class=t3><code>#text</code>: <span title="">Hello </span><li class=t1><code><a href=#the-em-element>em</a></code><ul><li class=t3><code>#text</code>: <span title="">wonderful</span></ul><li class=t3><code>#text</code>: <span title=""> world</span><li class=t3><code>#text</code>: <span title="">!</span></ul></ul><p>Since that is conforming, the contents of the <code><a href=#the-a-element>a</a></code> are
-   conforming in the original fragment.</p>
+   <ul class="domTree"><li class="t1"><code>p</code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code>em</code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></li></ul></li><li class="t3"><code>#text</code>: <span title=""> world</span></li><li class="t3"><code>#text</code>: <span title="">!</span></li></ul></li></ul>
 
+   <p>Since that is conforming, the contents of the <code>a</code> are
+   conforming in the original fragment (there is no complication
+   regarding the various parts of the <code>p</code> element's content
+   model, since that element's content model has only one part).</p>
+
   </div>
+-->
 
+  <p class=note>In some cases, where transparent elements are nested
+  in each other, the process has to be applied iteratively.</p>
+
+  <div class=example>
+
+   <p>Consider the following markup fragment:</p>
+
+   <pre><p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p></pre>
+
+   <p>To check whether "Apples" is allowed inside the <code><a href=#the-a-element>a</a></code>
+   element, the content models are examined. The <code><a href=#the-a-element>a</a></code>
+   element's content model is transparent, as is the <code><a href=#the-map-element>map</a></code>
+   element's, as is the <code><a href=#the-ins-element>ins</a></code> element's, as is the part of
+   the <code><a href=#the-object-element>object</a></code> element's in which the <code><a href=#the-ins-element>ins</a></code>
+   element is found. The <code><a href=#the-object-element>object</a></code> element is found in the
+   <code><a href=#the-p-element>p</a></code> element, whose content model is <a href=#phrasing-content>phrasing
+   content</a>. Thus, "Apples" is allowed, as text is phrasing
+   content.</p>
+
+  </div>
+
   <p>When a transparent element has no parent, then the part of its
   content model that is "transparent" must instead be treated as
   accepting any <a href=#flow-content>flow content</a>.</p>
@@ -85850,7 +85897,7 @@
          <a href=#category-submit title=category-submit>submittable</a>;
          <a href=#form-associated-element title="Form-associated element">form-associated</a></td>
      <td><a href=#phrasing-content title="Phrasing content">phrasing</a></td>
-     <td><a href=#phrasing-content>Phrasing content</a>*</td>
+     <td><a href=#phrasing-content title="Phrasing content">phrasing</a>*</td>
      <td><a href=#global-attributes title="global attributes">globals</a>;
          <code title=attr-fe-autofocus><a href=#attr-fe-autofocus>autofocus</a></code>;
          <code title=attr-fe-disabled><a href=#attr-fe-disabled>disabled</a></code>;
@@ -85995,7 +86042,7 @@
      <td>Legend for corresponding <code><a href=#the-dd-element>dd</a></code> element(s)</td>
      <td>none</td>
      <td><code><a href=#the-dl-element>dl</a></code></td>
-     <td>varies*</td>
+     <td><a href=#phrasing-content title="Phrasing content">phrasing</a></td>
      <td><a href=#global-attributes title="global attributes">globals</a></td>
      <td><code><a href=#htmlelement>HTMLElement</a></code></td>
     <tr><th><code><a href=#the-em-element>em</a></code></th>

Modified: source
===================================================================
--- source	2010-12-31 07:07:54 UTC (rev 5731)
+++ source	2011-01-01 05:28:37 UTC (rev 5732)
@@ -11221,14 +11221,33 @@
   <h5>Transparent content models</h5>
 
   <p>Some elements are described as <dfn>transparent</dfn>; they have
-  "transparent" in the description of their content model.</p>
+  "transparent" in the description of their content model. The content
+  model of a <span>transparent</span> element is derived from the
+  content model of its parent element: the elements required in the
+  part of the content model that is "transparent" are the same
+  elements as required in the part of the content model of the parent
+  of the transparent element in which the transparent element finds
+  itself.</p>
 
-  <p>When a content model includes a part that is "transparent", those
-  parts must not contain content that would not be conformant if all
-  transparent elements in the tree were replaced, in their parent
-  element, by the children in the "transparent" part of their content
-  model, retaining order.</p>
+  <div class="example">
 
+   <p>For instance, an <code>ins</code> element inside a
+   <code>ruby</code> element cannot contain an <code>rt</code>
+   element, because the part of the <code>ruby</code> element's
+   content model that allows <code>ins</code> elements is the part
+   that allows <span>phrasing content</span>, and the <code>rt</code>
+   element is not <span>phrasing content</span>.</p>
+
+  </div>
+
+<!--(as far as I can tell, there's no way to violate this requirement
+     without first violating the earlier requirement)
+  <p>Furthermore, when a content model includes a part that is
+  "transparent", those parts must not contain content that would not
+  be conformant if all transparent elements in the tree were replaced,
+  in their parent element, by the children in the "transparent" part
+  of their content model, retaining order.</p>
+
   <div class="example">
 
    <p>Consider the following markup fragment:</p>
@@ -11246,10 +11265,34 @@
    <ul class="domTree"><li class="t1"><code>p</code><ul><li class="t3"><code>#text</code>: <span title="">Hello </span></li><li class="t1"><code>em</code><ul><li class="t3"><code>#text</code>: <span title="">wonderful</span></li></ul></li><li class="t3"><code>#text</code>: <span title=""> world</span></li><li class="t3"><code>#text</code>: <span title="">!</span></li></ul></li></ul>
 
    <p>Since that is conforming, the contents of the <code>a</code> are
-   conforming in the original fragment.</p>
+   conforming in the original fragment (there is no complication
+   regarding the various parts of the <code>p</code> element's content
+   model, since that element's content model has only one part).</p>
 
   </div>
+-->
 
+  <p class="note">In some cases, where transparent elements are nested
+  in each other, the process has to be applied iteratively.</p>
+
+  <div class="example">
+
+   <p>Consider the following markup fragment:</p>
+
+   <pre><p><object><param><ins><map><a href="/">Apples</a></map></ins></object></p></pre>
+
+   <p>To check whether "Apples" is allowed inside the <code>a</code>
+   element, the content models are examined. The <code>a</code>
+   element's content model is transparent, as is the <code>map</code>
+   element's, as is the <code>ins</code> element's, as is the part of
+   the <code>object</code> element's in which the <code>ins</code>
+   element is found. The <code>object</code> element is found in the
+   <code>p</code> element, whose content model is <span>phrasing
+   content</span>. Thus, "Apples" is allowed, as text is phrasing
+   content.</p>
+
+  </div>
+
   <p>When a transparent element has no parent, then the part of its
   content model that is "transparent" must instead be treated as
   accepting any <span>flow content</span>.</p>
@@ -103174,7 +103217,7 @@
          <span title="category-submit">submittable</span>;
          <span title="Form-associated element">form-associated</span></td>
      <td><span title="Phrasing content">phrasing</span></td>
-     <td><span>Phrasing content</span>*</td>
+     <td><span title="Phrasing content">phrasing</span>*</td>
      <td><span title="global attributes">globals</span>;
          <code title="attr-fe-autofocus">autofocus</code>;
          <code title="attr-fe-disabled">disabled</code>;
@@ -103364,7 +103407,7 @@
      <td>Legend for corresponding <code>dd</code> element(s)</td>
      <td>none</td>
      <td><code>dl</code></td>
-     <td>varies*</td>
+     <td><span title="Phrasing content">phrasing</span></td>
      <td><span title="global attributes">globals</span></td>
      <td><code>HTMLElement</code></td>
     </tr>




More information about the Commit-Watchers mailing list