[html5] r8112 - [giow] (3) Handle foster-parenting of <math> and <svg> elements. Affected topics [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Jul 31 14:16:36 PDT 2013


Author: ianh
Date: 2013-07-31 14:16:35 -0700 (Wed, 31 Jul 2013)
New Revision: 8112

Modified:
   complete.html
   index
   source
Log:
[giow] (3) Handle foster-parenting of <math> and <svg> elements.
Affected topics: HTML Syntax and Parsing

Modified: complete.html
===================================================================
--- complete.html	2013-07-31 21:09:58 UTC (rev 8111)
+++ complete.html	2013-07-31 21:16:35 UTC (rev 8112)
@@ -89337,8 +89337,8 @@
 
   </ol><hr><!-- The names of these algorithms are kinda confusing; e.g. see the confusion in
          https://www.w3.org/Bugs/Public/show_bug.cgi?id=18367
-       Not sure what we could call them instead, though... --><p>When the steps below require the UA to <dfn id=insert-an-html-element>insert an HTML element</dfn> for a token, the UA
-  must run the following steps:</p>
+       Not sure what we could call them instead, though... --><p>When the steps below require the user agent to <dfn id=insert-an-html-element>insert an HTML element</dfn> for a token,
+  the user agent must run the following steps:</p>
 
   <ol><li><p>Let the <var title="">adjusted insertion location</var> be the <a href=#appropriate-place-for-inserting-a-node>appropriate
    place for inserting a node</a>.</li>
@@ -89372,21 +89372,31 @@
 
    <li><p>Return the newly created element.</li>
 
-  </ol><hr><!--CLEANUP--><p>When the steps below require the UA to <dfn id=insert-a-foreign-element>insert a foreign element</dfn> for a token, the UA
-  must first <a href=#create-an-element-for-the-token>create an element for the token</a> in the given namespace, with the <a href=#current-node>current node</a> as the intended parent, and then append
-  this node to the <a href=#current-node>current node</a>, and push it onto the <a href=#stack-of-open-elements>stack of open
-  elements</a> so that it is the new <a href=#current-node>current node</a>. If the newly created element has
-  an <code title="">xmlns</code> attribute in the <a href=#xmlns-namespace>XMLNS namespace</a> whose value is not
-  exactly the same as the element's namespace, that is a <a href=#parse-error>parse error</a>. Similarly, if the
-  newly created element has an <code title="">xmlns:xlink</code> attribute in the <a href=#xmlns-namespace>XMLNS
-  namespace</a> whose value is not the <a href=#xlink-namespace>XLink Namespace</a>, that is a <a href=#parse-error>parse
-  error</a>.</p>
+  </ol><hr><p>When the steps below require the user agent to <dfn id=insert-a-foreign-element>insert a foreign element</dfn> for a token,
+  the user agent must run these steps:</p>
 
-  <p class=note>The <a href=#insert-a-foreign-element>insert a foreign element</a> algorithm isn't affected by the <a href=#foster-parent title="foster parent">foster parenting</a> logic (it doesn't use the <a href=#appropriate-place-for-inserting-a-node>appropriate place for
-  inserting a node</a> algorithm); the <a href=#current-node>current node</a>, when the <a href=#insert-a-foreign-element>insert a
-  foreign element</a> algorithm is invoked, is always itself a non-HTML element.</p>
+  <ol><li><p>Let the <var title="">adjusted insertion location</var> be the <a href=#appropriate-place-for-inserting-a-node>appropriate
+   place for inserting a node</a>.</li>
 
-  <p>When the steps below require the user agent to <dfn id=adjust-mathml-attributes>adjust MathML attributes</dfn> for a token,
+   <li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> in the given namespace, with the
+   intended parent being the element in which the <var title="">adjusted insertion location</var>
+   finds itself.</li>
+
+   <li><p>If the newly created element has an <code title="">xmlns</code> attribute in the
+   <a href=#xmlns-namespace>XMLNS namespace</a> whose value is not exactly the same as the element's namespace, that
+   is a <a href=#parse-error>parse error</a>. Similarly, if the newly created element has an <code title="">xmlns:xlink</code> attribute in the <a href=#xmlns-namespace>XMLNS namespace</a> whose value is not the
+   <a href=#xlink-namespace>XLink Namespace</a>, that is a <a href=#parse-error>parse error</a>.</li>
+
+   <li><p>If it is possible to insert an element at the <var title="">adjusted insertion
+   location</var>, then insert the newly created element at the <var title="">adjusted insertion
+   location</var>.</li>
+
+   <li><p>Push the element onto the <a href=#stack-of-open-elements>stack of open elements</a> so that it is the new
+   <a href=#current-node>current node</a>.</li>
+
+   <li><p>Return the newly created element.</li>
+
+  </ol><p>When the steps below require the user agent to <dfn id=adjust-mathml-attributes>adjust MathML attributes</dfn> for a token,
   then, if the token has an attribute named <code title="">definitionurl</code>, change its name to
   <code title="">definitionURL</code> (note the case difference).</p>
 
@@ -91581,6 +91591,7 @@
    <a href=#appropriate-place-for-inserting-a-node>appropriate place for inserting a node</a>, but using <var title="">common
    ancestor</var> as the <i>override target</i>.</li>
 
+<!--CLEANUP-->
    <li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> for which <var title="">formatting
    element</var> was created, in the <a href=#html-namespace-0>HTML namespace</a>, with <var title="">furthest block</var> as the intended
    parent.</li>

Modified: index
===================================================================
--- index	2013-07-31 21:09:58 UTC (rev 8111)
+++ index	2013-07-31 21:16:35 UTC (rev 8112)
@@ -89337,8 +89337,8 @@
 
   </ol><hr><!-- The names of these algorithms are kinda confusing; e.g. see the confusion in
          https://www.w3.org/Bugs/Public/show_bug.cgi?id=18367
-       Not sure what we could call them instead, though... --><p>When the steps below require the UA to <dfn id=insert-an-html-element>insert an HTML element</dfn> for a token, the UA
-  must run the following steps:</p>
+       Not sure what we could call them instead, though... --><p>When the steps below require the user agent to <dfn id=insert-an-html-element>insert an HTML element</dfn> for a token,
+  the user agent must run the following steps:</p>
 
   <ol><li><p>Let the <var title="">adjusted insertion location</var> be the <a href=#appropriate-place-for-inserting-a-node>appropriate
    place for inserting a node</a>.</li>
@@ -89372,21 +89372,31 @@
 
    <li><p>Return the newly created element.</li>
 
-  </ol><hr><!--CLEANUP--><p>When the steps below require the UA to <dfn id=insert-a-foreign-element>insert a foreign element</dfn> for a token, the UA
-  must first <a href=#create-an-element-for-the-token>create an element for the token</a> in the given namespace, with the <a href=#current-node>current node</a> as the intended parent, and then append
-  this node to the <a href=#current-node>current node</a>, and push it onto the <a href=#stack-of-open-elements>stack of open
-  elements</a> so that it is the new <a href=#current-node>current node</a>. If the newly created element has
-  an <code title="">xmlns</code> attribute in the <a href=#xmlns-namespace>XMLNS namespace</a> whose value is not
-  exactly the same as the element's namespace, that is a <a href=#parse-error>parse error</a>. Similarly, if the
-  newly created element has an <code title="">xmlns:xlink</code> attribute in the <a href=#xmlns-namespace>XMLNS
-  namespace</a> whose value is not the <a href=#xlink-namespace>XLink Namespace</a>, that is a <a href=#parse-error>parse
-  error</a>.</p>
+  </ol><hr><p>When the steps below require the user agent to <dfn id=insert-a-foreign-element>insert a foreign element</dfn> for a token,
+  the user agent must run these steps:</p>
 
-  <p class=note>The <a href=#insert-a-foreign-element>insert a foreign element</a> algorithm isn't affected by the <a href=#foster-parent title="foster parent">foster parenting</a> logic (it doesn't use the <a href=#appropriate-place-for-inserting-a-node>appropriate place for
-  inserting a node</a> algorithm); the <a href=#current-node>current node</a>, when the <a href=#insert-a-foreign-element>insert a
-  foreign element</a> algorithm is invoked, is always itself a non-HTML element.</p>
+  <ol><li><p>Let the <var title="">adjusted insertion location</var> be the <a href=#appropriate-place-for-inserting-a-node>appropriate
+   place for inserting a node</a>.</li>
 
-  <p>When the steps below require the user agent to <dfn id=adjust-mathml-attributes>adjust MathML attributes</dfn> for a token,
+   <li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> in the given namespace, with the
+   intended parent being the element in which the <var title="">adjusted insertion location</var>
+   finds itself.</li>
+
+   <li><p>If the newly created element has an <code title="">xmlns</code> attribute in the
+   <a href=#xmlns-namespace>XMLNS namespace</a> whose value is not exactly the same as the element's namespace, that
+   is a <a href=#parse-error>parse error</a>. Similarly, if the newly created element has an <code title="">xmlns:xlink</code> attribute in the <a href=#xmlns-namespace>XMLNS namespace</a> whose value is not the
+   <a href=#xlink-namespace>XLink Namespace</a>, that is a <a href=#parse-error>parse error</a>.</li>
+
+   <li><p>If it is possible to insert an element at the <var title="">adjusted insertion
+   location</var>, then insert the newly created element at the <var title="">adjusted insertion
+   location</var>.</li>
+
+   <li><p>Push the element onto the <a href=#stack-of-open-elements>stack of open elements</a> so that it is the new
+   <a href=#current-node>current node</a>.</li>
+
+   <li><p>Return the newly created element.</li>
+
+  </ol><p>When the steps below require the user agent to <dfn id=adjust-mathml-attributes>adjust MathML attributes</dfn> for a token,
   then, if the token has an attribute named <code title="">definitionurl</code>, change its name to
   <code title="">definitionURL</code> (note the case difference).</p>
 
@@ -91581,6 +91591,7 @@
    <a href=#appropriate-place-for-inserting-a-node>appropriate place for inserting a node</a>, but using <var title="">common
    ancestor</var> as the <i>override target</i>.</li>
 
+<!--CLEANUP-->
    <li><p><a href=#create-an-element-for-the-token>Create an element for the token</a> for which <var title="">formatting
    element</var> was created, in the <a href=#html-namespace-0>HTML namespace</a>, with <var title="">furthest block</var> as the intended
    parent.</li>

Modified: source
===================================================================
--- source	2013-07-31 21:09:58 UTC (rev 8111)
+++ source	2013-07-31 21:16:35 UTC (rev 8112)
@@ -99799,8 +99799,8 @@
          https://www.w3.org/Bugs/Public/show_bug.cgi?id=18367
        Not sure what we could call them instead, though... -->
 
-  <p>When the steps below require the UA to <dfn>insert an HTML element</dfn> for a token, the UA
-  must run the following steps:</p>
+  <p>When the steps below require the user agent to <dfn>insert an HTML element</dfn> for a token,
+  the user agent must run the following steps:</p>
 
   <ol>
 
@@ -99842,22 +99842,35 @@
 
   <hr>
 
-<!--CLEANUP-->
-  <p>When the steps below require the UA to <dfn>insert a foreign element</dfn> for a token, the UA
-  must first <span>create an element for the token</span> in the given namespace, with the <span>current node</span> as the intended parent, and then append
-  this node to the <span>current node</span>, and push it onto the <span>stack of open
-  elements</span> so that it is the new <span>current node</span>. If the newly created element has
-  an <code title="">xmlns</code> attribute in the <span>XMLNS namespace</span> whose value is not
-  exactly the same as the element's namespace, that is a <span>parse error</span>. Similarly, if the
-  newly created element has an <code title="">xmlns:xlink</code> attribute in the <span>XMLNS
-  namespace</span> whose value is not the <span>XLink Namespace</span>, that is a <span>parse
-  error</span>.</p>
+  <p>When the steps below require the user agent to <dfn>insert a foreign element</dfn> for a token,
+  the user agent must run these steps:</p>
 
-  <p class="note">The <span>insert a foreign element</span> algorithm isn't affected by the <span
-  title="foster parent">foster parenting</span> logic (it doesn't use the <span>appropriate place for
-  inserting a node</span> algorithm); the <span>current node</span>, when the <span>insert a
-  foreign element</span> algorithm is invoked, is always itself a non-HTML element.</p>
+  <ol>
 
+   <li><p>Let the <var title="">adjusted insertion location</var> be the <span>appropriate
+   place for inserting a node</span>.</p></li>
+
+   <li><p><span>Create an element for the token</span> in the given namespace, with the
+   intended parent being the element in which the <var title="">adjusted insertion location</var>
+   finds itself.</p></li>
+
+   <li><p>If the newly created element has an <code title="">xmlns</code> attribute in the
+   <span>XMLNS namespace</span> whose value is not exactly the same as the element's namespace, that
+   is a <span>parse error</span>. Similarly, if the newly created element has an <code
+   title="">xmlns:xlink</code> attribute in the <span>XMLNS namespace</span> whose value is not the
+   <span>XLink Namespace</span>, that is a <span>parse error</span>.</p></li>
+
+   <li><p>If it is possible to insert an element at the <var title="">adjusted insertion
+   location</var>, then insert the newly created element at the <var title="">adjusted insertion
+   location</var>.</p></li>
+
+   <li><p>Push the element onto the <span>stack of open elements</span> so that it is the new
+   <span>current node</span>.</p></li>
+
+   <li><p>Return the newly created element.</p></li>
+
+  </ol>
+
   <p>When the steps below require the user agent to <dfn>adjust MathML attributes</dfn> for a token,
   then, if the token has an attribute named <code title="">definitionurl</code>, change its name to
   <code title="">definitionURL</code> (note the case difference).</p>
@@ -102299,6 +102312,7 @@
    <span>appropriate place for inserting a node</span>, but using <var title="">common
    ancestor</var> as the <i>override target</i>.</p></li>
 
+<!--CLEANUP-->
    <li><p><span>Create an element for the token</span> for which <var title="">formatting
    element</var> was created, in the <span>HTML namespace</span>, with <var title="">furthest block</var> as the intended
    parent.</p></li>




More information about the Commit-Watchers mailing list