Closed Bug 334227 Opened 19 years ago Closed 18 years ago

<embed> shouldn't close <p>

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: zcorpan, Assigned: martijn.martijn)

Details

(Keywords: testcase)

Attachments

(4 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060411 Firefox/3.0a1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060411 Firefox/3.0a1 When the parser hits an <embed> tag in a P it closes the P. According to the HTML5 Parsing draft (http://whatwg.org/specs/web-apps/current-work/#parsing) it shouldn't. IE, Safari and Opera don't close the P. Reproducible: Always Steps to Reproduce: 1. Open data:text/html,<!doctype html><style>embed { border:1em solid red; } p embed { border-color:lime; }</style><p>There should be no red: <embed> 2. 3. Actual Results: The EMBED is a sibling to the P Expected Results: The EMBED should be a child of the P
Attached file Test case (deleted) —
Summary: <embed> shouldn't close P → <embed> shouldn't close <p>
Attached file testcase2 (deleted) —
Various tags wrapped around the <embed> tag.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Attached patch patch (deleted) — Splinter Review
Oops, the testcase is missing the <p> case, but it's fixing that one too. The things that are changing with the patch are: abbr, acronym, address, cite, code, dfn, kbd, label, legend, var, unknown and p. With the patch, the parser allows the embed inside those tags. That is also what IE7 is allowing, except for the unknown tag.
Attachment #254927 - Flags: review?(mrbkap)
Comment on attachment 254927 [details] [diff] [review] patch Yeah, it makes sense for embed to match object.
Attachment #254927 - Flags: review?(mrbkap) → review+
Attachment #254927 - Flags: superreview?(jst)
Attachment #254927 - Flags: superreview?(jst) → superreview+
Assignee: mrbkap → martijn.martijn
Checking in nsElementTable.cpp; /cvsroot/mozilla/parser/htmlparser/src/nsElementTable.cpp,v <-- nsElementTable .cpp new revision: 3.197; previous revision: 3.196 done Checked into trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
Attached file Mochitest (deleted) —
(I used Ted Mielczarek's MochiTest Maker to create this so I can't provide it in patch format.) The test currently has three failures because SELECT makes EMBED elements just disappear completely. Weird, but IE7 and Opera do exactly the same. I'll adjust the testcase if anyone can confirm that this is intentional. Other than that I assumed that the behaviour of Firefox 3 beta 5 is correct.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: