Closed Bug 456009 Opened 14 years ago Closed 14 years ago

<object> in <head> should NOT be visible

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 355266

People

(Reporter: bugzilla, Unassigned)

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1
Build Identifier: 

http://www.w3.org/TR/html4/struct/objects.html#h-13.3 says:
"The OBJECT element may also appear in the content of the HEAD element. Since user agents generally do not render elements in the HEAD, authors should ensure that any OBJECT elements in the HEAD do not specify content that may be rendered."

Gecko prints known Content Types to the document. Maybe this should only happen when the Browser is in Quirksmode?

Reproducible: Always
Component: Layout → HTML: Parser
QA Contact: layout → parser
Attached file Testcase
Renders "HEAD BODY" in Firefox, Safari 3.1.2 and Opera 9.51.
Renders "BODY" in IE8 beta2 (DOM has a "HEAD" text node under HEAD).
(same results in Quirks mode for all UAs)

HTML5 currently says "HEAD BODY" is correct, fwiw.
http://www.whatwg.org/specs/web-apps/current-work/#in-head
Attachment #339442 - Attachment is patch: false
Attachment #339442 - Attachment mime type: text/plain → text/html
Keywords: testcase
Is there a CSS on the object causing it to override the head child's default display property? And looking at your testcase you have both object elements as children of the body element.
The reason for this is that we ship <object> in <head> into the body. We have existing bugs on file for that.
Whiteboard: DUPEME
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 355266
Flags: in-testsuite?
Attached patch Reftest testcaseSplinter Review
Ok, so this is the first reftest testcase I have written. I have one testcase for the Standards compliance case and one for the quirks mode. I'm not sure if layout/reftest/bugs is actually the correct location for this one (as this one here is more a parser thing)? Running the reftest suite with these changes works fine.
Comment on attachment 356433 [details] [diff] [review]
Reftest testcase

Mats: Can you review this? I'm not really familiar with who can review testcases in this area of code.
Attachment #356433 - Flags: review?(mats.palmgren)
Attachment #356433 - Flags: review?(mats.palmgren) → review-
Comment on attachment 356433 [details] [diff] [review]
Reftest testcase

Reftests doesn't seem like the right choice to test this.
It doesn't really test what the DOM is and it's a relatively
expensive test method.

Adding to parser/htmlparser/tests/mochitest/regressions.txt
seems like a better choice.
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.