Skip to content

Commit 763e918

Browse files
committed
Revert "Fix #234: Change <menuitem> from void to like-<option>"
This reverts part of commit 5e49a20. Not reverted: * List of void elements. * List of special elements. * Commented out no-op end tag handling.
1 parent 6109f75 commit 763e918

File tree

1 file changed

+37
-78
lines changed

1 file changed

+37
-78
lines changed

source

Lines changed: 37 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -56093,10 +56093,8 @@ interface <dfn>HTMLMenuItemElement</dfn> : <span>HTMLElement</span> {
5609356093
<pre>&lt;form name="npc">
5609456094
&lt;label>Character name: &lt;input name=char type=text contextmenu=namemenu required>&lt;/label>
5609556095
&lt;menu type=context id=namemenu>
56096-
&lt;menuitem onclick="document.forms.npc.elements.char.value = getRandomName()">
56097-
Pick random name
56098-
&lt;menuitem onclick="prefillFields(document.forms.npc.elements.char.value)">
56099-
Prefill other fields based on name
56096+
&lt;menuitem label="Pick random name" onclick="document.forms.npc.elements.char.value = getRandomName()">
56097+
&lt;menuitem label="Prefill other fields based on name" onclick="prefillFields(document.forms.npc.elements.char.value)">
5610056098
&lt;/menu>
5610156099
&lt;/form></pre>
5610256100

@@ -98990,12 +98988,6 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
9899098988
if it is immediately followed by an <code>optgroup</code> element, or if there is no more content
9899198989
in the parent element.</p>
9899298990

98993-
<!-- </menuitem> -->
98994-
<p>A <code>menuitem</code> element's <span data-x="syntax-end-tag">end tag</span> may be omitted
98995-
if the <code>menuitem</code> element is immediately followed by a <code>menuitem</code>,
98996-
<code>hr</code>, or <code>menu</code> element, or if there is no more content in the parent
98997-
element.</p>
98998-
9899998991
<!-- <colgroup> -->
9900098992
<p>A <code>colgroup</code> element's <span data-x="syntax-start-tag">start tag</span> may be
9900198993
omitted if the first thing inside the <code>colgroup</code> element is a <code>col</code> element,
@@ -103870,10 +103862,10 @@ document.body.appendChild(text);
103870103862

103871103863
<p>When the steps below require the UA to <dfn>generate implied end tags</dfn>, then, while the
103872103864
<span>current node</span> is a <code>dd</code> element, a <code>dt</code> element, an
103873-
<code>li</code> element, a <code>menuitem</code> element, an <code>optgroup</code> element, an
103874-
<code>option</code> element, a <code>p</code> element, an <code>rb</code> element, an
103875-
<code>rp</code> element, an <code>rt</code> element, or an <code>rtc</code> element, the UA must
103876-
pop the <span>current node</span> off the <span>stack of open elements</span>.</p>
103865+
<code>li</code> element, an <code>optgroup</code> element, an <code>option</code> element, a
103866+
<code>p</code> element, an <code>rb</code> element, an <code>rp</code> element, an <code>rt</code>
103867+
element, or an <code>rtc</code> element, the UA must pop the <span>current node</span> off the
103868+
<span>stack of open elements</span>.</p>
103877103869

103878103870
<p>If a step requires the UA to generate implied end tags but lists an element to exclude from the
103879103871
process, then the UA must perform the above steps as if that element was not in the above
@@ -104777,14 +104769,13 @@ document.body.appendChild(text);
104777104769
<ol>
104778104770

104779104771
<li><p>If there is a node in the <span>stack of open elements</span> that is not either a
104780-
<code>dd</code> element, a <code>dt</code> element, an <code>li</code> element, a
104781-
<code>menuitem</code> element, an <code>optgroup</code> element, an <code>option</code>
104782-
element, a <code>p</code> element, an <code>rb</code> element, an <code>rp</code> element, an
104783-
<code>rt</code> element, an <code>rtc</code> element, a <code>tbody</code> element, a
104784-
<code>td</code> element, a <code>tfoot</code> element, a <code>th</code> element, a
104785-
<code>thead</code> element, a <code>tr</code> element, the <code>body</code> element, or the
104786-
<code>html</code> element, then this is a <span>parse error</span>.</p></li> <!-- (some of
104787-
those are fragment cases) -->
104772+
<code>dd</code> element, a <code>dt</code> element, an <code>li</code> element, an
104773+
<code>optgroup</code> element, an <code>option</code> element, a <code>p</code> element, an
104774+
<code>rb</code> element, an <code>rp</code> element, an <code>rt</code> element, an
104775+
<code>rtc</code> element, a <code>tbody</code> element, a <code>td</code> element, a
104776+
<code>tfoot</code> element, a <code>th</code> element, a <code>thead</code> element, a
104777+
<code>tr</code> element, the <code>body</code> element, or the <code>html</code> element, then
104778+
this is a <span>parse error</span>.</p></li> <!-- (some of those are fragment cases) -->
104788104779

104789104780
<li><p><span>Stop parsing</span>.</p></li>
104790104781

@@ -104802,15 +104793,15 @@ document.body.appendChild(text);
104802104793
<!-- if we get here, the insertion mode here is forcibly "in body". -->
104803104794

104804104795
<p>Otherwise, if there is a node in the <span>stack of open elements</span> that is not either a
104805-
<code>dd</code> element, a <code>dt</code> element, an <code>li</code> element, a
104806-
<code>menuitem</code> element, an <code>optgroup</code> element, an <code>option</code> element,
104807-
a <code>p</code> element, an <code>rb</code> element, an <code>rp</code> element, an
104808-
<code>rt</code> element, an <code>rtc</code> element, a <code>tbody</code> element, a
104809-
<code>td</code> element, a <code>tfoot</code> element, a <code>th</code> element, a
104810-
<code>thead</code> element, a <code>tr</code> element, the <code>body</code> element, or the
104811-
<code>html</code> element, then this is a <span>parse error</span>.</p> <!-- (some of those are
104812-
fragment cases, e.g., for <tbody> you'd have hit the first paragraph since the <body> wouldn't
104813-
be in scope, unless it was a fragment case) -->
104796+
<code>dd</code> element, a <code>dt</code> element, an <code>li</code> element, an
104797+
<code>optgroup</code> element, an <code>option</code> element, a <code>p</code> element, an
104798+
<code>rb</code> element, an <code>rp</code> element, an <code>rt</code> element, an
104799+
<code>rtc</code> element, a <code>tbody</code> element, a <code>td</code> element, a
104800+
<code>tfoot</code> element, a <code>th</code> element, a <code>thead</code> element, a
104801+
<code>tr</code> element, the <code>body</code> element, or the <code>html</code> element, then
104802+
this is a <span>parse error</span>.</p> <!-- (some of those are fragment cases, e.g., for
104803+
<tbody> you'd have hit the first paragraph since the <body> wouldn't be in scope, unless it was
104804+
a fragment case) -->
104814104805

104815104806
<!-- If we ever change the frameset-ok flag to an insertion mode, then we'd have to somehow keep
104816104807
track of its state when we switch to after-body. -->
@@ -104831,15 +104822,15 @@ document.body.appendChild(text);
104831104822
<!-- if we get here, the insertion mode here is forcibly "in body". -->
104832104823

104833104824
<p>Otherwise, if there is a node in the <span>stack of open elements</span> that is not either a
104834-
<code>dd</code> element, a <code>dt</code> element, an <code>li</code> element, a
104835-
<code>menuitem</code> element, an <code>optgroup</code> element, an <code>option</code> element,
104836-
a <code>p</code> element, an <code>rb</code> element, an <code>rp</code> element, an
104837-
<code>rt</code> element, an <code>rtc</code> element, a <code>tbody</code> element, a
104838-
<code>td</code> element, a <code>tfoot</code> element, a <code>th</code> element, a
104839-
<code>thead</code> element, a <code>tr</code> element, the <code>body</code> element, or the
104840-
<code>html</code> element, then this is a <span>parse error</span>.</p> <!-- (some of those are
104841-
fragment cases, e.g., for <tbody> you'd have hit the first paragraph since the <body> wouldn't
104842-
be in scope, unless it was a fragment case) -->
104825+
<code>dd</code> element, a <code>dt</code> element, an <code>li</code> element, an
104826+
<code>optgroup</code> element, an <code>option</code> element, a <code>p</code> element, an
104827+
<code>rb</code> element, an <code>rp</code> element, an <code>rt</code> element, an
104828+
<code>rtc</code> element, a <code>tbody</code> element, a <code>td</code> element, a
104829+
<code>tfoot</code> element, a <code>th</code> element, a <code>thead</code> element, a
104830+
<code>tr</code> element, the <code>body</code> element, or the <code>html</code> element, then
104831+
this is a <span>parse error</span>.</p> <!-- (some of those are fragment cases, e.g., for
104832+
<tbody> you'd have hit the first paragraph since the <body> wouldn't be in scope, unless it was
104833+
a fragment case) -->
104843104834

104844104835
<!-- If we ever change the frameset-ok flag to an insertion mode, then we'd have to somehow keep
104845104836
track of its state when we switch to after-body. -->
@@ -104857,7 +104848,7 @@ document.body.appendChild(text);
104857104848
<!-- the normal ones -->
104858104849
<dt>A start tag whose tag name is one of: "address", "article", "aside", "blockquote", "center",
104859104850
"details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer", "header",
104860-
"hgroup", "main", "nav", "ol", "p", "section", "summary", "ul"</dt>
104851+
"hgroup", "main", "menu", "nav", "ol", "p", "section", "summary", "ul"</dt>
104861104852
<dd>
104862104853

104863104854
<!-- As of May 2008 this doesn't match any browser exactly, but is as close to what IE does as I
@@ -104872,23 +104863,6 @@ document.body.appendChild(text);
104872104863

104873104864
</dd>
104874104865

104875-
<!-- as normal, but close menuitem if it's the current node -->
104876-
<dt>A start tag whose tag name is "menu"</dt>
104877-
<dd>
104878-
104879-
<p>If the <span>stack of open elements</span> <span data-x="has an element in button scope">has a
104880-
<code>p</code> element in button scope</span>, then <span>close a <code>p</code>
104881-
element</span>.</p>
104882-
104883-
<!-- fake </menuitem> (maybe) -->
104884-
<p>If the <span>current node</span> is a <code>menuitem</code> element, pop that node from the
104885-
<span>stack of open elements</span>.</p>
104886-
<!-- end of fake </menuitem> -->
104887-
104888-
<p><span>Insert an HTML element</span> for the token.</p>
104889-
104890-
</dd>
104891-
104892104866
<!-- as normal, but close h1-h6 if it's the current node -->
104893104867
<dt>A start tag whose tag name is one of: "h1", "h2", "h3", "h4",
104894104868
"h5", "h6"</dt>
@@ -105142,7 +105116,7 @@ document.body.appendChild(text);
105142105116

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

105145-
<!-- the normal ones (and menu) -->
105119+
<!-- the normal ones -->
105146105120
<dt>An end tag whose tag name is one of: "address", "article", "aside", "blockquote", "button",
105147105121
"center", "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure", "footer",
105148105122
"header", "hgroup", "listing", "main", "menu", "nav", "ol", "pre", "section", "summary",
@@ -105495,7 +105469,7 @@ document.body.appendChild(text);
105495105469

105496105470
</dd>
105497105471

105498-
<dt>A start tag whose tag name is one of: "param", "source", "track"</dt>
105472+
<dt>A start tag whose tag name is one of: "menuitem", "param", "source", "track"</dt>
105499105473
<dd>
105500105474

105501105475
<p><span>Insert an HTML element</span> for the token. Immediately pop the <span>current
@@ -105513,11 +105487,6 @@ document.body.appendChild(text);
105513105487
<code>p</code> element in button scope</span>, then <span>close a <code>p</code>
105514105488
element</span>.</p>
105515105489

105516-
<!-- fake </menuitem> (maybe) -->
105517-
<p>If the <span>current node</span> is a <code>menuitem</code> element, pop that node from the
105518-
<span>stack of open elements</span>.</p>
105519-
<!-- end of fake </menuitem> -->
105520-
105521105490
<p><span>Insert an HTML element</span> for the token. Immediately pop the <span>current
105522105491
node</span> off the <span>stack of open elements</span>.</p>
105523105492

@@ -105627,16 +105596,6 @@ document.body.appendChild(text);
105627105596

105628105597
</dd>
105629105598

105630-
<dt>A start tag whose tag name is "menuitem"</dt>
105631-
<dd>
105632-
105633-
<p>If the <span>current node</span> is a <code>menuitem</code> element, then pop the
105634-
<span>current node</span> off the <span>stack of open elements</span>.</p>
105635-
105636-
<p><span>Insert an HTML element</span> for the token.</p>
105637-
105638-
</dd>
105639-
105640105599
<dt>A start tag whose tag name is one of: "rb", "rtc"</dt>
105641105600
<dd>
105642105601

@@ -108457,9 +108416,9 @@ document.body.appendChild(text);
108457108416
<p>If <var>current node</var> is an <code>area</code>, <code>base</code>,
108458108417
<code>basefont</code>, <code>bgsound</code>, <code>br</code>, <code>col</code>,
108459108418
<code>embed</code>, <code>frame</code>, <code>hr</code>, <code>img</code>,
108460-
<code>input</code>, <code>keygen</code>, <code>link</code>, <code>meta</code>,
108461-
<code>param</code>, <code>source</code>, <code>track</code> or <code>wbr</code> element,
108462-
then continue on to the next child node at this point.</p>
108419+
<code>input</code>, <code>keygen</code>, <code>link</code>, <code>menuitem</code>,
108420+
<code>meta</code>, <code>param</code>, <code>source</code>, <code>track</code> or
108421+
<code>wbr</code> element, then continue on to the next child node at this point.</p>
108463108422
<!-- VOIDLIST superset -->
108464108423
<!-- also, i guess: image, but we don't list it because we don't consider it an "element",
108465108424
more a "macro", and thus we should never serialize it -->

0 commit comments

Comments
 (0)