Bug 457806 - "<source> child of <audio> causes HTML parser to enter infinite loop" [r+sr=mrbkap]

This commit is contained in:
Matthew Gregan 2008-09-30 23:58:02 -05:00
parent f45aa51289
commit b94c620992
2 changed files with 11 additions and 2 deletions

View File

@ -11,7 +11,7 @@
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<video><source></video><audio></audio>
<video><source></video><audio><source></audio>
<pre id="test">
<script class="testbody" type="text/javascript">
is(HTMLElement.EMPTY, undefined);
@ -95,6 +95,15 @@ is(document.getElementsByTagName("source")[0].DATA_UNAVAILABLE, undefined);
is(document.getElementsByTagName("source")[0].CAN_SHOW_CURRENT_FRAME, undefined);
is(document.getElementsByTagName("source")[0].CAN_PLAY, undefined);
is(document.getElementsByTagName("source")[0].CAN_PLAY_THROUGH, undefined);
is(document.getElementsByTagName("source")[1].EMPTY, undefined);
is(document.getElementsByTagName("source")[1].LOADING, undefined);
is(document.getElementsByTagName("source")[1].LOADED_METADATA, undefined);
is(document.getElementsByTagName("source")[1].LOADED_FIRST_FRAME, undefined);
is(document.getElementsByTagName("source")[1].LOADED, undefined);
is(document.getElementsByTagName("source")[1].DATA_UNAVAILABLE, undefined);
is(document.getElementsByTagName("source")[1].CAN_SHOW_CURRENT_FRAME, undefined);
is(document.getElementsByTagName("source")[1].CAN_PLAY, undefined);
is(document.getElementsByTagName("source")[1].CAN_PLAY_THROUGH, undefined);
is(HTMLElement.prototype.EMPTY, undefined);
is(HTMLElement.prototype.LOADING, undefined);
is(HTMLElement.prototype.LOADED_METADATA, undefined);

View File

@ -1055,7 +1055,7 @@ const nsHTMLElement gHTMLElements[] = {
#if defined(MOZ_MEDIA)
{
/*tag*/ eHTMLTag_source,
/*req-parent excl-parent*/ eHTMLTag_video,eHTMLTag_unknown,
/*req-parent excl-parent*/ eHTMLTag_unknown,eHTMLTag_unknown,
/*rootnodes,endrootnodes*/ &gSourceParents,&gSourceParents,
/*autoclose starttags and endtags*/ &gPAutoClose, 0, 0,0,
/*parent,incl,exclgroups*/ kNone, kNone, kNone,