Closed Bug 54646 Opened 24 years ago Closed 24 years ago

:first-letter pseudo-element and :hover seem mutually exclusive

Categories

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

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ian, Assigned: attinasi)

References

()

Details

(Keywords: css2, Whiteboard: WAITING FOR 5693 TO BE FIXED)

Attachments

(1 file)

If you hover over the top of a :first-letter pseudo-element, it loses its
:first-letter style. HOW. HOW CAN THIS BE. The mind boggles.

STEPS TO REPRODUCE:
   1. http://www.webstandards.org/css/macie/pseudosdemo.html
   2. Hover over the top part of the big O in the third block (just below the
      "In the following" part of the first paragraph of Example 2).

ACTUAL RESULTS:
   1. The O shrinks.

EXPECTED RESULTS:
   1. Nothing at all! No change! Stays the same!

It's almost as if there is a :hover rule somewhere that sets all the properties
to 'inherit'. Or maybe it's the backout of joki's changes that has caused this
problem. This is just really weird though.
Whiteboard: (py8ieh: need small test case)
This is also visible on 
   http://www.w3.org/Style/CSS/Test/current/sec20.htm
...and is probably caused by the same problem as bug 23604.
Yet another hover problem that cannot be reproduced when 
nglayout.events.showHierarchicalHover is false...

Reassigned to joki
Assignee: pierre → joki
You sure this isn't a dup of bug 23604 that was exposed by the new :hover code?
:hover is CSS2 - changing keyword
Keywords: css1css2
You're right: this is probably a dup of bug 23604. Reassigned to attinasi.
But it means that 23604 can't be left future'd.
Assignee: joki → attinasi
Severity: normal → critical
Raising severity because it makes :first-letter unusable.
First, I believe that bug 23604 and this are somewhat different. I investigated
23604 earlier and detailed why the bug is occurring as specific to how
WrapFramesInFirstLetterFrame is implemented vs. how normal style resolution
happens. Also, bug 23604 happens with hierarchicalHover on or off, and this one
only happens with it on.

Since this only happens with nglayout.events.showHierarchicalHover on, and it is
currently off, why is this critical?
Status: NEW → ASSIGNED
no no, this happens when the pref is _off_. I have not tested it with the pref 
turned back on.
Taking QA per managerial policy.
QA Contact: chrisd → py8ieh=bugzilla
*** Bug 54927 has been marked as a duplicate of this bug. ***
Ian, you are, of course, correct. The URL is a bit, er, tempermental in regards
to the bug. To that end I have created a simpler testcase with just a single
paragraph and a pair of rules:

  p:first-letter { color: red; }
  p:hover { color: blue; }

With these rules and a simple paragraph there is no problem, however if I put
the universal selector ('*') in front of the :hover, or just use :hover, then I
see the :first-letter getting obliterated when I hover over the text.

Attaching the testcase. I've got to keep investigating this.
After talking with Chris D. and looking at the bug she dup'd (bug 54927) we
discovered that this problem occurs more voraciously in Quirks mode. With a
transitional DTD, you do not even need a :hover rule to make the :first-letter
go away, whereas with a strict DTD a universal :hover is needed.

The testcase in bug 54927 is not a problem with a strict DTD, and the one I
attached to this bug IS a problem with a transitional DTD. The content model
looks the same either way, so it is likey some quirk-mode-only C++ code in
eihter the event state manager or the style system that has blown it.
Raising Priority: this is pretty bad, since :first-letter is quite useful and
quite standard, and it won't work in many situations until this is fixed.

Ian, I think the attached testcase is pretty small, aso I removed your 'need
small testcase' note.
Priority: P3 → P2
Whiteboard: (py8ieh: need small test case)
I just noticed that this looks very much like bug 23604, but that was futured...
*** Bug 55319 has been marked as a duplicate of this bug. ***
This bug can't be reproduced in today's build (mozilla-mac-MN6 #2000-10-10-08). 
This is a Mozilla build, I haven't tried the Netscape build from ftp://sweetlou.
I guess showHierarchicalHover doesn't trigger bug 23604 anymore and we can close 
this bug after a last check with a Netscape build.

FYI, the testcase from bug 55319 pointed to the W3C CSS1 test suite:
http://www.w3.org/Style/CSS/Test/current/sec26.htm
Works in Commercial build 2000101108 and this mornings trunk build - marking
WORKSFORME.

Any idea what fixed this?
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
I betcha that hyatt fixed this while breaking everything else with his 5693
checkin. Since he is backing out (right?) this will probably regress...
I'm not so sure... Hyatt's checkin to nsEventStateManger that broke :hover was
made on Oct 10 13:48 (according to CVS log), but Pierre reported this fixed on
the 10-10 build, which presumably came before his change. Definitely worth
keeping an eye on when he does back it out though.
Please wait until bug 5693 is resolved before verifying this bug.
Removing qawanted to get this off my radar.
Depends on: 5693
Keywords: qawanted
Whiteboard: WAITING FOR 5693 TO BE FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: