Skip to content
Permalink
Browse files

[cgiowt] (2) Try to make <button> not scoping, for compat.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=9496

git-svn-id: http://svn.whatwg.org/webapps@5032 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 13, 2010
1 parent 1634531 commit 70c131b5971985db8d4b4401fe3e42add8d247fa
Showing with 172 additions and 175 deletions.
  1. +55 −56 complete.html
  2. +7 −7 images/content-venn.svg
  3. +55 −56 index
  4. +55 −56 source
<p>Elements in the stack fall into the following categories:</p>

<dl><dt><dfn id=special>Special</dfn></dt>

<dd><p>The following HTML elements have varying levels of special
parsing rules: <code><a href=#the-address-element>address</a></code>, <code><a href=#the-area-element>area</a></code>,
<code><a href=#the-article-element>article</a></code>, <code><a href=#the-aside-element>aside</a></code>, <code><a href=#the-base-element>base</a></code>,
<code><a href=#basefont>basefont</a></code>, <code><a href=#bgsound>bgsound</a></code>,
<code><a href=#the-blockquote-element>blockquote</a></code>, <code><a href=#the-body-element-0>body</a></code>, <code><a href=#the-br-element>br</a></code>,
<code><a href=#center>center</a></code>, <code><a href=#the-col-element>col</a></code>, <code><a href=#the-colgroup-element>colgroup</a></code>,
<code><a href=#the-command>command</a></code>, <!--v2DDATAGRID <code>datagrid</code>-->,
<code><a href=#the-dd-element>dd</a></code>, <code><a href=#the-details-element>details</a></code>, <code><a href=#dir>dir</a></code>,
<code><a href=#the-div-element>div</a></code>, <code><a href=#the-dl-element>dl</a></code>, <code><a href=#the-dt-element>dt</a></code>,
<code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-fieldset-element>fieldset</a></code>, <code><a href=#the-figure-element>figure</a></code>,
<code><a href=#the-footer-element>footer</a></code>, <code><a href=#the-form-element>form</a></code>, <code><a href=#frame>frame</a></code>,
<code><a href=#frameset>frameset</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>,
<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>,
<code><a href=#the-head-element-0>head</a></code>, <code><a href=#the-header-element>header</a></code>, <code><a href=#the-hgroup-element>hgroup</a></code>,
<code><a href=#the-hr-element>hr</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <!-- <code>image</code>,
(commented out because this isn't an element that can end up on the
stack, so it doesn't matter) --> <code><a href=#the-img-element>img</a></code>,
<code><a href=#the-input-element>input</a></code>, <code><a href=#isindex-0>isindex</a></code>, <code><a href=#the-li-element>li</a></code>,
<code><a href=#the-link-element>link</a></code>, <code><a href=#listing>listing</a></code>, <code><a href=#menus>menu</a></code>,
<code><a href=#meta>meta</a></code>, <code><a href=#the-nav-element>nav</a></code>, <code><a href=#noembed>noembed</a></code>,
<code><a href=#noframes>noframes</a></code>, <code><a href=#the-noscript-element>noscript</a></code>, <code><a href=#the-ol-element>ol</a></code>,
<code><a href=#the-p-element>p</a></code>, <code><a href=#the-param-element>param</a></code>, <code><a href=#plaintext>plaintext</a></code>,
<code><a href=#the-pre-element>pre</a></code>, <code><a href=#script>script</a></code>, <code><a href=#the-section-element>section</a></code>,
<code><a href=#the-select-element>select</a></code>, <code><a href=#the-style-element>style</a></code>, <code><a href=#the-tbody-element>tbody</a></code>,
<code><a href=#the-textarea-element>textarea</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>, <code><a href=#the-thead-element>thead</a></code>,
<code><a href=#the-title-element-0>title</a></code>, <code><a href=#the-tr-element>tr</a></code>, <code><a href=#the-ul-element>ul</a></code>,
<code><a href=#the-wbr-element>wbr</a></code>, and <code><a href=#xmp>xmp</a></code>.</dd>
<code><a href=#the-button-element>button</a></code>, <code><a href=#center>center</a></code>, <code><a href=#the-col-element>col</a></code>,
<code><a href=#the-colgroup-element>colgroup</a></code>, <code><a href=#the-command>command</a></code>, <!--v2DDATAGRID
<code>datagrid</code>-->, <code><a href=#the-dd-element>dd</a></code>, <code><a href=#the-details-element>details</a></code>,
<code><a href=#dir>dir</a></code>, <code><a href=#the-div-element>div</a></code>, <code><a href=#the-dl-element>dl</a></code>,
<code><a href=#the-dt-element>dt</a></code>, <code><a href=#the-embed-element>embed</a></code>, <code><a href=#the-fieldset-element>fieldset</a></code>,
<code><a href=#the-figure-element>figure</a></code>, <code><a href=#the-footer-element>footer</a></code>, <code><a href=#the-form-element>form</a></code>,
<code><a href=#frame>frame</a></code>, <code><a href=#frameset>frameset</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h1</a></code>,
<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h2</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h3</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h4</a></code>, <code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h5</a></code>,
<code><a href=#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements>h6</a></code>, <code><a href=#the-head-element-0>head</a></code>, <code><a href=#the-header-element>header</a></code>,
<code><a href=#the-hgroup-element>hgroup</a></code>, <code><a href=#the-hr-element>hr</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <!--
<code>image</code>, (commented out because this isn't an element
that can end up on the stack, so it doesn't matter) -->
<code><a href=#the-img-element>img</a></code>, <code><a href=#the-input-element>input</a></code>, <code><a href=#isindex-0>isindex</a></code>,
<code><a href=#the-li-element>li</a></code>, <code><a href=#the-link-element>link</a></code>, <code><a href=#listing>listing</a></code>,
<code><a href=#menus>menu</a></code>, <code><a href=#meta>meta</a></code>, <code><a href=#the-nav-element>nav</a></code>,
<code><a href=#noembed>noembed</a></code>, <code><a href=#noframes>noframes</a></code>, <code><a href=#the-noscript-element>noscript</a></code>,
<code><a href=#the-ol-element>ol</a></code>, <code><a href=#the-p-element>p</a></code>, <code><a href=#the-param-element>param</a></code>,
<code><a href=#plaintext>plaintext</a></code>, <code><a href=#the-pre-element>pre</a></code>, <code><a href=#script>script</a></code>,
<code><a href=#the-section-element>section</a></code>, <code><a href=#the-select-element>select</a></code>, <code><a href=#the-style-element>style</a></code>,
<code><a href=#the-tbody-element>tbody</a></code>, <code><a href=#the-textarea-element>textarea</a></code>, <code><a href=#the-tfoot-element>tfoot</a></code>,
<code><a href=#the-thead-element>thead</a></code>, <code><a href=#the-title-element-0>title</a></code>, <code><a href=#the-tr-element>tr</a></code>,
<code><a href=#the-ul-element>ul</a></code>, <code><a href=#the-wbr-element>wbr</a></code>, and <code><a href=#xmp>xmp</a></code>.</dd>

<dt><dfn id=scoping>Scoping</dfn></dt>
<dd><p>The following HTML elements introduce new <a href=#has-an-element-in-scope title="has
an element in scope">scopes</a> for various parts of the
parsing: <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-button-element>button</a></code>,
<code><a href=#the-caption-element>caption</a></code>, <code><a href=#the-html-element-0>html</a></code>, <code><a href=#the-marquee-element>marquee</a></code>,
<code><a href=#the-object-element>object</a></code>, <code><a href=#the-table-element>table</a></code>, <code><a href=#the-td-element>td</a></code>,
<code><a href=#the-th-element>th</a></code>, and SVG's <code>foreignObject</code>.</dd>
parsing: <code><a href=#the-applet-element>applet</a></code>, <code><a href=#the-caption-element>caption</a></code>,
<code><a href=#the-html-element-0>html</a></code>, <code><a href=#the-marquee-element>marquee</a></code>, <code><a href=#the-object-element>object</a></code>,
<code><a href=#the-table-element>table</a></code>, <code><a href=#the-td-element>td</a></code>, <code><a href=#the-th-element>th</a></code>, and SVG's
<code>foreignObject</code>.</dd>

<dt><dfn id=formatting>Formatting</dfn></dt>
<dd><p>The following HTML elements are those that end up in the

</dd>

<!-- end tags for non-phrasing flow content elements -->
<!-- button is a hybrid -->
<dt>A start tag whose tag name is "button"</dt>
<dd>

<p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-scope title="has
an element in scope">has a <code>button</code> element in
scope</a>, then this is a <a href=#parse-error>parse error</a>;
act as if an end tag with the tag name "button" had been seen,
then reprocess the token.</p>

<p>Otherwise:</p>

<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
any.</p>

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>

</dd>

<!-- end tags for non-phrasing flow content elements (and button) -->

<!-- the normal ones -->
<dt>An end tag whose tag name is one of: "address", "article",
"aside", "blockquote", "center", <!--v2DATAGRID"datagrid",-->
"details", "dir", "div", "dl", "fieldset", "figure", "footer",
"header", "hgroup", "listing", "menu", "nav", "ol", "pre",
"section", "ul"</dt>
"aside", "blockquote", "button", "center",
<!--v2DATAGRID"datagrid",--> "details", "dir", "div", "dl",
"fieldset", "figure", "footer", "header", "hgroup", "listing",
"menu", "nav", "ol", "pre", "section", "ul"</dt>
<dd>

<p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in scope">have an element in scope</a>

</ol></dd>

<!-- see also applet/marquee/object lower down -->

<dt>An end tag whose tag name is "sarcasm"</dt>
<dd>
<p>Take a deep breath, then act as described in the "any other end

</dd>

<dt>A start tag whose tag name is "button"</dt>
<dd>

<p>If the <a href=#stack-of-open-elements>stack of open elements</a> <a href=#has-an-element-in-scope title="has
an element in scope">has a <code>button</code> element in
scope</a>, then this is a <a href=#parse-error>parse error</a>;
act as if an end tag with the tag name "button" had been seen,
then reprocess the token.</p>

<p>Otherwise:</p>

<p><a href=#reconstruct-the-active-formatting-elements>Reconstruct the active formatting elements</a>, if
any.</p>

<p><a href=#insert-an-html-element>Insert an HTML element</a> for the token.</p>

<p>Insert a marker at the end of the <a href=#list-of-active-formatting-elements>list of active
formatting elements</a>.</p>

<p>Set the <a href=#frameset-ok-flag>frameset-ok flag</a> to "not ok".</p>

</dd>

<dt>A start tag token whose tag name is one of: "applet",
"marquee", "object"</dt>
<dd>

</dd>

<dt>An end tag token whose tag name is one of: "applet", "button",
<dt>An end tag token whose tag name is one of: "applet",
"marquee", "object"</dt>
<dd>

@@ -17,7 +17,7 @@
</style>
<g class="a" transform="translate(2, -3)">
<ellipse rx="244" ry="132"/>
<foreignObject x="250" y="-150" width="500" transform="translate(-2, 3)">
<foreignObject x="250" y="-150" width="500" height="288" transform="translate(-2, 3)">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Flow content</h1>
<ul>
@@ -110,7 +110,7 @@
</g>
<g class="b" transform="translate(127, -48.5)">
<ellipse rx="75" ry="42.5"/>
<foreignObject x="250" y="-150" width="500" transform="translate(-127, 48.5)">
<foreignObject x="250" y="-150" width="500" height="288" transform="translate(-127, 48.5)">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Heading content</h1>
<ul>
@@ -128,7 +128,7 @@
</g>
<g class="c" transform="translate(125, 42)">
<ellipse rx="75" ry="42.5"/>
<foreignObject x="250" y="-150" width="500" transform="translate(-125, -42)">
<foreignObject x="250" y="-150" width="500" height="288" transform="translate(-125, -42)">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Sectioning content</h1>
<ul>
@@ -143,7 +143,7 @@
</g>
<g class="d" transform="translate(-113, 78)">
<ellipse rx="117" ry="47" transform="rotate(-15)"/>
<foreignObject x="250" y="-150" width="500" transform="translate(113, -78)">
<foreignObject x="250" y="-150" width="500" height="288" transform="translate(113, -78)">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Metadata content</h1>
<ul>
@@ -162,7 +162,7 @@
</g>
<g class="e" transform="translate(-128, -34)">
<ellipse rx="94" ry="51"/>
<foreignObject x="250" y="-150" width="500" transform="translate(128, 34)">
<foreignObject x="250" y="-150" width="500" height="288" transform="translate(128, 34)">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Interactive content</h1>
<ul>
@@ -189,7 +189,7 @@
</g>
<g class="f" transform="translate(-40.5, -5)">
<ellipse rx="76.5" ry="80"/>
<foreignObject x="250" y="-150" width="500" transform="translate(40.5, 5)">
<foreignObject x="250" y="-150" width="500" height="288" transform="translate(40.5, 5)">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Phrasing content</h1>
<ul>
@@ -253,7 +253,7 @@
</g>
<g class="g" transform="translate(-42, -7)">
<ellipse rx="68" ry="22.5"/>
<foreignObject x="250" y="-150" width="500" transform="translate(42, 7)">
<foreignObject x="250" y="-150" width="500" height="288" transform="translate(42, 7)">
<div xmlns="http://www.w3.org/1999/xhtml">
<h1>Embedded content</h1>
<ul>

0 comments on commit 70c131b

Please sign in to comment.
You can’t perform that action at this time.