NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 264 - Make <svg:foreignObject> scoping. (bug 5815) (credit: hs)
Make <svg:foreignObject> scoping. (bug 5815) (credit: hs)
Status: RESOLVED FIXED
Product: Validator.nu
Classification: Unclassified
Component: HTML parser
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-22 15:35 CEST by Henri Sivonen
Modified: 2008-07-22 17:54 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Sivonen 2008-07-22 15:35:36 CEST
Index: source
===================================================================
--- source	(revision 1836)
+++ source	(revision 1837)
@@ -41610,8 +41610,8 @@
    an element in scope">scopes</span> for various parts of the
    parsing: <code>applet</code>, <code>button</code>,
    <code>caption</code>, <code>html</code>, <code>marquee</code>,
-   <code>object</code>, <code>table</code>, <code>td</code> and
-   <code>th</code>.</p></dd>
+   <code>object</code>, <code>table</code>, <code>td</code>,
+   <code>th</code>, and SVG's <code>foreignObject</code>.</p></dd>
 
    <dt><dfn>Formatting</dfn></dt>
    <dd><p>The following HTML elements are those that end up in the
@@ -41634,47 +41634,67 @@
   <code>command</code></p>
 
   <p>The <span>stack of open elements</span> is said to <dfn
-  title="has an element in scope">have an element in scope</dfn> or
-  <dfn title="has an element in table scope">have an element in
-  <em>table scope</em></dfn> when the following algorithm terminates
-  in a match state:</p>
+  title="has an element in scope">have an element in scope</dfn> when
+  the following algorithm terminates in a match state:</p>
 
   <ol>
 
    <li><p>Initialise <var title="">node</var> to be the <span>current
    node</span> (the bottommost node of the stack).</p></li>
 
-   <li><p>If <var title="">node</var> is the target node, terminate in a match
-   state.</p></li>
+   <li><p>If <var title="">node</var> is the target node, terminate in
+   a match state.</p></li>
 
-   <li><p>Otherwise, if <var title="">node</var> is a <code>table</code>
-   element, terminate in a failure state.</p></li>
+   <li><p>Otherwise, if <var title="">node</var> is one of the
+   following elements, terminate in a failure state:</p>
+    <ul class="brief">
+     <li><code>applet</code> in the HTML namespace</li>
+     <li><code>caption</code> in the HTML namespace</li>
+     <li><code>html</code> in the HTML namespace</li> <!-- (This can only happen if the <var title="">node</var> is the topmost node of the <span>stack of open elements</span>, and prevents the next step from being invoked if there are no more elements in the stack.) -->
+     <li><code>table</code> in the HTML namespace</li>
+     <li><code>td</code> in the HTML namespace</li>
+     <li><code>th</code> in the HTML namespace</li>
+     <li><code>button</code> in the HTML namespace</li>
+     <li><code>marquee</code> in the HTML namespace</li>
+     <li><code>object</code> in the HTML namespace</li>
+     <li><code title="">foreignObject</code> in the SVG namespace</li>
+    </ul>
+   </li>
+
+   <li><p>Otherwise, set <var title="">node</var> to the previous
+   entry in the <span>stack of open elements</span> and return to step
+   2. (This will never fail, since the loop will always terminate in
+   the previous step if the top of the stack &mdash; an
+   <code>html</code> element &mdash; is reached.)</p></li>
+
+  </ol>
+
+  <p>The <span>stack of open elements</span> is said to <dfn
+  title="has an element in table scope">have an element in <em>table
+  scope</em></dfn> when the following algorithm terminates in a match
+  state:</p>
+
+  <ol>
+
+   <li><p>Initialise <var title="">node</var> to be the <span>current
+   node</span> (the bottommost node of the stack).</p></li>
+
+   <li><p>If <var title="">node</var> is the target node, terminate in
+   a match state.</p></li>
 
-   <li><p>Otherwise, if the algorithm is the "has an element in scope"
-   variant (rather than the "has an element in table scope" variant),
-   and <var title="">node</var> is one of the following, terminate in a failure
-   state:</p>
+   <li><p>Otherwise, if <var title="">node</var> is one of the
+   following elements, terminate in a failure state:</p>
     <ul class="brief">
-     <li><code>applet</code></li>
-     <li><code>caption</code></li>
-     <li><code>td</code></li>
-     <li><code>th</code></li>
-     <li><code>button</code></li>
-     <li><code>marquee</code></li>
-     <li><code>object</code></li>
+     <li><code>html</code> in the HTML namespace</li> <!-- (This can only happen if the <var title="">node</var> is the topmost node of the <span>stack of open elements</span>, and prevents the next step from being invoked if there are no more elements in the stack.) -->
+     <li><code>table</code> in the HTML namespace</li>
     </ul>
    </li>
 
-   <li><p>Otherwise, if <var title="">node</var> is an <code>html</code>
-   element, terminate in a failure state. (This can only happen if the
-   <var title="">node</var> is the topmost node of the <span>stack of open
-   elements</span>, and prevents the next step from being invoked if
-   there are no more elements in the stack.)</p></li>
-
-   <li><p>Otherwise, set <var title="">node</var> to the previous entry in the
-   <span>stack of open elements</span> and return to step 2. (This
-   will never fail, since the loop will always terminate in the
-   previous step if the top of the stack is reached.)</p></li>
+   <li><p>Otherwise, set <var title="">node</var> to the previous
+   entry in the <span>stack of open elements</span> and return to step
+   2. (This will never fail, since the loop will always terminate in
+   the previous step if the top of the stack &mdash; an
+   <code>html</code> element &mdash; is reached.)</p></li>
 
   </ol>