Closed Bug 141289 Opened 22 years ago Closed 22 years ago

:before/:after content doubled on some elements

Categories

(Core :: CSS Parsing and Computation, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.1alpha

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

(Keywords: testcase)

Attachments

(2 files)

We doubly-create :before/:after content for some elements.  In particular, CSS
describes :before/:after content as being created as the first-child or
last-child of the content to which the selectors match, not the previous sibling
or next sibling.  However, it gives *examples* with img:before that contradict
this, so we put a hack in ConstructHTMLFrame to support :before/:after on leaf
frames.  This hack causes a bunch of serious problems (bugs related to HR and
RemoveGeneratedContentFrameSiblings).  However, since we don't check
|processChildren| in ConstructHTMLFrame, we create the content the correct way
too in the case where the element isn't a leaf.

Testcase and patch to be attached.
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.1alpha
This fix makes no sense to me, but it works. Hold my hand and explain why? (It
would seem to me like it would preclude creating of the :before and :after
content on the <legend> element itself, for example.)
If |ProcessChildren| is true, then we call ProcessChildren, which creates the
generated content in the correct place, in the child list.
Adding bugs with doubled GC so they get tested when this is fixed.
Blocks: 90649, 92426, 137430
Keywords: patch, testcase
Comment on attachment 81733 [details] [diff] [review]
patch

r=attinasi - thanks for the explanation David. Could you include a comment
saying why !processChildren is used? The comment you have is interesting, but
does not explain how ProcessChildren creates the generated content...
Attachment #81733 - Flags: review+
Comment on attachment 81733 [details] [diff] [review]
patch

sr=waterson
Attachment #81733 - Flags: superreview+
Fix checked in to trunk 2002-04-30 17:51 PDT.
No longer blocks: 137430
Fixed in new Linux CVS trunk build.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Reopening since I might want this on 1.0...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
cc'ing myself
Ok, never mind about the branch, unless we want it in order to land the fix for
bug 141054.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
VERIFIED FIXED using attachment.cgi 81730
Status: RESOLVED → VERIFIED
*** Bug 168740 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: