Closed
Bug 136935
Opened 23 years ago
Closed 23 years ago
:hover paints over previous link's underline
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jameslariviere, Assigned: shanjian)
References
()
Details
Attachments
(2 files, 1 obsolete file)
9.73 KB,
image/png
|
Details | |
1.00 KB,
patch
|
shanjian
:
review+
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
A link has its underline painted over by links on following lines. (XP build 4-11)
This is happens with smaller fonts sizes.
I'll post a screenshot.
I think its related to the fix for bug 5693.
Reporter | ||
Comment 1•23 years ago
|
||
A site I work on also suffers from this problem.
www.mutualfundsnet.com at the footers 2nd line.
Steps:
1) hover over a link
2) after you hover off link the link lines above it will now be missing.
Comment 2•23 years ago
|
||
This is almost certainly unrelated to bug 5693, and is almost certainly related
to the line-height being set too small on those lines...
Reporter | ||
Comment 3•23 years ago
|
||
hey boris...
What changed over the past day that would have caused this (I noticed that
someone else has mentioned this in bug 5693)? Nothing catches my untrained eye :-).
Could this have been a problem before and david's patch exposed the line height
problem?
I'll download yesterdays build just to verify that it wasn't already there.
Reporter | ||
Comment 4•23 years ago
|
||
Yep checked the win 4-9 and 4-10 builds and there are no problems rendering
:hover over the small links.
Again I think that david's patch exposed the problem because you do not see the
messed rendering until after you hover off the link.
Line height is the problem because with other links with larger values to don't
render over the previous link's underline.
We're probably sending fewer :hover state changed notifications now when moving
from parent to child (although I don't know why we'd have repainted the parent
in the past), and this has exposed the problem that already exists related to
any text frames that overflow their bounds (bug 109184).
The problem goes away if you trigger a repaint (e.g., by moving another window
over the Mozilla window and then moving it back), right?
From bug 5693:
------- Additional Comment #190 From Warner Young 2002-04-11 11:04 -------
dbaron, on the site http://www.aberdeeninc.com, when I move the mouse over the
various links, sometimes I get links that don't underline, and other times, the
underlines don't go away after I move the mouse away. I don't know if this is
related or not. Trunk build, 2002041103, Win98.
Actually, I just noticed that shanjian landed bug 76097 yesterday, which is much
more likely to be the cause of this regression than bug 5693 (since I really
don't see why we would have repainted the parent in the past).
Assignee: dbaron → shanjian
FWIW, what would cause this is a reduction in whichever font metrics determine
the size of the text frame. I suspect something in bug 76097 caused the metrics
that determine the size of the frame to be smaller, causing the underline (and
perhaps also some of the upper extents) of the text to be outside the text frame.
A similar problem happens in much rarer cases on Linux - see bug 109184.
Actually, now that I'm looking at the patch, it might be that the change that
caused this was actually:
@@ -3262,7 +3271,10 @@
mStrikeoutSize = PR_MAX(onePixel, NSToCoordRound(oMetrics.otmsStrikeoutSize
* dev2app));
mStrikeoutOffset = NSToCoordRound(oMetrics.otmsStrikeoutPosition * dev2app);
mUnderlineSize = PR_MAX(onePixel,
NSToCoordRound(oMetrics.otmsUnderscoreSize * dev2app));
- mUnderlineOffset = NSToCoordRound(oMetrics.otmsUnderscorePosition * dev2app);
+ if (gDoingLineheightFixup)
+ mUnderlineOffset = NSToCoordRound(PR_MIN(oMetrics.otmsUnderscorePosition,
oMetrics.otmDescent) * dev2app);
+ else
+ mUnderlineOffset = NSToCoordRound(oMetrics.otmsUnderscorePosition * dev2app);
// Begin -- section of code to get the real x-height with GetGlyphOutline()
GLYPHMETRICS gm;
Assignee | ||
Comment 10•23 years ago
|
||
Assignee | ||
Comment 11•23 years ago
|
||
It is most likely that my way of calculating underline position exceed current
line area. I propose a patch which might fix the problem. Because I could not
reproduce the problem on my machine, david, could you take care of it?
Assignee: shanjian → dbaron
Comment on attachment 78828 [details] [diff] [review]
patch
r=dbaron, but I have no way to test since I don't even have a windows machine.
Attachment #78828 -
Flags: review+
Back to shanjian, since I have no way of testing this either. (One thing to
check, though: mUnderlineOffset is a positive number, not a negative one, right?)
Assignee: dbaron → shanjian
Assignee | ||
Comment 14•23 years ago
|
||
Attachment #78828 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #78828 -
Flags: review+
Assignee | ||
Updated•23 years ago
|
Attachment #78835 -
Flags: review+
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Yeah, that agrees better with bug 11168 comment 25. r=dbaron
Assignee | ||
Comment 16•23 years ago
|
||
chris/marc, could you give sr=?
Comment 17•23 years ago
|
||
Comment on attachment 78835 [details] [diff] [review]
update patch
sr=attinasi
Attachment #78835 -
Flags: superreview+
Assignee | ||
Comment 18•23 years ago
|
||
fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 19•23 years ago
|
||
*** Bug 137502 has been marked as a duplicate of this bug. ***
Comment 20•23 years ago
|
||
*** Bug 137590 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•