Closed Bug 231166 Opened 21 years ago Closed 20 years ago

[FIXr]Can't click on a element with an :after content, but with a child with dispay none

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla1.7final

People

(Reporter: xanthor+bz, Assigned: bzbarsky)

Details

(Keywords: fixed1.7)

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031008
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031008

Suppose we write a "a" element, with another inline element in it (like "span").
If we create with CSS a text after this a element (with a:after {content :
'...'}), the text is part of the a element, so we can click on it to access to
the link.
If we put, by CSS, the display to the subelement of "a" (in our exemple : the
span element), we'll see only the text added with :after. It still appears we
can click on it (for example, the URL is shown in the status bar), and we can
open it with right click and "open in a new tab" for example.
but if we directly click on it, (or ctrl+click), nothing occures.


Well, maybe it isn't very clear, but look at the demo URL...

Reproducible: Always

Steps to Reproduce:
1. Create a a element with a sub element
2. Set the dispay to this sub element to none
3. Add text (or whatever) after the a element with :after
4. Try to click to access to the link
Actual Results:  
Nothing occures if we click directly

Expected Results:  
Mozilla should have open the link

It was verified in differents build of Mozilla or Firebird, on linux and windows...

*** This bug has been marked as a duplicate of 46891 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Summary: Can't click on a element with an :after content, but with a child with dispay none → Can't click on a element with an :after content, but with a child with dispay none
Actually...
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Well yes, this bug is linked with
http://bugzilla.mozilla.org/show_bug.cgi?id=46891 but the testcase of that bug
(http://bugzilla.mozilla.org/attachment.cgi?id=12097&action=view) and the other
URL work for me. (And I've already test it before submiting)
Maybe it is not exaclty the same bug ?
I know.  That's why I reopened it.
I see this also on LInux 2004012608
If there's still a problem, could you attach the testcase to the bug, and if
not, mark as worksforme?
Attached file Testcase
This bug is still a problème :¬/
Attached file Minimal testcase, HTML
Note that this is a problem with :before too.
Attached patch Fix (obsolete) — Splinter Review
Assignee: dbaron → bzbarsky
Status: UNCONFIRMED → ASSIGNED
Comment on attachment 145899 [details] [diff] [review]
Fix

David, would you review?  The issue is that the code later on looks at
pseudotag to avoid looking for before/after content on the before/after
pseudoelements.  But this code clobbered the pseudo (with the one for the
undisplayed map entry), so we ended up reframing (because we thought we didn't
already have a before/after and needed one), at which point the event system
got all confused (because the new frames were size 0x0, so GetFrameForPoint
failed to deal).

This fixes the unnecessary reframing, but the event issue really needs
addressing...
Attachment #145899 - Flags: superreview?(dbaron)
Attachment #145899 - Flags: review?(dbaron)
Priority: -- → P2
Summary: Can't click on a element with an :after content, but with a child with dispay none → [FIX]Can't click on a element with an :after content, but with a child with dispay none
Target Milestone: --- → mozilla1.7final
Comment on attachment 145899 [details] [diff] [review]
Fix

r+sr=dbaron, but maybe you want to declare all three pseudo-tag variables as
|nsIAtom *const|?
Attachment #145899 - Flags: superreview?(dbaron)
Attachment #145899 - Flags: superreview+
Attachment #145899 - Flags: review?(dbaron)
Attachment #145899 - Flags: review+
Attached patch Make those constSplinter Review
Good idea.
Attachment #145899 - Attachment is obsolete: true
Comment on attachment 145947 [details] [diff] [review]
Make those const

Could this please be approved for 1.7?	This is a very safe fix; just renaming
variables so a value we need later on doesn't get clobbered.
Attachment #145947 - Flags: approval1.7?
Summary: [FIX]Can't click on a element with an :after content, but with a child with dispay none → [FIXr]Can't click on a element with an :after content, but with a child with dispay none
Summary: [FIXr]Can't click on a element with an :after content, but with a child with dispay none → [FIXr]Can't click on a element with an :after content, but with a child with display none
Comment on attachment 145947 [details] [diff] [review]
Make those const

a=asa (on behalf of drivers) for checkin to 1.7
Attachment #145947 - Flags: approval1.7? → approval1.7+
Checked in for 1.8a.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago20 years ago
Resolution: --- → FIXED
Summary: [FIXr]Can't click on a element with an :after content, but with a child with display none → [FIXr]Can't click on a element with an :after content, but with a child with dispay none
Actually, reopening pending 1.7 checkin.
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Status: UNCONFIRMED → NEW
Ever confirmed: true
Checked in to 1.7 branch.
Status: NEW → RESOLVED
Closed: 20 years ago20 years ago
Keywords: fixed1.7
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: