Bug 676236 - Add support for the <menuitem> element to the HTML parser (not enabled by default) r=hsivonen
authorJan Varga <jan.varga@gmail.com>
Sat, 06 Aug 2011 08:41:36 +0200
changeset 73901 e8fa46a9db70e6099a7b446c7ce1111a292eca9f
parent 73900 be090ee1747a378bef88e392164ad01548d912ed
child 73937 ba21778fcc14908df6954e41074e1162c0cfd103
push id20925
push userJan.Varga@gmail.com
push dateSat, 06 Aug 2011 06:45:11 +0000
treeherdermozilla-central@e8fa46a9db70 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershsivonen
bugs676236
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 676236 - Add support for the <menuitem> element to the HTML parser (not enabled by default) r=hsivonen
parser/html/Makefile.in
parser/html/nsHtml5AtomList.h
parser/html/nsHtml5ElementName.cpp
parser/html/nsHtml5ElementName.h
parser/html/nsHtml5TreeBuilder.cpp
parser/html/nsHtml5TreeBuilder.h
--- a/parser/html/Makefile.in
+++ b/parser/html/Makefile.in
@@ -83,8 +83,10 @@ CPPSRCS		= \
 
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
 INCLUDES	+= \
 		-I$(srcdir)/../../content/base/src \
 		$(NULL)
+
+#DEFINES		+= -DENABLE_VOID_MENUITEM
--- a/parser/html/nsHtml5AtomList.h
+++ b/parser/html/nsHtml5AtomList.h
@@ -960,16 +960,17 @@ HTML5_ATOM(feoffset, "feoffset")
 HTML5_ATOM(feOffset, "feOffset")
 HTML5_ATOM(interval, "interval")
 HTML5_ATOM(integers, "integers")
 HTML5_ATOM(infinity, "infinity")
 HTML5_ATOM(listener, "listener")
 HTML5_ATOM(lowlimit, "lowlimit")
 HTML5_ATOM(metadata, "metadata")
 HTML5_ATOM(menclose, "menclose")
+HTML5_ATOM(menuitem, "menuitem")
 HTML5_ATOM(mphantom, "mphantom")
 HTML5_ATOM(polyline, "polyline")
 HTML5_ATOM(prefetch, "prefetch")
 HTML5_ATOM(progress, "progress")
 HTML5_ATOM(prsubset, "prsubset")
 HTML5_ATOM(quotient, "quotient")
 HTML5_ATOM(selector, "selector")
 HTML5_ATOM(textpath, "textpath")
--- a/parser/html/nsHtml5ElementName.cpp
+++ b/parser/html/nsHtml5ElementName.cpp
@@ -432,16 +432,17 @@ nsHtml5ElementName* nsHtml5ElementName::
 nsHtml5ElementName* nsHtml5ElementName::ELT_GLYPHREF = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_INTERVAL = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_INTEGERS = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_INFINITY = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_LISTENER = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_LOWLIMIT = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_METADATA = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_MENCLOSE = nsnull;
+nsHtml5ElementName* nsHtml5ElementName::ELT_MENUITEM = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_MPHANTOM = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_NOFRAMES = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_NOSCRIPT = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_OPTGROUP = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_POLYLINE = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_PREFETCH = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_PROGRESS = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_PRSUBSET = nsnull;
@@ -520,17 +521,17 @@ nsHtml5ElementName* nsHtml5ElementName::
 nsHtml5ElementName* nsHtml5ElementName::ELT_FONT_FACE_FORMAT = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_FECONVOLVEMATRIX = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_FEDIFFUSELIGHTING = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_FEDISPLACEMENTMAP = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_FESPECULARLIGHTING = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_DOMAINOFAPPLICATION = nsnull;
 nsHtml5ElementName* nsHtml5ElementName::ELT_FECOMPONENTTRANSFER = nsnull;
 nsHtml5ElementName** nsHtml5ElementName::ELEMENT_NAMES = 0;
-static PRInt32 const ELEMENT_HASHES_DATA[] = { 1057, 1090, 1255, 1321, 1552, 1585, 1651, 1717, 68162, 68899, 69059, 69764, 70020, 70276, 71077, 71205, 72134, 72232, 72264, 72296, 72328, 72360, 72392, 73351, 74312, 75209, 78124, 78284, 78476, 79149, 79309, 79341, 79469, 81295, 81487, 82224, 84498, 84626, 86164, 86292, 86612, 86676, 87445, 3183041, 3186241, 3198017, 3218722, 3226754, 3247715, 3256803, 3263971, 3264995, 3289252, 3291332, 3295524, 3299620, 3326725, 3379303, 3392679, 3448233, 3460553, 3461577, 3510347, 3546604, 3552364, 3556524, 3576461, 3586349, 3588141, 3590797, 3596333, 3622062, 3625454, 3627054, 3675728, 3749042, 3771059, 3771571, 3776211, 3782323, 3782963, 3784883, 3785395, 3788979, 3815476, 3839605, 3885110, 3917911, 3948984, 3951096, 135304769, 135858241, 136498210, 136906434, 137138658, 137512995, 137531875, 137548067, 137629283, 137645539, 137646563, 137775779, 138529956, 138615076, 139040932, 140954086, 141179366, 141690439, 142738600, 143013512, 146979116, 147175724, 147475756, 147902637, 147936877, 148017645, 148131885, 148228141, 148229165, 148309165, 148395629, 148551853, 148618829, 149076462, 149490158, 149572782, 151277616, 151639440, 153268914, 153486514, 153563314, 153750706, 153763314, 153914034, 154406067, 154417459, 154600979, 154678323, 154680979, 154866835, 155366708, 155375188, 155391572, 155465780, 155869364, 158045494, 168988979, 169321621, 169652752, 173151309, 174240818, 174247297, 174669292, 175391532, 176638123, 177380397, 177879204, 177886734, 180753473, 181020073, 181503558, 181686320, 181999237, 181999311, 182048201, 182074866, 182078003, 182083764, 182920847, 184716457, 184976961, 185145071, 187281445, 187872052, 188100653, 188875944, 188919873, 188920457, 189107250, 189203987, 189371817, 189414886, 189567458, 190266670, 191318187, 191337609, 202479203, 202493027, 202835587, 202843747, 203013219, 203036048, 203045987, 203177552, 203898516, 204648562, 205067918, 205078130, 205096654, 205689142, 205690439, 205988909, 207213161, 207794484, 207800999, 208023602, 208213644, 208213647, 210261490, 210310273, 210940978, 213325049, 213946445, 214055079, 215125040, 215134273, 215135028, 215237420, 215418148, 215553166, 215553394, 215563858, 215627949, 215754324, 217529652, 217713834, 217732628, 218731945, 221417045, 221424946, 221493746, 221515401, 221658189, 221908140, 221910626, 221921586, 222659762, 225001091, 236105833, 236113965, 236194995, 236195427, 236206132, 236206387, 236211683, 236212707, 236381647, 236571826, 237124271, 238172205, 238210544, 238270764, 238435405, 238501172, 239224867, 239257644, 239710497, 240307721, 241208789, 241241557, 241318060, 241319404, 241343533, 241344069, 241405397, 241765845, 243864964, 244502085, 244946220, 245109902, 247647266, 247707956, 248648814, 248648836, 248682161, 248986932, 249058914, 249697357, 252132601, 252135604, 252317348, 255007012, 255278388, 255641645, 256365156, 257566121, 269763372, 271202790, 271863856, 272049197, 272127474, 274339449, 274939471, 275388004, 275388005, 275388006, 275977800, 278267602, 278513831, 278712622, 281613765, 281683369, 282120228, 282250732, 282508942, 283743649, 283787570, 284710386, 285391148, 285478533, 285854898, 285873762, 286931113, 288964227, 289445441, 289689648, 291671489, 303512884, 305319975, 305610036, 305764101, 308448294, 308675890, 312085683, 312264750, 315032867, 316391000, 317331042, 317902135, 318950711, 319447220, 321499182, 322538804, 323145200, 337067316, 337826293, 339905989, 340833697, 341457068, 342310196, 345302593, 349554733, 349771471, 349786245, 350819405, 356072847, 370349192, 373962798, 375558638, 375574835, 376053993, 383276530, 383373833, 383407586, 384439906, 386079012, 404133513, 404307343, 407031852, 408072233, 409112005, 409608425, 409771500, 419040932, 437730612, 439529766, 442616365, 442813037, 443157674, 443295316, 450118444, 450482697, 456789668, 459935396, 471217869, 474073645, 476230702, 476665218, 476717289, 483014825, 485083298, 489306281, 538364390, 540675748, 543819186, 543958612, 576960820, 577242548, 610515252, 642202932, 644420819 };
+static PRInt32 const ELEMENT_HASHES_DATA[] = { 1057, 1090, 1255, 1321, 1552, 1585, 1651, 1717, 68162, 68899, 69059, 69764, 70020, 70276, 71077, 71205, 72134, 72232, 72264, 72296, 72328, 72360, 72392, 73351, 74312, 75209, 78124, 78284, 78476, 79149, 79309, 79341, 79469, 81295, 81487, 82224, 84498, 84626, 86164, 86292, 86612, 86676, 87445, 3183041, 3186241, 3198017, 3218722, 3226754, 3247715, 3256803, 3263971, 3264995, 3289252, 3291332, 3295524, 3299620, 3326725, 3379303, 3392679, 3448233, 3460553, 3461577, 3510347, 3546604, 3552364, 3556524, 3576461, 3586349, 3588141, 3590797, 3596333, 3622062, 3625454, 3627054, 3675728, 3749042, 3771059, 3771571, 3776211, 3782323, 3782963, 3784883, 3785395, 3788979, 3815476, 3839605, 3885110, 3917911, 3948984, 3951096, 135304769, 135858241, 136498210, 136906434, 137138658, 137512995, 137531875, 137548067, 137629283, 137645539, 137646563, 137775779, 138529956, 138615076, 139040932, 140954086, 141179366, 141690439, 142738600, 143013512, 146979116, 147175724, 147475756, 147902637, 147936877, 148017645, 148131885, 148228141, 148229165, 148309165, 148395629, 148551853, 148618829, 149076462, 149490158, 149572782, 151277616, 151639440, 153268914, 153486514, 153563314, 153750706, 153763314, 153914034, 154406067, 154417459, 154600979, 154678323, 154680979, 154866835, 155366708, 155375188, 155391572, 155465780, 155869364, 158045494, 168988979, 169321621, 169652752, 173151309, 174240818, 174247297, 174669292, 175391532, 176638123, 177380397, 177879204, 177886734, 180753473, 181020073, 181503558, 181686320, 181999237, 181999311, 182048201, 182074866, 182078003, 182083764, 182920847, 184716457, 184976961, 185145071, 187281445, 187872052, 188100653, 188875944, 188919873, 188920457, 189107250, 189203987, 189371817, 189414886, 189567458, 190266670, 191318187, 191337609, 202479203, 202493027, 202835587, 202843747, 203013219, 203036048, 203045987, 203177552, 203898516, 204648562, 205067918, 205078130, 205096654, 205689142, 205690439, 205988909, 207213161, 207794484, 207800999, 208023602, 208213644, 208213647, 210261490, 210310273, 210940978, 213325049, 213946445, 214055079, 215125040, 215134273, 215135028, 215237420, 215418148, 215553166, 215553394, 215563858, 215627949, 215754324, 217529652, 217713834, 217732628, 218731945, 221417045, 221424946, 221493746, 221515401, 221658189, 221908140, 221910626, 221921586, 222659762, 225001091, 236105833, 236113965, 236194995, 236195427, 236206132, 236206387, 236211683, 236212707, 236381647, 236571826, 237124271, 238172205, 238210544, 238270764, 238435405, 238501172, 239224867, 239257644, 239710497, 240307721, 241208789, 241241557, 241318060, 241319404, 241343533, 241344069, 241405397, 241765845, 243864964, 244502085, 244946220, 245109902, 247647266, 247707956, 248648814, 248648836, 248682161, 248986932, 249058914, 249697357, 252132601, 252135604, 252317348, 255007012, 255278388, 255641645, 256365156, 257566121, 269763372, 271202790, 271863856, 272049197, 272127474, 274339449, 274939471, 275388004, 275388005, 275388006, 275977800, 278267602, 278513831, 278712622, 281613765, 281683369, 282120228, 282250732, 282498697, 282508942, 283743649, 283787570, 284710386, 285391148, 285478533, 285854898, 285873762, 286931113, 288964227, 289445441, 289689648, 291671489, 303512884, 305319975, 305610036, 305764101, 308448294, 308675890, 312085683, 312264750, 315032867, 316391000, 317331042, 317902135, 318950711, 319447220, 321499182, 322538804, 323145200, 337067316, 337826293, 339905989, 340833697, 341457068, 342310196, 345302593, 349554733, 349771471, 349786245, 350819405, 356072847, 370349192, 373962798, 375558638, 375574835, 376053993, 383276530, 383373833, 383407586, 384439906, 386079012, 404133513, 404307343, 407031852, 408072233, 409112005, 409608425, 409771500, 419040932, 437730612, 439529766, 442616365, 442813037, 443157674, 443295316, 450118444, 450482697, 456789668, 459935396, 471217869, 474073645, 476230702, 476665218, 476717289, 483014825, 485083298, 489306281, 538364390, 540675748, 543819186, 543958612, 576960820, 577242548, 610515252, 642202932, 644420819 };
 staticJArray<PRInt32,PRInt32> nsHtml5ElementName::ELEMENT_HASHES = { ELEMENT_HASHES_DATA, NS_ARRAY_LENGTH(ELEMENT_HASHES_DATA) };
 void
 nsHtml5ElementName::initializeStatics()
 {
   ELT_NULL_ELEMENT_NAME = new nsHtml5ElementName(nsnull);
   ELT_A = new nsHtml5ElementName(nsHtml5Atoms::a, nsHtml5Atoms::a, NS_HTML5TREE_BUILDER_A);
   ELT_B = new nsHtml5ElementName(nsHtml5Atoms::b, nsHtml5Atoms::b, NS_HTML5TREE_BUILDER_B_OR_BIG_OR_CODE_OR_EM_OR_I_OR_S_OR_SMALL_OR_STRIKE_OR_STRONG_OR_TT_OR_U);
   ELT_G = new nsHtml5ElementName(nsHtml5Atoms::g, nsHtml5Atoms::g, NS_HTML5TREE_BUILDER_OTHER);
@@ -830,16 +831,17 @@ nsHtml5ElementName::initializeStatics()
   ELT_GLYPHREF = new nsHtml5ElementName(nsHtml5Atoms::glyphref, nsHtml5Atoms::glyphRef, NS_HTML5TREE_BUILDER_OTHER);
   ELT_INTERVAL = new nsHtml5ElementName(nsHtml5Atoms::interval, nsHtml5Atoms::interval, NS_HTML5TREE_BUILDER_OTHER);
   ELT_INTEGERS = new nsHtml5ElementName(nsHtml5Atoms::integers, nsHtml5Atoms::integers, NS_HTML5TREE_BUILDER_OTHER);
   ELT_INFINITY = new nsHtml5ElementName(nsHtml5Atoms::infinity, nsHtml5Atoms::infinity, NS_HTML5TREE_BUILDER_OTHER);
   ELT_LISTENER = new nsHtml5ElementName(nsHtml5Atoms::listener, nsHtml5Atoms::listener, NS_HTML5TREE_BUILDER_OTHER);
   ELT_LOWLIMIT = new nsHtml5ElementName(nsHtml5Atoms::lowlimit, nsHtml5Atoms::lowlimit, NS_HTML5TREE_BUILDER_OTHER);
   ELT_METADATA = new nsHtml5ElementName(nsHtml5Atoms::metadata, nsHtml5Atoms::metadata, NS_HTML5TREE_BUILDER_OTHER);
   ELT_MENCLOSE = new nsHtml5ElementName(nsHtml5Atoms::menclose, nsHtml5Atoms::menclose, NS_HTML5TREE_BUILDER_OTHER);
+  ELT_MENUITEM = new nsHtml5ElementName(nsHtml5Atoms::menuitem, nsHtml5Atoms::menuitem, NS_HTML5TREE_BUILDER_MENUITEM | NS_HTML5ELEMENT_NAME_SPECIAL);
   ELT_MPHANTOM = new nsHtml5ElementName(nsHtml5Atoms::mphantom, nsHtml5Atoms::mphantom, NS_HTML5TREE_BUILDER_OTHER);
   ELT_NOFRAMES = new nsHtml5ElementName(nsHtml5Atoms::noframes, nsHtml5Atoms::noframes, NS_HTML5TREE_BUILDER_NOFRAMES | NS_HTML5ELEMENT_NAME_SPECIAL);
   ELT_NOSCRIPT = new nsHtml5ElementName(nsHtml5Atoms::noscript, nsHtml5Atoms::noscript, NS_HTML5TREE_BUILDER_NOSCRIPT | NS_HTML5ELEMENT_NAME_SPECIAL);
   ELT_OPTGROUP = new nsHtml5ElementName(nsHtml5Atoms::optgroup, nsHtml5Atoms::optgroup, NS_HTML5TREE_BUILDER_OPTGROUP | NS_HTML5ELEMENT_NAME_SPECIAL | NS_HTML5ELEMENT_NAME_OPTIONAL_END_TAG);
   ELT_POLYLINE = new nsHtml5ElementName(nsHtml5Atoms::polyline, nsHtml5Atoms::polyline, NS_HTML5TREE_BUILDER_OTHER);
   ELT_PREFETCH = new nsHtml5ElementName(nsHtml5Atoms::prefetch, nsHtml5Atoms::prefetch, NS_HTML5TREE_BUILDER_OTHER);
   ELT_PROGRESS = new nsHtml5ElementName(nsHtml5Atoms::progress, nsHtml5Atoms::progress, NS_HTML5TREE_BUILDER_OTHER);
   ELT_PRSUBSET = new nsHtml5ElementName(nsHtml5Atoms::prsubset, nsHtml5Atoms::prsubset, NS_HTML5TREE_BUILDER_OTHER);
@@ -917,17 +919,17 @@ nsHtml5ElementName::initializeStatics()
   ELT_CARTESIANPRODUCT = new nsHtml5ElementName(nsHtml5Atoms::cartesianproduct, nsHtml5Atoms::cartesianproduct, NS_HTML5TREE_BUILDER_OTHER);
   ELT_FONT_FACE_FORMAT = new nsHtml5ElementName(nsHtml5Atoms::font_face_format, nsHtml5Atoms::font_face_format, NS_HTML5TREE_BUILDER_OTHER);
   ELT_FECONVOLVEMATRIX = new nsHtml5ElementName(nsHtml5Atoms::feconvolvematrix, nsHtml5Atoms::feConvolveMatrix, NS_HTML5TREE_BUILDER_OTHER);
   ELT_FEDIFFUSELIGHTING = new nsHtml5ElementName(nsHtml5Atoms::fediffuselighting, nsHtml5Atoms::feDiffuseLighting, NS_HTML5TREE_BUILDER_OTHER);
   ELT_FEDISPLACEMENTMAP = new nsHtml5ElementName(nsHtml5Atoms::fedisplacementmap, nsHtml5Atoms::feDisplacementMap, NS_HTML5TREE_BUILDER_OTHER);
   ELT_FESPECULARLIGHTING = new nsHtml5ElementName(nsHtml5Atoms::fespecularlighting, nsHtml5Atoms::feSpecularLighting, NS_HTML5TREE_BUILDER_OTHER);
   ELT_DOMAINOFAPPLICATION = new nsHtml5ElementName(nsHtml5Atoms::domainofapplication, nsHtml5Atoms::domainofapplication, NS_HTML5TREE_BUILDER_OTHER);
   ELT_FECOMPONENTTRANSFER = new nsHtml5ElementName(nsHtml5Atoms::fecomponenttransfer, nsHtml5Atoms::feComponentTransfer, NS_HTML5TREE_BUILDER_OTHER);
-  ELEMENT_NAMES = new nsHtml5ElementName*[391];
+  ELEMENT_NAMES = new nsHtml5ElementName*[392];
   ELEMENT_NAMES[0] = ELT_A;
   ELEMENT_NAMES[1] = ELT_B;
   ELEMENT_NAMES[2] = ELT_G;
   ELEMENT_NAMES[3] = ELT_I;
   ELEMENT_NAMES[4] = ELT_P;
   ELEMENT_NAMES[5] = ELT_Q;
   ELEMENT_NAMES[6] = ELT_S;
   ELEMENT_NAMES[7] = ELT_U;
@@ -1222,103 +1224,104 @@ nsHtml5ElementName::initializeStatics()
   ELEMENT_NAMES[296] = ELT_GLYPHREF;
   ELEMENT_NAMES[297] = ELT_INTERVAL;
   ELEMENT_NAMES[298] = ELT_INTEGERS;
   ELEMENT_NAMES[299] = ELT_INFINITY;
   ELEMENT_NAMES[300] = ELT_LISTENER;
   ELEMENT_NAMES[301] = ELT_LOWLIMIT;
   ELEMENT_NAMES[302] = ELT_METADATA;
   ELEMENT_NAMES[303] = ELT_MENCLOSE;
-  ELEMENT_NAMES[304] = ELT_MPHANTOM;
-  ELEMENT_NAMES[305] = ELT_NOFRAMES;
-  ELEMENT_NAMES[306] = ELT_NOSCRIPT;
-  ELEMENT_NAMES[307] = ELT_OPTGROUP;
-  ELEMENT_NAMES[308] = ELT_POLYLINE;
-  ELEMENT_NAMES[309] = ELT_PREFETCH;
-  ELEMENT_NAMES[310] = ELT_PROGRESS;
-  ELEMENT_NAMES[311] = ELT_PRSUBSET;
-  ELEMENT_NAMES[312] = ELT_QUOTIENT;
-  ELEMENT_NAMES[313] = ELT_SELECTOR;
-  ELEMENT_NAMES[314] = ELT_TEXTAREA;
-  ELEMENT_NAMES[315] = ELT_TEXTPATH;
-  ELEMENT_NAMES[316] = ELT_VARIANCE;
-  ELEMENT_NAMES[317] = ELT_ANIMATION;
-  ELEMENT_NAMES[318] = ELT_CONJUGATE;
-  ELEMENT_NAMES[319] = ELT_CONDITION;
-  ELEMENT_NAMES[320] = ELT_COMPLEXES;
-  ELEMENT_NAMES[321] = ELT_FONT_FACE;
-  ELEMENT_NAMES[322] = ELT_FACTORIAL;
-  ELEMENT_NAMES[323] = ELT_INTERSECT;
-  ELEMENT_NAMES[324] = ELT_IMAGINARY;
-  ELEMENT_NAMES[325] = ELT_LAPLACIAN;
-  ELEMENT_NAMES[326] = ELT_MATRIXROW;
-  ELEMENT_NAMES[327] = ELT_NOTSUBSET;
-  ELEMENT_NAMES[328] = ELT_OTHERWISE;
-  ELEMENT_NAMES[329] = ELT_PIECEWISE;
-  ELEMENT_NAMES[330] = ELT_PLAINTEXT;
-  ELEMENT_NAMES[331] = ELT_RATIONALS;
-  ELEMENT_NAMES[332] = ELT_SEMANTICS;
-  ELEMENT_NAMES[333] = ELT_TRANSPOSE;
-  ELEMENT_NAMES[334] = ELT_ANNOTATION;
-  ELEMENT_NAMES[335] = ELT_BLOCKQUOTE;
-  ELEMENT_NAMES[336] = ELT_DIVERGENCE;
-  ELEMENT_NAMES[337] = ELT_EULERGAMMA;
-  ELEMENT_NAMES[338] = ELT_EQUIVALENT;
-  ELEMENT_NAMES[339] = ELT_FIGCAPTION;
-  ELEMENT_NAMES[340] = ELT_IMAGINARYI;
-  ELEMENT_NAMES[341] = ELT_MALIGNMARK;
-  ELEMENT_NAMES[342] = ELT_MUNDEROVER;
-  ELEMENT_NAMES[343] = ELT_MLABELEDTR;
-  ELEMENT_NAMES[344] = ELT_NOTANUMBER;
-  ELEMENT_NAMES[345] = ELT_SOLIDCOLOR;
-  ELEMENT_NAMES[346] = ELT_ALTGLYPHDEF;
-  ELEMENT_NAMES[347] = ELT_DETERMINANT;
-  ELEMENT_NAMES[348] = ELT_FEMERGENODE;
-  ELEMENT_NAMES[349] = ELT_FECOMPOSITE;
-  ELEMENT_NAMES[350] = ELT_FESPOTLIGHT;
-  ELEMENT_NAMES[351] = ELT_MALIGNGROUP;
-  ELEMENT_NAMES[352] = ELT_MPRESCRIPTS;
-  ELEMENT_NAMES[353] = ELT_MOMENTABOUT;
-  ELEMENT_NAMES[354] = ELT_NOTPRSUBSET;
-  ELEMENT_NAMES[355] = ELT_PARTIALDIFF;
-  ELEMENT_NAMES[356] = ELT_ALTGLYPHITEM;
-  ELEMENT_NAMES[357] = ELT_ANIMATECOLOR;
-  ELEMENT_NAMES[358] = ELT_DATATEMPLATE;
-  ELEMENT_NAMES[359] = ELT_EXPONENTIALE;
-  ELEMENT_NAMES[360] = ELT_FETURBULENCE;
-  ELEMENT_NAMES[361] = ELT_FEPOINTLIGHT;
-  ELEMENT_NAMES[362] = ELT_FEMORPHOLOGY;
-  ELEMENT_NAMES[363] = ELT_OUTERPRODUCT;
-  ELEMENT_NAMES[364] = ELT_ANIMATEMOTION;
-  ELEMENT_NAMES[365] = ELT_COLOR_PROFILE;
-  ELEMENT_NAMES[366] = ELT_FONT_FACE_SRC;
-  ELEMENT_NAMES[367] = ELT_FONT_FACE_URI;
-  ELEMENT_NAMES[368] = ELT_FOREIGNOBJECT;
-  ELEMENT_NAMES[369] = ELT_FECOLORMATRIX;
-  ELEMENT_NAMES[370] = ELT_MISSING_GLYPH;
-  ELEMENT_NAMES[371] = ELT_MMULTISCRIPTS;
-  ELEMENT_NAMES[372] = ELT_SCALARPRODUCT;
-  ELEMENT_NAMES[373] = ELT_VECTORPRODUCT;
-  ELEMENT_NAMES[374] = ELT_ANNOTATION_XML;
-  ELEMENT_NAMES[375] = ELT_DEFINITION_SRC;
-  ELEMENT_NAMES[376] = ELT_FONT_FACE_NAME;
-  ELEMENT_NAMES[377] = ELT_FEGAUSSIANBLUR;
-  ELEMENT_NAMES[378] = ELT_FEDISTANTLIGHT;
-  ELEMENT_NAMES[379] = ELT_LINEARGRADIENT;
-  ELEMENT_NAMES[380] = ELT_NATURALNUMBERS;
-  ELEMENT_NAMES[381] = ELT_RADIALGRADIENT;
-  ELEMENT_NAMES[382] = ELT_ANIMATETRANSFORM;
-  ELEMENT_NAMES[383] = ELT_CARTESIANPRODUCT;
-  ELEMENT_NAMES[384] = ELT_FONT_FACE_FORMAT;
-  ELEMENT_NAMES[385] = ELT_FECONVOLVEMATRIX;
-  ELEMENT_NAMES[386] = ELT_FEDIFFUSELIGHTING;
-  ELEMENT_NAMES[387] = ELT_FEDISPLACEMENTMAP;
-  ELEMENT_NAMES[388] = ELT_FESPECULARLIGHTING;
-  ELEMENT_NAMES[389] = ELT_DOMAINOFAPPLICATION;
-  ELEMENT_NAMES[390] = ELT_FECOMPONENTTRANSFER;
+  ELEMENT_NAMES[304] = ELT_MENUITEM;
+  ELEMENT_NAMES[305] = ELT_MPHANTOM;
+  ELEMENT_NAMES[306] = ELT_NOFRAMES;
+  ELEMENT_NAMES[307] = ELT_NOSCRIPT;
+  ELEMENT_NAMES[308] = ELT_OPTGROUP;
+  ELEMENT_NAMES[309] = ELT_POLYLINE;
+  ELEMENT_NAMES[310] = ELT_PREFETCH;
+  ELEMENT_NAMES[311] = ELT_PROGRESS;
+  ELEMENT_NAMES[312] = ELT_PRSUBSET;
+  ELEMENT_NAMES[313] = ELT_QUOTIENT;
+  ELEMENT_NAMES[314] = ELT_SELECTOR;
+  ELEMENT_NAMES[315] = ELT_TEXTAREA;
+  ELEMENT_NAMES[316] = ELT_TEXTPATH;
+  ELEMENT_NAMES[317] = ELT_VARIANCE;
+  ELEMENT_NAMES[318] = ELT_ANIMATION;
+  ELEMENT_NAMES[319] = ELT_CONJUGATE;
+  ELEMENT_NAMES[320] = ELT_CONDITION;
+  ELEMENT_NAMES[321] = ELT_COMPLEXES;
+  ELEMENT_NAMES[322] = ELT_FONT_FACE;
+  ELEMENT_NAMES[323] = ELT_FACTORIAL;
+  ELEMENT_NAMES[324] = ELT_INTERSECT;
+  ELEMENT_NAMES[325] = ELT_IMAGINARY;
+  ELEMENT_NAMES[326] = ELT_LAPLACIAN;
+  ELEMENT_NAMES[327] = ELT_MATRIXROW;
+  ELEMENT_NAMES[328] = ELT_NOTSUBSET;
+  ELEMENT_NAMES[329] = ELT_OTHERWISE;
+  ELEMENT_NAMES[330] = ELT_PIECEWISE;
+  ELEMENT_NAMES[331] = ELT_PLAINTEXT;
+  ELEMENT_NAMES[332] = ELT_RATIONALS;
+  ELEMENT_NAMES[333] = ELT_SEMANTICS;
+  ELEMENT_NAMES[334] = ELT_TRANSPOSE;
+  ELEMENT_NAMES[335] = ELT_ANNOTATION;
+  ELEMENT_NAMES[336] = ELT_BLOCKQUOTE;
+  ELEMENT_NAMES[337] = ELT_DIVERGENCE;
+  ELEMENT_NAMES[338] = ELT_EULERGAMMA;
+  ELEMENT_NAMES[339] = ELT_EQUIVALENT;
+  ELEMENT_NAMES[340] = ELT_FIGCAPTION;
+  ELEMENT_NAMES[341] = ELT_IMAGINARYI;
+  ELEMENT_NAMES[342] = ELT_MALIGNMARK;
+  ELEMENT_NAMES[343] = ELT_MUNDEROVER;
+  ELEMENT_NAMES[344] = ELT_MLABELEDTR;
+  ELEMENT_NAMES[345] = ELT_NOTANUMBER;
+  ELEMENT_NAMES[346] = ELT_SOLIDCOLOR;
+  ELEMENT_NAMES[347] = ELT_ALTGLYPHDEF;
+  ELEMENT_NAMES[348] = ELT_DETERMINANT;
+  ELEMENT_NAMES[349] = ELT_FEMERGENODE;
+  ELEMENT_NAMES[350] = ELT_FECOMPOSITE;
+  ELEMENT_NAMES[351] = ELT_FESPOTLIGHT;
+  ELEMENT_NAMES[352] = ELT_MALIGNGROUP;
+  ELEMENT_NAMES[353] = ELT_MPRESCRIPTS;
+  ELEMENT_NAMES[354] = ELT_MOMENTABOUT;
+  ELEMENT_NAMES[355] = ELT_NOTPRSUBSET;
+  ELEMENT_NAMES[356] = ELT_PARTIALDIFF;
+  ELEMENT_NAMES[357] = ELT_ALTGLYPHITEM;
+  ELEMENT_NAMES[358] = ELT_ANIMATECOLOR;
+  ELEMENT_NAMES[359] = ELT_DATATEMPLATE;
+  ELEMENT_NAMES[360] = ELT_EXPONENTIALE;
+  ELEMENT_NAMES[361] = ELT_FETURBULENCE;
+  ELEMENT_NAMES[362] = ELT_FEPOINTLIGHT;
+  ELEMENT_NAMES[363] = ELT_FEMORPHOLOGY;
+  ELEMENT_NAMES[364] = ELT_OUTERPRODUCT;
+  ELEMENT_NAMES[365] = ELT_ANIMATEMOTION;
+  ELEMENT_NAMES[366] = ELT_COLOR_PROFILE;
+  ELEMENT_NAMES[367] = ELT_FONT_FACE_SRC;
+  ELEMENT_NAMES[368] = ELT_FONT_FACE_URI;
+  ELEMENT_NAMES[369] = ELT_FOREIGNOBJECT;
+  ELEMENT_NAMES[370] = ELT_FECOLORMATRIX;
+  ELEMENT_NAMES[371] = ELT_MISSING_GLYPH;
+  ELEMENT_NAMES[372] = ELT_MMULTISCRIPTS;
+  ELEMENT_NAMES[373] = ELT_SCALARPRODUCT;
+  ELEMENT_NAMES[374] = ELT_VECTORPRODUCT;
+  ELEMENT_NAMES[375] = ELT_ANNOTATION_XML;
+  ELEMENT_NAMES[376] = ELT_DEFINITION_SRC;
+  ELEMENT_NAMES[377] = ELT_FONT_FACE_NAME;
+  ELEMENT_NAMES[378] = ELT_FEGAUSSIANBLUR;
+  ELEMENT_NAMES[379] = ELT_FEDISTANTLIGHT;
+  ELEMENT_NAMES[380] = ELT_LINEARGRADIENT;
+  ELEMENT_NAMES[381] = ELT_NATURALNUMBERS;
+  ELEMENT_NAMES[382] = ELT_RADIALGRADIENT;
+  ELEMENT_NAMES[383] = ELT_ANIMATETRANSFORM;
+  ELEMENT_NAMES[384] = ELT_CARTESIANPRODUCT;
+  ELEMENT_NAMES[385] = ELT_FONT_FACE_FORMAT;
+  ELEMENT_NAMES[386] = ELT_FECONVOLVEMATRIX;
+  ELEMENT_NAMES[387] = ELT_FEDIFFUSELIGHTING;
+  ELEMENT_NAMES[388] = ELT_FEDISPLACEMENTMAP;
+  ELEMENT_NAMES[389] = ELT_FESPECULARLIGHTING;
+  ELEMENT_NAMES[390] = ELT_DOMAINOFAPPLICATION;
+  ELEMENT_NAMES[391] = ELT_FECOMPONENTTRANSFER;
 }
 
 void
 nsHtml5ElementName::releaseStatics()
 {
   delete ELT_NULL_ELEMENT_NAME;
   delete ELT_A;
   delete ELT_B;
@@ -1619,16 +1622,17 @@ nsHtml5ElementName::releaseStatics()
   delete ELT_GLYPHREF;
   delete ELT_INTERVAL;
   delete ELT_INTEGERS;
   delete ELT_INFINITY;
   delete ELT_LISTENER;
   delete ELT_LOWLIMIT;
   delete ELT_METADATA;
   delete ELT_MENCLOSE;
+  delete ELT_MENUITEM;
   delete ELT_MPHANTOM;
   delete ELT_NOFRAMES;
   delete ELT_NOSCRIPT;
   delete ELT_OPTGROUP;
   delete ELT_POLYLINE;
   delete ELT_PREFETCH;
   delete ELT_PROGRESS;
   delete ELT_PRSUBSET;
--- a/parser/html/nsHtml5ElementName.h
+++ b/parser/html/nsHtml5ElementName.h
@@ -381,16 +381,17 @@ class nsHtml5ElementName
     static nsHtml5ElementName* ELT_GLYPHREF;
     static nsHtml5ElementName* ELT_INTERVAL;
     static nsHtml5ElementName* ELT_INTEGERS;
     static nsHtml5ElementName* ELT_INFINITY;
     static nsHtml5ElementName* ELT_LISTENER;
     static nsHtml5ElementName* ELT_LOWLIMIT;
     static nsHtml5ElementName* ELT_METADATA;
     static nsHtml5ElementName* ELT_MENCLOSE;
+    static nsHtml5ElementName* ELT_MENUITEM;
     static nsHtml5ElementName* ELT_MPHANTOM;
     static nsHtml5ElementName* ELT_NOFRAMES;
     static nsHtml5ElementName* ELT_NOSCRIPT;
     static nsHtml5ElementName* ELT_OPTGROUP;
     static nsHtml5ElementName* ELT_POLYLINE;
     static nsHtml5ElementName* ELT_PREFETCH;
     static nsHtml5ElementName* ELT_PROGRESS;
     static nsHtml5ElementName* ELT_PRSUBSET;
--- a/parser/html/nsHtml5TreeBuilder.cpp
+++ b/parser/html/nsHtml5TreeBuilder.cpp
@@ -1081,16 +1081,19 @@ nsHtml5TreeBuilder::startTag(nsHtml5Elem
               attributes = nsnull;
               NS_HTML5_BREAK(starttagloop);
             }
             case NS_HTML5TREE_BUILDER_BR:
             case NS_HTML5TREE_BUILDER_EMBED_OR_IMG:
             case NS_HTML5TREE_BUILDER_AREA_OR_WBR: {
               reconstructTheActiveFormattingElements();
             }
+#ifdef ENABLE_VOID_MENUITEM
+            case NS_HTML5TREE_BUILDER_MENUITEM:
+#endif
             case NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE_OR_TRACK: {
               appendVoidElementToCurrentMayFoster(elementName, attributes);
               selfClosing = PR_FALSE;
               attributes = nsnull;
               NS_HTML5_BREAK(starttagloop);
             }
             case NS_HTML5TREE_BUILDER_HR: {
               implicitlyCloseP();
@@ -2381,16 +2384,19 @@ nsHtml5TreeBuilder::endTag(nsHtml5Elemen
                 pop();
               }
             }
             reconstructTheActiveFormattingElements();
             appendVoidElementToCurrentMayFoster(elementName, nsHtml5HtmlAttributes::EMPTY_ATTRIBUTES);
             NS_HTML5_BREAK(endtagloop);
           }
           case NS_HTML5TREE_BUILDER_AREA_OR_WBR:
+#ifdef ENABLE_VOID_MENUITEM
+          case NS_HTML5TREE_BUILDER_MENUITEM:
+#endif
           case NS_HTML5TREE_BUILDER_PARAM_OR_SOURCE_OR_TRACK:
           case NS_HTML5TREE_BUILDER_EMBED_OR_IMG:
           case NS_HTML5TREE_BUILDER_IMAGE:
           case NS_HTML5TREE_BUILDER_INPUT:
           case NS_HTML5TREE_BUILDER_KEYGEN:
           case NS_HTML5TREE_BUILDER_HR:
           case NS_HTML5TREE_BUILDER_ISINDEX:
           case NS_HTML5TREE_BUILDER_IFRAME:
--- a/parser/html/nsHtml5TreeBuilder.h
+++ b/parser/html/nsHtml5TreeBuilder.h
@@ -313,16 +313,17 @@ class nsHtml5TreeBuilder : public nsAHtm
 #define NS_HTML5TREE_BUILDER_ANNOTATION_XML 58
 #define NS_HTML5TREE_BUILDER_FOREIGNOBJECT_OR_DESC 59
 #define NS_HTML5TREE_BUILDER_NOEMBED 60
 #define NS_HTML5TREE_BUILDER_FIELDSET 61
 #define NS_HTML5TREE_BUILDER_OUTPUT_OR_LABEL 62
 #define NS_HTML5TREE_BUILDER_OBJECT 63
 #define NS_HTML5TREE_BUILDER_FONT 64
 #define NS_HTML5TREE_BUILDER_KEYGEN 65
+#define NS_HTML5TREE_BUILDER_MENUITEM 66
 #define NS_HTML5TREE_BUILDER_INITIAL 0
 #define NS_HTML5TREE_BUILDER_BEFORE_HTML 1
 #define NS_HTML5TREE_BUILDER_BEFORE_HEAD 2
 #define NS_HTML5TREE_BUILDER_IN_HEAD 3
 #define NS_HTML5TREE_BUILDER_IN_HEAD_NOSCRIPT 4
 #define NS_HTML5TREE_BUILDER_AFTER_HEAD 5
 #define NS_HTML5TREE_BUILDER_IN_BODY 6
 #define NS_HTML5TREE_BUILDER_IN_TABLE 7