first-letter into inline frame lost on restyle (e.g., from :hover)

RESOLVED DUPLICATE of bug 399384

Status

()

Core
Layout
P2
normal
RESOLVED DUPLICATE of bug 399384
18 years ago
3 years ago

People

(Reporter: dbaron, Unassigned)

Tracking

(Blocks: 1 bug, {css1, testcase})

Trunk
Future
css1, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CSS1-2.4][CSS1-2.1])

Attachments

(3 attachments, 2 obsolete attachments)

(Reporter)

Description

18 years ago
DESCRIPTION:  If a :first-letter pseudo-element contains a letter that is part
of a link, hovering over that link destroys all of the styles that are
associated with the pseudo-element.

STEPS TO REPRODUCE:
 1) load attached test case
 2) hover mouse pointer over link

ACTUAL RESULTS:
 * after (1) above, the first letter of the link is red and double the font size
of the rest of the text
 * after (2) above, the first letter is no longer red and large

EXPECTED RESULTS:
 * the first letter should stay red and double the font size no matter what.

DOES NOT WORK CORRECTLY ON:
 * Linux, mozilla, 2000-01-10-08-M13

ADDITIONAL INFORMATION:
Alan Flavell pointed this bug out to me.  It also occurs on his page
http://ppewww.ph.gla.ac.uk/~flavell/www/
(Reporter)

Comment 1

18 years ago
Created attachment 4118 [details]
testcase described in bug description

Updated

18 years ago
Assignee: troy → kipp

Comment 2

18 years ago
Block/inline issue so re-assigning to Kipp's bug list

Updated

18 years ago
Target Milestone: M15

Comment 3

18 years ago
mass-moving bugs to M15
Summary: first-letter and link interact badly → {css1} first-letter and link interact badly
Keywords: css1
Migrating from {css1} to css1 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
I am *really* sorry about the spam...

Updated

18 years ago
Summary: {css1} first-letter and link interact badly → first-letter and link interact badly

Comment 5

18 years ago
mine! mine mine mine!  all mine!  whoo-hoo!
Assignee: kipp → buster

Comment 6

17 years ago
moving all buster m15 bugs to m16.
Target Milestone: M15 → M16

Comment 7

17 years ago
won't make beta1
Status: NEW → ASSIGNED
Target Milestone: M16 → M17

Updated

17 years ago
OS: Linux → All
Priority: P3 → P2
Hardware: PC → All

Comment 8

17 years ago
Marc: is this a bug you could look at?  It seems that the mouseover event is 
causing style to get re-resolved incorrectly for the first letter frame.  I'll 
attached a frame & style context dump for before and after the mouseover event.

Comment 9

17 years ago
Created attachment 9611 [details]
frame and style context dump, before and after mouseover event
Unless this is easy, it's a good candidate for FUTURE. Setting first letter 
properties on a link should be relatively uncommon. We could release note it and 
then fix it for a future version without preventing adoption of the feature by 
content developers (it would just look ugly in FCS). buster's call.

Comment 11

17 years ago
This is a nasty problem - the :first-letter is applied to the P, however the 
first letter on the line is in an A, so when we re-resolve the pseudo style for 
the :first-letter rule we don't find any matches. The key is to find out how it 
works initially, since the problem is in dealing with re-resolving the style 
after the content states have changed. Still looking...

Putting a character in front of the <A ...> make it work fine, of course.

Comment 12

17 years ago
At Frame Construction time, the block recognizes that there is a first letter 
rule on the P and calls WrapFramesInFirstLetterFrame, which in turn calls 
GetFirstLetterStyle which resolves the pseudo style and of course matches the 
rule P:first-letter. When the hover happens, however, the ContentChanged method 
only gets called with the A content, not the P, so the rule does not match and 
the first-letter frame gets removed. Fixing this probably means somehow getting 
the ContentChanged call for the A to check and see if it is providing the 
first-letter for its parent... ugh. Any other ideas?

As a note: IE does not support this at all.

Comment 13

17 years ago
In IE, it doesn't work if the <A> is a <FONT> or a <SPAN>...the type of inline 
frame is irrelevant: first-letter is ignored.  So changing summary.
I think we have to either fix this (making us more functional than IE), or 
disable first-letter in an inline.
Could just future it.
Assignee: buster → attinasi
Status: ASSIGNED → NEW
Summary: first-letter and link interact badly → first-letter style doesn't work in any inline frame

Updated

17 years ago
Status: NEW → ASSIGNED
Target Milestone: M17 → Future

Comment 14

17 years ago
This bug has been marked "future" because the original netscape engineer working 
on this is over-burdened. If you feel this is an error, that you or another 
known resource will be working on this bug, or if it blocks your work in some 
way -- please attach your concern to the bug for reconsideration.
(Reporter)

Comment 15

17 years ago
I'm changing the title again because the new one is wrong.  :first-letter *does* 
work with inline frames, but it gets messed up on *restyle* (which happens when 
moving over the link).  I think the new one is accurate...
Summary: first-letter style doesn't work in any inline frame → first-letter into inline frame lost on restyle
(Reporter)

Comment 16

17 years ago
*** Bug 49147 has been marked as a duplicate of this bug. ***
Summary: first-letter into inline frame lost on restyle → first-letter into inline frame lost on restyle [INLINE]

Updated

17 years ago
QA Contact: petersen → chrisd

Comment 17

17 years ago
changing qa contact to chrisd.
Upon managerial request, adding the "testcase" keyword to 84 open layout bugs that
do not have the "testcase" keyword and yet have an attachement with the word
"test" in the description field. Apologies for any mistakes.
Keywords: testcase
Keywords: mozilla1.0
Netscape's standard compliance QA team reorganised itself once again, so taking 
remaining non-tables style bugs. Sorry about the spam. I tried to get this done 
directly at the database level, but apparently that is "not easy because of the 
shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian

Comment 20

16 years ago
*** Bug 96043 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 21

16 years ago
*** Bug 103248 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 22

16 years ago
Bug 103248 made the interesting observation that the cause of this bug is
applying the :first-letter style of the inline rather than the :first-letter
style of the block -- perhaps we're just doing style resolution for the
pseudo-element against the wrong element?
(Reporter)

Comment 23

16 years ago
*** Bug 111794 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 24

16 years ago
*** Bug 119713 has been marked as a duplicate of this bug. ***

Comment 25

16 years ago
Related, perhaps, to this bug is the fact that if you define both :first-letter
and :first-line psuedo elements for a paragraph element with a link as the only
content, the :first-letter style goes away upon hover, but not the :first-line
style...

I'll attach a test case as well.

FYI: IE 6.0 on Windows XP Pro does not have this bug... at least not with this
userAgent string:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705) 

Comment 26

16 years ago
Created attachment 70481 [details]
testcase for :first-line addition

Hope this helps in some way...
Whiteboard: [CSS1-2.4]
Whiteboard: [CSS1-2.4] → [CSS1-2.4][CSS1-2.1]
(Reporter)

Comment 27

15 years ago
*** Bug 130179 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 28

15 years ago
*** Bug 131076 has been marked as a duplicate of this bug. ***
*** Bug 133079 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 30

15 years ago
*** Bug 138122 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 31

15 years ago
*** Bug 144806 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 32

15 years ago
*** Bug 153286 has been marked as a duplicate of this bug. ***
(Reporter)

Updated

15 years ago
Summary: first-letter into inline frame lost on restyle [INLINE] → [RR/RCF]first-letter into inline frame lost on restyle [INLINE]

Comment 33

15 years ago
I discovered this same problem with Mozilla 1.0 on Windows 2000 yesterday.  
After hovering over an anchor that begins a paragraph with the first-letter 
pseudo-element defined, the first-letter setting is forgotten.
(Reporter)

Comment 34

15 years ago
*** Bug 162625 has been marked as a duplicate of this bug. ***

Comment 35

15 years ago
*** Bug 163167 has been marked as a duplicate of this bug. ***
(Reporter)

Updated

15 years ago
Summary: [RR/RCF]first-letter into inline frame lost on restyle [INLINE] → [RR/RCF]first-letter into inline frame lost on restyle (e.g., from :hover) [INLINE]
(Reporter)

Comment 36

15 years ago
*** Bug 166488 has been marked as a duplicate of this bug. ***
(Reporter)

Updated

15 years ago
Blocks: 145419

Comment 37

15 years ago
Hmm. I just checked the testcase, and the bug as described is indeed fixed. But
now, I noticed a similar problem: the :first-letter style is still forgotten if
I *click* the link! Shall I file another bug?
(Reporter)

Comment 38

15 years ago
The testcase in attachment 4118 [details] still shows the bug for me (in a Linux build
from a few days ago).
(Reporter)

Comment 39

15 years ago
Oh, I probably see it because I have a :hover rule in my userContent.css.  Yes,
without a :hover rule you wouldn't see the bug anymore thanks to the
optimizations made for bug 5693.

This bug is still valid, it just needs a new testcase.
(Reporter)

Comment 40

15 years ago
Created attachment 99626 [details]
original testcase, modified to still show bug

This is modified so that it still shows the bug after the changes for bug 5693.
Attachment #4118 - Attachment is obsolete: true
Attachment #70481 - Attachment is obsolete: true

Comment 41

15 years ago
*** Bug 186481 has been marked as a duplicate of this bug. ***

Comment 42

14 years ago
What's up with this bug? Anyone working on this?

Comment 43

14 years ago
*** Bug 212647 has been marked as a duplicate of this bug. ***
(Reporter)

Updated

14 years ago
Blocks: 217911

Comment 44

14 years ago
This bug still exists as of Mozilla 1.6a.
(Reporter)

Comment 45

14 years ago
*** Bug 230132 has been marked as a duplicate of this bug. ***

Updated

13 years ago
Assignee: attinasi → nobody
Status: ASSIGNED → NEW
Keywords: mozilla1.0
QA Contact: ian → core.layout
Summary: [RR/RCF]first-letter into inline frame lost on restyle (e.g., from :hover) [INLINE] → first-letter into inline frame lost on restyle (e.g., from :hover)

Updated

13 years ago
QA Contact: core.layout → ian
(Reporter)

Comment 46

13 years ago
*** Bug 240467 has been marked as a duplicate of this bug. ***

Comment 47

13 years ago
*** Bug 245211 has been marked as a duplicate of this bug. ***

Comment 48

13 years ago
*** Bug 260944 has been marked as a duplicate of this bug. ***

Comment 49

12 years ago
*** Bug 300634 has been marked as a duplicate of this bug. ***

Comment 50

12 years ago
This bug still exists as of Firefox 1.5b1
Bug still present on the trunk (gecko 1.9a1).

I was about to open a new bug and therefor created some testcases.
I'll attach these because I think they show a little more of the odd behaviour.
Created attachment 227872 [details]
more testcases

Comment 53

11 years ago
*** Bug 353326 has been marked as a duplicate of this bug. ***

Comment 54

10 years ago
This bug still exists as of Firefox 2.0.0.3.

Updated

10 years ago
Duplicate of this bug: 398380
(Marking this bug as the dupe rather than the other one  'cause bug 399384 has more (and more current) debugging info posted.)
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 399384
(Fixed by checkin for bug 399384.)
Flags: in-testsuite+
(Reporter)

Updated

10 years ago
Duplicate of this bug: 413725
You need to log in before you can comment on or make changes to this bug.