Closed Bug 457806 Opened 14 years ago Closed 14 years ago

<source> child of <audio> causes HTML parser to enter infinite loop

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b1

People

(Reporter: kinetik, Assigned: kinetik)

References

Details

Attachments

(1 file)

Attached patch trivial patchSplinter Review
An audio element with a child source element causes the parser to enter an infinite loop.  Looking at the nsHTMLElement definition for source in nsElementTable.cpp, it has a req-parent of eHTMLTag_video:

    /*req-parent excl-parent*/          eHTMLTag_video,eHTMLTag_unknown,

I'm not familiar with the parser, so this is somewhat of a blind fix, but changing this to eHTMLTag_unknown fixes the infinite loop, allows a child source element of an audio element, and does not seem to allow a source element elsewhere in the document (e.g. a source element outside of audio or video does not show up via document.getElementsByTagName--presumably the special parent handling deals with this anyway).
Attachment #341051 - Flags: superreview?(jst)
Attachment #341051 - Flags: review?(jst)
Forgot to mention: included in the patch, I updated one of the existing mochitests in content/media/video to test for this bug.
Comment on attachment 341051 [details] [diff] [review]
trivial patch

Blake should review this.
Attachment #341051 - Flags: superreview?(mrbkap)
Attachment #341051 - Flags: superreview?(jst)
Attachment #341051 - Flags: review?(mrbkap)
Attachment #341051 - Flags: review?(jst)
Duplicate of this bug: 457958
Attachment #341051 - Flags: superreview?(mrbkap)
Attachment #341051 - Flags: superreview+
Attachment #341051 - Flags: review?(mrbkap)
Attachment #341051 - Flags: review+
Keywords: checkin-needed
Assignee: nobody → kinetik
http://hg.mozilla.org/mozilla-central/rev/96bf4c4184ed
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1b1
You need to log in before you can comment on or make changes to this bug.