Closed Bug 9046 Opened 26 years ago Closed 26 years ago

empty STYLE element causes preceding elements to be duplicated in page display

Categories

(Core :: Layout, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED DUPLICATE of bug 6899

People

(Reporter: ekrock, Assigned: troy)

References

()

Details

(Whiteboard: [TESTCASE])

Attachments

(2 files)

SeaMonkey M7 milestone build 1999062113 on WinNT 4.0. Look at file H_backg7.htm (attached). The H1 and P appear only once in the markup, but they are displayed twice on the page. Removing the empty <STYLE TYPE="text/css"></STYLE> which follows the P eliminates the problem. See H_backg8.htm (attached). Thus the empty <STYLE TYPE="text/css"></STYLE> is somehow causing the preceding elements to be displayed twice.
Whiteboard: [TESTCASE]
Assignee: rickg → troy
Component: Parser → Layout
This is not a parser bug-- the content model is formed correctly. I suspect a frame construction bug. Troy -- can you take a quick look?
This is not a parser bug-- the content model is formed correctly. I suspect a frame construction bug. Troy -- can you take a quick look?
It's very doubtful it's a frame construction bug. More likely it's a content sink problem. The frame construction code just responds to the content model change notifications
It's not that the STYLE is empty; it's that STYLE is in the BODY (where strictly speaking, it's verboten). See the comments on bug #6899 and bug #2701 (both with peterl) -- which are really duplicates of each other and of this one.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Thanks for the clarification. I think you're right that this is a DUP of bug 6899, and so I'm marking it as such *** This bug has been marked as a duplicate of 6899 ***
One FYI: it's true that in HTML 4.0 STYLE elements are now prohibited in the BODY. However, for backward compatibility, we need to be aware that in Nav4 this was explicitly permitted and supported, so there will be many pages out there with STYLE elements in the BODY and we'll have to decide how we're going to handle them. In fact, in Nav4 it was sometimes necessary to insert a blank STYLE element into the BODY as a workaround for a known bug with STYLE attribute handling in Nav4: since Nav4 supported both the use of JavaScript Style Sheet statements and CSS markup in STYLE attribute values, it had to guess which syntax you were using when it encountered a STYLE attribute, and the heuristic it used was "we'll assume you're using the same syntax (JSSS or CSS) as in the most-recently-processed STYLE element. (STYLE elements, unlike STYLE attributes, had an explicit indicator of which syntax they were using: the "TYPE=text/css" or TYPE="text/javascript". So, if you were mixing JSSS and CSS usage in a single document within STYLE attribute values, and a STYLE element of one syntax was followed by a STYLE attribute value of the other syntax, the STYLE attribute value would be misparsed and ignored; the workaround was to place a blank STYLE element in between which specified the appropriate syntax. FYI for [4.xP] thinking.
Status: RESOLVED → VERIFIED
Verified dup.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: