Skip to content

Commit

Permalink
[cgiowt] (2) Make <svg:foreignObject> scoping. (bug 5815) (credit: hs)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@1837 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 1, 2008
1 parent afd41a8 commit c1eb52b
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 58 deletions.
79 changes: 52 additions & 27 deletions index
Expand Up @@ -44070,8 +44070,8 @@ function receiver(e) {
<code><a href="#caption0">caption</a></code>, <code><a
href="#html">html</a></code>, <code>marquee</code>, <code><a
href="#object">object</a></code>, <code><a
href="#table">table</a></code>, <code><a href="#td">td</a></code> and
<code><a href="#th">th</a></code>.
href="#table">table</a></code>, <code><a href="#td">td</a></code>,
<code><a href="#th">th</a></code>, and SVG's <code>foreignObject</code>.

<dt><dfn id=formatting>Formatting</dfn>

Expand Down Expand Up @@ -44101,9 +44101,7 @@ function receiver(e) {

<p>The <a href="#stack">stack of open elements</a> is said to <dfn
id=have-an title="has an element in scope">have an element in scope</dfn>
or <dfn id=have-an0 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:
when the following algorithm terminates in a match state:

<ol>
<li>
Expand All @@ -44115,44 +44113,71 @@ function receiver(e) {
state.

<li>
<p>Otherwise, if <var title="">node</var> is a <code><a
href="#table">table</a></code> element, terminate in a failure state.

<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>
<p>Otherwise, if <var title="">node</var> is one of the following
elements, terminate in a failure state:</p>

<ul class=brief>
<li><code><a href="#applet">applet</a></code>
<li><code><a href="#applet">applet</a></code> in the HTML namespace

<li><code><a href="#caption0">caption</a></code>
<li><code><a href="#caption0">caption</a></code> in the HTML namespace

<li><code><a href="#td">td</a></code>
<li><code><a href="#html">html</a></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><a href="#th">th</a></code>
<li><code><a href="#table">table</a></code> in the HTML namespace

<li><code>button</code>
<li><code><a href="#td">td</a></code> in the HTML namespace

<li><code>marquee</code>
<li><code><a href="#th">th</a></code> in the HTML namespace

<li><code><a href="#object">object</a></code>
<li><code>button</code> in the HTML namespace

<li><code>marquee</code> in the HTML namespace

<li><code><a href="#object">object</a></code> in the HTML namespace

<li><code title="">foreignObject</code> in the SVG namespace
</ul>

<li>
<p>Otherwise, if <var title="">node</var> is an <code><a
href="#html">html</a></code> element, terminate in a failure state.
(This can only happen if the <var title="">node</var> is the topmost
node of the <a href="#stack">stack of open elements</a>, and prevents
the next step from being invoked if there are no more elements in the
stack.)
<p>Otherwise, set <var title="">node</var> to the previous entry in the
<a href="#stack">stack of open elements</a> 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><a
href="#html">html</a></code> element &mdash; is reached.)
</ol>

<p>The <a href="#stack">stack of open elements</a> is said to <dfn
id=have-an0 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:

<ol>
<li>
<p>Initialise <var title="">node</var> to be the <a
href="#current5">current node</a> (the bottommost node of the stack).

<li>
<p>If <var title="">node</var> is the target node, terminate in a match
state.

<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><a href="#html">html</a></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><a href="#table">table</a></code> in the HTML namespace
</ul>

<li>
<p>Otherwise, set <var title="">node</var> to the previous entry in the
<a href="#stack">stack of open elements</a> 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.)
step if the top of the stack &mdash; an <code><a
href="#html">html</a></code> element &mdash; is reached.)
</ol>

<p>Nothing happens if at any time any of the elements in the <a
Expand Down
82 changes: 51 additions & 31 deletions source
Expand Up @@ -41610,8 +41610,8 @@ function receiver(e) {
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
Expand All @@ -41634,47 +41634,67 @@ function receiver(e) {
<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 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>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, 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 &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 <var title="">node</var> is one of the
following elements, terminate in a failure state:</p>
<ul class="brief">
<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, 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>

Expand Down

0 comments on commit c1eb52b

Please sign in to comment.