Last Comment Bug 23604 - first-letter into inline frame lost on restyle (e.g., from :hover)
: first-letter into inline frame lost on restyle (e.g., from :hover)
Status: RESOLVED DUPLICATE of bug 399384
[CSS1-2.4][CSS1-2.1]
: css1, testcase
Product: Core
Classification: Components
Component: Layout (show other bugs)
: Trunk
: All All
: P2 normal with 9 votes (vote)
: Future
Assigned To: Nobody; OK to take it and work on it
: Hixie (not reading bugmail)
Mentors:
: 49147 96043 103248 111794 119713 130179 131076 133079 138122 144806 153286 162625 163167 166488 186481 212647 230132 240467 245211 260944 300634 353326 413725 (view as bug list)
Depends on:
Blocks: 145419 217911
  Show dependency treegraph
 
Reported: 2000-01-10 19:28 PST by David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch)
Modified: 2014-04-29 17:11 PDT (History)
39 users (show)
dholbert: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase described in bug description (348 bytes, text/html)
2000-01-10 19:29 PST, David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch)
no flags Details
frame and style context dump, before and after mouseover event (32.18 KB, text/plain)
2000-06-04 21:13 PDT, buster
no flags Details
testcase for :first-line addition (541 bytes, text/html)
2002-02-20 00:11 PST, Mike McCaughan
no flags Details
original testcase, modified to still show bug (418 bytes, text/html)
2002-09-17 20:55 PDT, David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch)
no flags Details
more testcases (1.18 KB, text/html)
2006-07-02 01:14 PDT, Dão Gottwald [:dao]
no flags Details

Description David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2000-01-10 19:28:57 PST
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/
Comment 1 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2000-01-10 19:29:59 PST
Created attachment 4118 [details]
testcase described in bug description
Comment 2 troy 2000-01-10 19:45:59 PST
Block/inline issue so re-assigning to Kipp's bug list
Comment 3 buster 2000-01-11 13:27:59 PST
mass-moving bugs to M15
Comment 4 Hixie (not reading bugmail) 2000-01-13 15:57:59 PST
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...
Comment 5 buster 2000-03-03 16:05:11 PST
mine! mine mine mine!  all mine!  whoo-hoo!
Comment 6 rickg 2000-04-07 16:39:00 PDT
moving all buster m15 bugs to m16.
Comment 7 buster 2000-04-17 13:50:02 PDT
won't make beta1
Comment 8 buster 2000-06-04 21:13:21 PDT
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 buster 2000-06-04 21:13:59 PDT
Created attachment 9611 [details]
frame and style context dump, before and after mouseover event
Comment 10 ekrock's old account (dead) 2000-06-06 17:00:07 PDT
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 Marc Attinasi 2000-06-12 10:54:22 PDT
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 Marc Attinasi 2000-06-12 14:01:01 PDT
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 buster 2000-06-12 14:23:13 PDT
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.
Comment 14 Marc Attinasi 2000-06-12 14:53:00 PDT
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.
Comment 15 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2000-06-12 15:58:59 PDT
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...
Comment 16 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2000-08-17 11:57:57 PDT
*** Bug 49147 has been marked as a duplicate of this bug. ***
Comment 17 Christine Hoffman 2000-10-02 15:01:36 PDT
changing qa contact to chrisd.
Comment 18 Hixie (not reading bugmail) 2000-12-11 16:14:22 PST
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.
Comment 19 Hixie (not reading bugmail) 2001-02-12 16:24:25 PST
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...
Comment 20 gavin long 2001-08-20 14:30:01 PDT
*** Bug 96043 has been marked as a duplicate of this bug. ***
Comment 21 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2001-10-04 23:27:11 PDT
*** Bug 103248 has been marked as a duplicate of this bug. ***
Comment 22 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2001-10-04 23:28:39 PDT
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?
Comment 23 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2001-11-24 21:09:36 PST
*** Bug 111794 has been marked as a duplicate of this bug. ***
Comment 24 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-01-12 17:28:17 PST
*** Bug 119713 has been marked as a duplicate of this bug. ***
Comment 25 Mike McCaughan 2002-02-20 00:03:56 PST
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 Mike McCaughan 2002-02-20 00:11:49 PST
Created attachment 70481 [details]
testcase for :first-line addition

Hope this helps in some way...
Comment 27 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-03-11 20:30:37 PST
*** Bug 130179 has been marked as a duplicate of this bug. ***
Comment 28 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-03-14 20:34:02 PST
*** Bug 131076 has been marked as a duplicate of this bug. ***
Comment 29 Christopher Aillon (sabbatical, not receiving bugmail) 2002-03-23 23:22:10 PST
*** Bug 133079 has been marked as a duplicate of this bug. ***
Comment 30 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-04-18 06:34:49 PDT
*** Bug 138122 has been marked as a duplicate of this bug. ***
Comment 31 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-05-15 11:13:25 PDT
*** Bug 144806 has been marked as a duplicate of this bug. ***
Comment 32 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-06-20 22:28:35 PDT
*** Bug 153286 has been marked as a duplicate of this bug. ***
Comment 33 Steve Magruder 2002-08-12 07:12:24 PDT
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.
Comment 34 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-08-14 05:29:39 PDT
*** Bug 162625 has been marked as a duplicate of this bug. ***
Comment 35 Jonas Jørgensen 2002-08-16 18:12:20 PDT
*** Bug 163167 has been marked as a duplicate of this bug. ***
Comment 36 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-09-04 04:34:36 PDT
*** Bug 166488 has been marked as a duplicate of this bug. ***
Comment 37 Daniel Dawson 2002-09-17 20:14:45 PDT
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?
Comment 38 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-09-17 20:49:37 PDT
The testcase in attachment 4118 [details] still shows the bug for me (in a Linux build
from a few days ago).
Comment 39 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-09-17 20:51:09 PDT
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.
Comment 40 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2002-09-17 20:55:12 PDT
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.
Comment 41 Sébastien Delahaye 2002-12-22 12:15:10 PST
*** Bug 186481 has been marked as a duplicate of this bug. ***
Comment 42 Bernd Wurst 2003-04-03 03:03:55 PST
What's up with this bug? Anyone working on this?
Comment 43 Bill Mason 2003-07-14 09:26:29 PDT
*** Bug 212647 has been marked as a duplicate of this bug. ***
Comment 44 Steve Magruder 2003-12-10 15:32:47 PST
This bug still exists as of Mozilla 1.6a.
Comment 45 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2004-01-05 13:20:30 PST
*** Bug 230132 has been marked as a duplicate of this bug. ***
Comment 46 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2004-04-14 10:11:58 PDT
*** Bug 240467 has been marked as a duplicate of this bug. ***
Comment 47 Bill Mason 2004-06-01 00:47:57 PDT
*** Bug 245211 has been marked as a duplicate of this bug. ***
Comment 48 Bill Mason 2004-09-22 09:10:22 PDT
*** Bug 260944 has been marked as a duplicate of this bug. ***
Comment 49 Elmar Ludwig 2005-07-14 04:00:33 PDT
*** Bug 300634 has been marked as a duplicate of this bug. ***
Comment 50 Thomas Forster 2005-09-10 20:31:52 PDT
This bug still exists as of Firefox 1.5b1
Comment 51 Dão Gottwald [:dao] 2006-07-02 01:12:43 PDT
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.
Comment 52 Dão Gottwald [:dao] 2006-07-02 01:14:10 PDT
Created attachment 227872 [details]
more testcases
Comment 53 Niro 2006-09-19 14:47:01 PDT
*** Bug 353326 has been marked as a duplicate of this bug. ***
Comment 54 Steve Magruder 2007-03-24 11:59:30 PDT
This bug still exists as of Firefox 2.0.0.3.
Comment 55 Jo Hermans 2007-10-03 04:33:34 PDT
*** Bug 398380 has been marked as a duplicate of this bug. ***
Comment 56 Daniel Holbert [:dholbert] 2007-10-11 19:18:43 PDT
(Marking this bug as the dupe rather than the other one  'cause bug 399384 has more (and more current) debugging info posted.)

*** This bug has been marked as a duplicate of bug 399384 ***
Comment 57 Daniel Holbert [:dholbert] 2007-10-19 11:06:13 PDT
(Fixed by checkin for bug 399384.)
Comment 58 David Baron :dbaron: ⌚️UTC+2 (review requests must explain patch) 2008-01-23 15:29:28 PST
*** Bug 413725 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.