:before/:after content doubled on some elements

VERIFIED FIXED in mozilla1.1alpha

Status

()

Core
CSS Parsing and Computation
P1
normal
VERIFIED FIXED
15 years ago
15 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

({testcase})

Trunk
mozilla1.1alpha
testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

15 years ago
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.
(Assignee)

Comment 1

15 years ago
Created attachment 81730 [details]
testcase
(Assignee)

Updated

15 years ago
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.1alpha
(Assignee)

Comment 2

15 years ago
Created attachment 81733 [details] [diff] [review]
patch

Comment 3

15 years ago
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.)
(Assignee)

Comment 4

15 years ago
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 6

15 years ago
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 7

15 years ago
Comment on attachment 81733 [details] [diff] [review]
patch

sr=waterson
Attachment #81733 - Flags: superreview+
(Assignee)

Comment 8

15 years ago
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
Last Resolved: 15 years ago
Resolution: --- → FIXED
(Assignee)

Comment 10

15 years ago
Reopening since I might want this on 1.0...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Updated

15 years ago
Status: REOPENED → ASSIGNED

Comment 11

15 years ago
cc'ing myself
(Assignee)

Comment 12

15 years ago
Ok, never mind about the branch, unless we want it in order to land the fix for
bug 141054.
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago15 years ago
Resolution: --- → FIXED
VERIFIED FIXED using attachment.cgi 81730
Status: RESOLVED → VERIFIED
(Assignee)

Comment 14

15 years ago
*** 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.