Skip to content

Commit

Permalink
Mozilla bug 1372276 - Remove menuitem.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Jun 22, 2022
1 parent 0d33011 commit 4d5d0bd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
7 changes: 0 additions & 7 deletions src/nu/validator/htmlparser/impl/ElementName.java
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,6 @@ public void destructor() {
// return "ANNOTATION_XML";
// case TreeBuilder.FOREIGNOBJECT_OR_DESC:
// return "FOREIGNOBJECT_OR_DESC";
// case TreeBuilder.MENUITEM:
// return "MENUITEM";
// }
// return null;
// }
Expand Down Expand Up @@ -1143,10 +1141,6 @@ public void destructor() {
// CPPONLY: NS_NewHTMLFormElement,
// CPPONLY: NS_NewSVGUnknownElement,
TreeBuilder.FORM | SPECIAL);
public static final ElementName MENUITEM = new ElementName("menuitem", "menuitem",
// CPPONLY: NS_NewHTMLMenuItemElement,
// CPPONLY: NS_NewSVGUnknownElement,
TreeBuilder.MENUITEM);
public static final ElementName PARAM = new ElementName("param", "param",
// CPPONLY: NS_NewHTMLSharedElement,
// CPPONLY: NS_NewSVGUnknownElement,
Expand Down Expand Up @@ -1672,7 +1666,6 @@ public void destructor() {
SYMBOL,
ANIMATETRANSFORM,
EM,
MENUITEM,
ANIMATEMOTION,
CAPTION,
MN,
Expand Down
8 changes: 2 additions & 6 deletions src/nu/validator/htmlparser/impl/TreeBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,9 @@ public abstract class TreeBuilder<T> implements TokenHandler,

final static int KEYGEN = 65;

final static int MENUITEM = 66;
final static int TEMPLATE = 66;

final static int TEMPLATE = 67;

final static int IMG = 68;
final static int IMG = 67;

// start insertion modes

Expand Down Expand Up @@ -2121,7 +2119,6 @@ public final void startTag(ElementName elementName,
reconstructTheActiveFormattingElements();
// FALL THROUGH to PARAM_OR_SOURCE_OR_TRACK
// CPPONLY: MOZ_FALLTHROUGH;
// CPPONLY: case MENUITEM:
case PARAM_OR_SOURCE_OR_TRACK:
appendVoidElementToCurrentMayFoster(
elementName,
Expand Down Expand Up @@ -3570,7 +3567,6 @@ public final void endTag(ElementName elementName) throws SAXException {
break;
case AREA_OR_WBR:
case KEYGEN: // XXX??
// CPPONLY: case MENUITEM:
case PARAM_OR_SOURCE_OR_TRACK:
case EMBED:
case IMG:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1961,16 +1961,9 @@ public void visit(SwitchStmt n, LocalSymbolTable arg) {

public void visit(SwitchEntryStmt n, LocalSymbolTable arg) {
if (n.getLabel() != null) {
boolean isMenuitem = n.getLabel().toString().equals("MENUITEM");
if (isMenuitem) {
printer.printWithoutIndent("#ifdef ENABLE_VOID_MENUITEM\n");
}
printer.print("case ");
n.getLabel().accept(this, arg);
printer.print(":");
if (isMenuitem) {
printer.printWithoutIndent("\n#endif");
}
} else {
printer.print("default:");
}
Expand Down

0 comments on commit 4d5d0bd

Please sign in to comment.