Skip to content

Commit

Permalink
Change the way we classify elements (for no apparent reason as it tur…
Browse files Browse the repository at this point in the history
…ns out); fix the phrasing element end tag algorithm (<span><table></span> was broken)

git-svn-id: http://svn.whatwg.org/webapps@43 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 25, 2006
1 parent af35f43 commit 28f824d
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 113 deletions.
110 changes: 54 additions & 56 deletions index
Expand Up @@ -35,7 +35,7 @@

<h1 id="web-applications">Web Applications 1.0</h1>

<h2 class="no-num no-toc" id="working">Working Draft &mdash; 24 April 2006</h2>
<h2 class="no-num no-toc" id="working">Working Draft &mdash; 25 April 2006</h2>

<p>You can take part in this work. <a
href="http://www.whatwg.org/mailing-list">Join the working group's
Expand Down Expand Up @@ -19307,62 +19307,66 @@ function receiver(e) {
<p>Elements in the stack fall into the following categories:

<dl>
<dt><dfn id="class0">Class A</dfn>
<dt><dfn id="special">Special</dfn>

<dd>
<p>The following HTML elements: <code><a
href="#address0">address</a></code>, <code><a
href="#blockquote0">blockquote</a></code>, <code>center</code>, <code><a
<p>The following HTML elements have varying levels of special parsing
rules: <code><a href="#address0">address</a></code>, <code>area</code>,
<code><a href="#base0">base</a></code>, <code>basefont</code>,
<code>bgsound</code>, <code><a
href="#blockquote0">blockquote</a></code>, <code><a
href="#body0">body</a></code>, <code><a href="#br0">br</a></code>,
<code>center</code>, <code>col</code>, <code>colgroup</code>, <code><a
href="#dd0">dd</a></code>, <code><a href="#dir">dir</a></code>,
<code>div</code>, <code><a href="#dl0">dl</a></code>, <code><a
href="#dt0">dt</a></code>, <code>fieldset</code>, <code>form</code>,
<code><a href="#h10">h1</a></code>, <code><a href="#h20">h2</a></code>,
<code><a href="#h30">h3</a></code>, <code><a href="#h40">h4</a></code>,
<code><a href="#h50">h5</a></code>, <code><a href="#h60">h6</a></code>,
<code><a href="#li0">li</a></code>, <code>listing</code>, <code><a
href="#menu0">menu</a></code>, <code><a href="#ol0">ol</a></code>,
<code><a href="#p0">p</a></code>, <code>plaintext</code>, <code><a
href="#pre0">pre</a></code>, and <code><a href="#ul0">ul</a></code>

<dt><dfn id="class1">Class B</dfn>

<dd>
<p>The following HTML elements: <code>area</code>, <code><a
href="#base0">base</a></code>, <code>basefont</code>,
<code>bgsound</code>, <code><a href="#body0">body</a></code>, <code><a
href="#br0">br</a></code>, <code>button</code>, <code>caption</code>,
<code>col</code>, <code>colgroup</code>, <code>embed</code>,
<code>frame</code>, <code>frameset</code>, <code><a
href="#dt0">dt</a></code>, <code>embed</code>, <code>fieldset</code>,
<code>form</code>, <code>frame</code>, <code>frameset</code>, <code><a
href="#h10">h1</a></code>, <code><a href="#h20">h2</a></code>, <code><a
href="#h30">h3</a></code>, <code><a href="#h40">h4</a></code>, <code><a
href="#h50">h5</a></code>, <code><a href="#h60">h6</a></code>, <code><a
href="#head0">head</a></code>, <code><a href="#hr0">hr</a></code>,
<code><a href="#html0">html</a></code>, <code>iframe</code>,
<code>image</code>, <code><a href="#img0">img</a></code>,
<code>input</code>, <code>isindex</code>, <code><a
href="#link0">link</a></code>, <code>marquee</code>, <code><a
href="#meta0">meta</a></code>, <code>noembed</code>,
<code>noframes</code>, <code>noframes</code>, <code><a
href="#noscript0">noscript</a></code>, <code>object</code>,
<code>optgroup</code>, <code>option</code>, <code>param</code>, <code><a
<code>iframe</code>, <code>image</code>, <code><a
href="#img0">img</a></code>, <code>input</code>, <code>isindex</code>,
<code><a href="#li0">li</a></code>, <code><a
href="#link0">link</a></code>, <code>listing</code>, <code><a
href="#menu0">menu</a></code>, <code><a href="#meta0">meta</a></code>,
<code>noembed</code>, <code>noframes</code>, <code>noframes</code>,
<code><a href="#noscript0">noscript</a></code>, <code><a
href="#ol0">ol</a></code>, <code>optgroup</code>, <code>option</code>,
<code><a href="#p0">p</a></code>, <code>param</code>,
<code>plaintext</code>, <code><a href="#pre0">pre</a></code>, <code><a
href="#script1">script</a></code>, <code>select</code>,
<code>spacer</code>, <code><a href="#style0">style</a></code>,
<code>table</code>, <code>tbody</code>, <code>td</code>,
<code>textarea</code>, <code>tfoot</code>, <code>th</code>,
<code>tbody</code>, <code>textarea</code>, <code>tfoot</code>,
<code>thead</code>, <code><a href="#title2">title</a></code>,
<code>tr</code>
<code>tr</code>, and <code><a href="#ul0">ul</a></code>.

<dt><dfn id="scoping">Scoping</dfn>

<dd>
<p>The following HTML elements introduce new <span title="has an element
in scope"><a href="#have-an">scopes</a></span> for various parts of the
parsing: <code>button</code>, <code>caption</code>, <code><a
href="#html0">html</a></code>, <code>marquee</code>,
<code>object</code>, <code>table</code>, <code>td</code> and
<code>th</code>.

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

<dd>
<p>The following HTML elements: <code><a href="#a0">a</a></code>,
<code>b</code>, <code>big</code>, <code><a href="#em0">em</a></code>,
<code>font</code>, <code><a href="#i0">i</a></code>, <code>nobr</code>,
<code>s</code>, <code><a href="#small0">small</a></code>,
<code>strike</code>, <code><a href="#strong0">strong</a></code>,
<code>tt</code>, <code>u</code>, and <code>wbr</code>.
<p>The following HTML elements are those that end up in the <span><a
href="#list-of">list of active formatting elements</a></span>: <code><a
href="#a0">a</a></code>, <code>b</code>, <code>big</code>, <code><a
href="#em0">em</a></code>, <code>font</code>, <code><a
href="#i0">i</a></code>, <code>nobr</code>, <code>s</code>, <code><a
href="#small0">small</a></code>, <code>strike</code>, <code><a
href="#strong0">strong</a></code>, <code>tt</code>, <code>u</code>, and
<code>wbr</code>.

<dt><dfn id="phrasing">Phrasing</dfn>

<dd>
<p>All other HTML elements.
<p>All other elements found while parsing an HTML document.
</dl>

<p class="big-issue">Still need to add these new elements to the lists:
Expand All @@ -19375,10 +19379,6 @@ function receiver(e) {
href="#datagrid0">datagrid</a></code>, <code><a
href="#command1">command</a></code>

<p class="note">The "Class A" and "Class B" categories are not referred to
anywhere in this specification and are only considered different
categories for historical reasons.

<p>The <span><a href="#stack">stack of open elements</a></span> 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
Expand Down Expand Up @@ -20867,20 +20867,18 @@ function receiver(e) {
</ol>

<li>
<p>Set <var title="">node</var> to the previous entry in the
<span><a href="#stack">stack of open elements</a></span>.
<p>Otherwise, if <var title="">node</var> is in neither the
<span><a href="#formatting">formatting</a></span> category nor the
<span><a href="#phrasing">phrasing</a></span> category, then this
is a <span><a href="#parse">parse error</a></span>. Stop this
algorithm. The end tag token is ignored.

<li>
<p>If <var title="">node</var> is in either the <span><a
href="#formatting">formatting</a></span> or <span><a
href="#phrasing">phrasing</a></span> categories, then return to
step 2 of this algorithm. (The element at the top of the stack is
in neither of those categories, and therefore step 3 will never be
reached when <var title="">node</var> is the top element.)
<p>Set <var title="">node</var> to the previous entry in the
<span><a href="#stack">stack of open elements</a></span>.

<li>
<p>Otherwise, this is a <span><a href="#parse">parse
error</a></span>. The end tag token is ignored.
<p>Return to step 2.
</ol>
</dl>

Expand Down Expand Up @@ -23706,7 +23704,7 @@ http://lists.w3.org/Archives/Member/w3c-html-wg/2004JulSep/att-0135/role072704a.
- Greg Kilwein

> The second situation is an application that would like to highlight text
> in a text box or textarea for the purposes of a spell check, thesaurus,
> in a text box or textarea for the purposes of a spell check, thesaurus,
> or search-and-replace operation.
- Greg Kilwein

Expand Down
104 changes: 47 additions & 57 deletions source
Expand Up @@ -17302,44 +17302,49 @@ function receiver(e) {

<dl>

<dt><dfn>Class A</dfn></dt>
<dd><p>The following HTML elements: <code>address</code>,
<code>blockquote</code>, <code>center</code>, <code>dd</code>,
<code>dir</code>, <code>div</code>, <code>dl</code>,
<code>dt</code>, <code>fieldset</code>, <code>form</code>,
<code>h1</code>, <code>h2</code>, <code>h3</code>, <code>h4</code>,
<code>h5</code>, <code>h6</code>, <code>li</code>,
<code>listing</code>, <code>menu</code>, <code>ol</code>,
<code>p</code>, <code>plaintext</code>, <code>pre</code>, and
<code>ul</code></p></dd>

<dt><dfn>Class B</dfn></dt>
<dd><p>The following HTML elements: <code>area</code>,
<dt><dfn>Special</dfn></dt>
<dd><p>The following HTML elements have varying levels of special
parsing rules: <code>address</code>, <code>area</code>,
<code>base</code>, <code>basefont</code>, <code>bgsound</code>,
<code>body</code>, <code>br</code>, <code>button</code>,
<code>caption</code>, <code>col</code>, <code>colgroup</code>,
<code>embed</code>, <code>frame</code>, <code>frameset</code>,
<code>head</code>, <code>hr</code>, <code>html</code>,
<code>iframe</code>, <code>image</code>, <code>img</code>,
<code>input</code>, <code>isindex</code>, <code>link</code>,
<code>marquee</code>, <code>meta</code>, <code>noembed</code>,
<code>noframes</code>, <code>noframes</code>,
<code>noscript</code>, <code>object</code>, <code>optgroup</code>,
<code>option</code>, <code>param</code>, <code>script</code>,
<code>blockquote</code>, <code>body</code>, <code>br</code>,
<code>center</code>, <code>col</code>, <code>colgroup</code>,
<code>dd</code>, <code>dir</code>, <code>div</code>,
<code>dl</code>, <code>dt</code>, <code>embed</code>,
<code>fieldset</code>, <code>form</code>, <code>frame</code>,
<code>frameset</code>, <code>h1</code>, <code>h2</code>,
<code>h3</code>, <code>h4</code>, <code>h5</code>, <code>h6</code>,
<code>head</code>, <code>hr</code>, <code>iframe</code>,
<code>image</code>, <code>img</code>, <code>input</code>,
<code>isindex</code>, <code>li</code>, <code>link</code>,
<code>listing</code>, <code>menu</code>, <code>meta</code>,
<code>noembed</code>, <code>noframes</code>, <code>noframes</code>,
<code>noscript</code>, <code>ol</code>, <code>optgroup</code>,
<code>option</code>, <code>p</code>, <code>param</code>,
<code>plaintext</code>, <code>pre</code>, <code>script</code>,
<code>select</code>, <code>spacer</code>, <code>style</code>,
<code>table</code>, <code>tbody</code>, <code>td</code>,
<code>textarea</code>, <code>tfoot</code>, <code>th</code>,
<code>thead</code>, <code>title</code>, <code>tr</code></p></dd>
<code>tbody</code>, <code>textarea</code>, <code>tfoot</code>,
<code>thead</code>, <code>title</code>, <code>tr</code>, and
<code>ul</code>.</p></dd>

<dt><dfn>Scoping</dfn></dt>
<dd><p>The following HTML elements introduce new <span title="has
an element in scope">scopes</span> for various parts of the
parsing: <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>

<dt><dfn>Formatting</dfn></dt>
<dd><p>The following HTML elements: <code>a</code>, <code>b</code>,
<code>big</code>, <code>em</code>, <code>font</code>,
<code>i</code>, <code>nobr</code>, <code>s</code>,
<code>small</code>, <code>strike</code>, <code>strong</code>,
<code>tt</code>, <code>u</code>, and <code>wbr</code>.</p></dd>
<dd><p>The following HTML elements are those that end up in the
<span>list of active formatting elements</span>: <code>a</code>,
<code>b</code>, <code>big</code>, <code>em</code>,
<code>font</code>, <code>i</code>, <code>nobr</code>,
<code>s</code>, <code>small</code>, <code>strike</code>,
<code>strong</code>, <code>tt</code>, <code>u</code>, and
<code>wbr</code>.</p></dd>

<dt><dfn>Phrasing</dfn></dt>
<dd><p>All other HTML elements.</p></dd>
<dd><p>All other elements found while parsing an HTML
document.</p></dd>

</dl>

Expand All @@ -17349,10 +17354,6 @@ function receiver(e) {
<code>header</code>, <code>footer</code>, <code>datagrid</code>,
<code>command</code></p>

<p class="note">The "Class A" and "Class B" categories are not
referred to anywhere in this specification and are only considered
different categories for historical reasons.</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
Expand All @@ -17374,23 +17375,14 @@ function receiver(e) {
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>

<ul class="brief">

<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>

</ul>

</li>

<li><p>Otherwise, if <var title="">node</var> is an <code>html</code>
Expand Down Expand Up @@ -18799,8 +18791,8 @@ function receiver(e) {
<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> has the same tag name as the end
tag token, then:</p>
<li><p>If <var title="">node</var> has the same tag name as
the end tag token, then:</p>

<ol>

Expand All @@ -18818,18 +18810,16 @@ function receiver(e) {

</li>

<li><p>Otherwise, if <var title="">node</var> is in neither
the <span>formatting</span> category nor the
<span>phrasing</span> category, then this is a <span>parse
error</span>. Stop this algorithm. The end tag token is
ignored.</p></li>

<li><p>Set <var title="">node</var> to the previous entry in the
<span>stack of open elements</span>.</p></li>

<li><p>If <var title="">node</var> is in either the
<span>formatting</span> or <span>phrasing</span> categories,
then return to step 2 of this algorithm. (The element at the
top of the stack is in neither of those categories, and
therefore step 3 will never be reached when <var title="">node</var>
is the top element.)</p></li>

<li><p>Otherwise, this is a <span>parse
error</span>. The end tag token is ignored.</p></li>
<li><p>Return to step 2.</p></li>

</ol>

Expand Down Expand Up @@ -20686,7 +20676,7 @@ http://lists.w3.org/Archives/Member/w3c-html-wg/2004JulSep/att-0135/role072704a.
- Greg Kilwein

> The second situation is an application that would like to highlight text
> in a text box or textarea for the purposes of a spell check, thesaurus,
> in a text box or textarea for the purposes of a spell check, thesaurus,
> or search-and-replace operation.
- Greg Kilwein

Expand Down

0 comments on commit 28f824d

Please sign in to comment.