Closed Bug 152799 Opened 23 years ago Closed 21 years ago

Mixing :hover, display: none, and :first-letter yields jumping characters

Categories

(Core :: CSS Parsing and Computation, defect)

x86
All
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: timwatt, Assigned: dbaron)

References

Details

(Keywords: css2, testcase)

Attachments

(1 file)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020617 BuildID: 2002061708 If you have a P containing some text followed by two+ inline text elements (I only tested with SPAN), add style such that those inline elts get display: none on :hover, and mention P:first-letter (even if devoid of rules), rapidly triggering the SPANs' :hover causes one or both to jump before the P's first letter. Reproducible: Always Steps to Reproduce: 1. Load the test case I'm about to attach 2. Switch to the Problematic style (view, use style) 3. Rapidly move the mouse around the purple letters ('AB') Actual Results: One or both of the letters eventually appear(s) in front of the first letter of that P (before 'This'). Expected Results: The letters reappear in the region from which they disappeared (after 'test.'). The test case includes a working version of Problematic that behaves as expected (the sole difference is the lack of reference to P:first-letter). Also included is a version mentioning P:first-letter, but using visibility: none instead of display: none (this case also works fine). Note that this is far from CSS one would expect in the wild (at least from non-sadistic web designers), but it exposes a potential problem. Also note that the sample operates in Standards-compliance mode (it exhibits the same problems in Quirks mode).
Note that the first activated selectable style is a working case, not the broken one.
Seeing this on on windows 2000, Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a) Gecko/20020611. Bug is not a frequent bug, is reproducible and meets QA standard->Confirmed. OS changed to all. Adding some keywords.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: css2, testcase
OS: Linux → All
WorksForMe using FizzillaCFM/2002071208.
Still occurs in CVS debug build from Sat Jul 13 01:18:43 EDT 2002 (Athlon, Debian/Sid). Make sure you select the "problematic" stylesheet (view->Use Style) since the default stylesheet does not display the error.
Found this on the console in a debug build: ###!!! ASSERTION: prev sibling not in line list: 'Not Reached', file nsBlockFrame.cpp, line 4905 Break: at file nsBlockFrame.cpp, line 4905 It occurs when in the problematic style, the moment any of the characters jumps to the beginning of the line. Convenience link: http://lxr.mozilla.org/seamonkey/source/layout/html/base/src/nsBlockFrame.cpp#4905 I'll wait to get in contact with someone who knows this code before I spin my wheels collecting useless information.
The assertion mentioned in comment 5 seems likely to be related to the bug. The assertion is complaining about a condition that shouldn't be happening -- that we can't find a frame for the previous sibling. The question is why we're hitting that assertion -- is it an incorrect assumption that the code is making (for example, about something not being 'display: none' (and we didn't check the undisplayed content map)), or is it something wrong with the calling code.
The patch in bug 277686 fixes this.
Depends on: 277686
Fixed by checkin for bug 277686
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: