Closed Bug 90649 Opened 23 years ago Closed 20 years ago

content generated twice by :after/:before for OBJECT

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: glazou, Assigned: dbaron)

References

(Blocks 1 open bug)

Details

(Keywords: css2, testcase, Whiteboard: [HTML4-13.3])

Attachments

(1 file)

Any textual content generated by html elements FORM, BUTTON, LABEL, LEGEND and
OBJECT using pseudo-elements :before and :after is generated twice. Of course, it
should be generated only once...

See test case attached.
This bug blocks revamping of AllTags mode in Composer (bug 88036).
See bug 69398.  (I think the root cause is that we implemented :before and
:after for replaced content as outside-the-box, even though they're supposed to
always mean inside-the-box and should not work for replaced content despite what
the spec says.)
not a table specific bug, reassigning to core owner.
Assignee: karnaze → attinasi
Reassigning to John
Assignee: attinasi → jkeiser
Target Milestone: --- → mozilla1.1
David: which part of the CSS2 spec covers what you said in comment 2 ?
Depends on: 141289
The patch on bug 141289 fixes everything except OBJECT.
To fix object we probably need to have
nsCSSFrameConstructor::CantRenderReplacedElement pass an additional parameter
(or something in the state object?) to
nsCSSFrameConstructor::ConstructFrameByDisplayType so that it can pass PR_FALSE
to nsCSSFrameConstructor::ProcessChildren for the boolean parameter about
whether to construct generated content.
How odd. The testcase now WFM for all cases, including OBJECT. Did this get
fixed in another bug?
Keywords: css2, testcase
Summary: content generated twice by :after/:before for FORM, BUTTON, LABEL, LEGEND and OBJECT → content generated twice by :after/:before for OBJECT
Oh, *including*.  Perhaps it was fixed by bug 141054.
In the following testcase, 'X' and 'Y' are displayed twice
with 2002073008-trunk/Linux.
http://bugzilla.mozilla.gr.jp/showattachment.cgi?attach_id=983

But I can't reproduce the bug with attachment 42175 [details].
The current testcase is now broken again in Mozilla 1.1, for <object> only.
Keywords: html4
Whiteboard: [HTML4-13.3]
Hmm... I bet this happens because we give the child frame the same style context
as the object frame itself has....
-> style or frame construction
Assignee: john → dbaron
Component: Layout → Style System
QA Contact: petersen → ian
retargeting
Target Milestone: mozilla1.1alpha → Future
This is a WFM now, although I think Mozilla should disable generated content on
replaced elements, since it is wrong (20040227, WinXP).
Keywords: html4
> although I think Mozilla should disable generated content on replaced elements

We have, actually, more or less.  See bug 169334
Replaced-element cannot have :before/:after contents.
WFM?(or FIXED?)
(In reply to comment #18)
> Replaced-element cannot have :before/:after contents.
> WFM?(or FIXED?)

Therefore, it is still a bug, haven't you checked the test cases?
?
This bug description is "content generated twice by :after/:before for OBJECT".
The problem in the description cannot be reproduced on my environment.
So the one possible issue I see with the testcase is that <button> has generated
content.  The other things are all correct, no?
I see the problem of button element.
However, I think that the problem should be separated another bug or
this description should be changed.
I see it on both the BUTTON and the OBJECT element. (WinXP)
Summary: content generated twice by :after/:before for OBJECT → remove support generated content on replaced elements
Attachment #42175 - Attachment description: test case showing content generated twice instead of once → test case
Anne, the button issue should go into a separate bug, as Masayuki Nakano says
(it's not clear the <button> is a replaced element....).  For the <object>, are
you seeing the before/after when the plugin runs?  Or only when the alternate
content is shown?  I only see it when the alternate content is shown, which is
correct.
Undoing bogus summary change.  Don't morph bugs, mmmkay?
Summary: remove support generated content on replaced elements → content generated twice by :after/:before for OBJECT
Per comment 24:

-> WORKSFORME
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
The plugin runs in my environment.
As reporter of the bug, I confirm the WFM with my 20040415 WinXP build
and agree with bz that the summary of this bug should not change, representing
precisely the original problem, complete blocker for some changes in AllTags mode 
of Composer.

Detail unrelated to this bug but of interest for many people observing it:
BUTTON creates generated content that way:

      [<button>this is a button</button>]

where the square brackets materialize the button's border. That's absolutely
normal. But I need

      <button>[this is a button]</button>

So I hardly wait for CSS3 generated content's implementation. ;-)
You need to log in before you can comment on or make changes to this bug.