Closed Bug 212302 Opened 21 years ago Closed 19 years ago

some links don't have underline decoration

Categories

(Core :: Layout: Text and Fonts, defect)

x86
Windows 2000
defect
Not set
minor

Tracking

()

VERIFIED FIXED
mozilla1.8.1

People

(Reporter: izsak, Assigned: hsaito54)

References

()

Details

(Keywords: intl, testcase, verified1.8.1)

Attachments

(9 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624

Links should have underline decoration in hover state. In Mozilla some links
don't have underline, some still have underline after onmouseout.

Reproducible: Couldn't Reproduce

Steps to Reproduce:
1.
2.
3.



Expected Results:  
Links must have text-decoration: underline in hover state
Attached file occured page #1
Attached file occured page #2
WFM with attached pages: 
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030710

I notice that you are importing a stylesheet (style.css) into your page.  Is
there anything in there that has 'text-decoration:none' that relates to links? 
I can get the links to have no underlining on hover by putting 
A:hover {text-decoration:none;} into the referenced stylesheet.
Attached file Minimized testcase
Don't understand the issue, but here's the minimized code.

Oddly, if I remove the body { font-size : 8pt; } declaration then it WFM
20030627 PC/WinXP.
Confirming new since I see the same problem at the given URL, 20030627 PC/WinXP.
Added kw testcase.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030710

I've narrowed down the problem.  It seems that every font size in the body works
except for 8pt.  As well, the <code class="attribute"> tags do not affect this bug.

If some other text-effect (such as font-style:italic;) is added to the 'a:hover,
a:focus' CSS rule, this bug goes away.  

I believe the main problem we're seeing is with the <pre> tags.  If these are
removed this bug goes away.  It seems 8pt. fonts that have
text-decoration:underline while hovered within <pre> tags causes problems.
Further minimized code.
If the <pre> tags are removed, this bug goes away.
This fact that these are links is not important.  If this is just normal text
with text-decoration:underline; on its hover CSS rule, this bug still exists.
Sounds like the next line is painting over the decorations or something?  I
can't reproduce this with a current Linux build, so it may be Windows-only....

*** This bug has been marked as a duplicate of 196249 ***
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Comparing the minimized testcases, attachment 127486 [details] and attachment 130649 [details], this
doesn't seem to be a dupe.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
I've had a problem with the underline not working when the link contains spaces.
If the link does not contain spaces then the CSS underline hover works.
Firefox: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) 
Gecko/20040602 has a problem with the following site:

http://www.bathspa.ac.uk/

The site contains lists of underlined links, the links having a css hover 
effect that changes their colour. Hovering over a link and then leaving it 
seems to cause a repaint of the link's colour that catches the underline of the 
link above it, erasing it.

Steps to reproduce

1 Open that site
2 Run the mouse cursor over a list of links from top to bottom, underlining 
disappears in a ragged way.
3 Do the opposite and you'll make it reappear

For good measure this bug depends on text size settings - change those in 
the 'view' menu and the behaviour vanishes. It just happens to show it, on this 
machine, at the default text size settings for the page

If this is the right bug for this problem it's probably quite visible on a 
number of sites and therefore more than trivial
Links all underlined
The underlining goes missing on any part of a link above one that has been
moused over
I've reproduced the behaviour from comment 12 on another Windows 2000 machine 
with a CRT monitor, using Firefox /20040601, by altering the refresh rate and 
screen resolution, and resizing the text size in Firefox.

The 'Comment 12' machine has a flat screen running at 1280x1024 and 60Hz 
refresh rate - possibly this only shows up at a particular resolution?
Attached patch patch (obsolete) — Splinter Review
This patch trims and adjusts the underline offset, if underline separates too
far from the bottom of the font, and the baseline of the font does not shift
upward.
I think that the patch of Bug 156943 has a regression, since the baseline of the
several CJK fonts shift upward and the underline of that font goes out of the
input box.
Attached file testcase for patch
Attached image screenshot for patch
Comment on attachment 159983 [details] [diff] [review]
patch

I want to do following two things.

1. to calculate the text metrics of decent, font height, internal leading and
underline offset instead of shifting the base line.
2. to move underline to the appropriate position if underline separates too far
from the bottom of the font.
Attachment #159983 - Flags: review?(rbs)
This patch fixes bug 312838 too.

Rbs: Please review it.
Assignee: layout.fonts-and-text → saito
Severity: trivial → minor
Status: REOPENED → NEW
Keywords: intl
Comment on attachment 159983 [details] [diff] [review]
patch

This patch is not written up as I like. It shouldn't have that "#ifdef" and should be written within the setting/spirit
of gDoingLineheightFixup.
Attachment #159983 - Flags: review?(rbs) → review-
Attached patch patch (obsolete) — Splinter Review
Attachment #159983 - Attachment is obsolete: true
Attachment #207736 - Flags: review?(rbs)
Comment on attachment 207736 [details] [diff] [review]
patch

r=rbs.  I applied the pacth and it fixed the testcases here. Some nits:

+      // if underline positioned too near the text, descent position
                                 ^
                              ...is...


+      // only do this for CJK to minimize possible risk

Remove this since it is not true anymore. There is not IsCJK test anymore.

       mUnderlineOffset = descentPos;
+      nscoord extraOff = mUnderlineSize - mUnderlineOffset - mMaxDescent;

Simply call this 'extra' or 'extraOffset' in full. 
(extraOff gives the impression that there is extraOn.)


+      // if underline positioned too far the text, descent position
                                 ^
                              ...is...

// if underline positioned IS too far the text, descent position

============
PS: As the comment in that code says, gDoingLineheightFixup was meant to "be eliminated in future when we choose to stay with one normal lineheight calculation method." Hope that happens some day...
Attachment #207736 - Flags: review?(rbs) → review+
Nit on my nit: use "IS too far/near FROM". (These are trivialities of course.)
Attached patch fix for check inSplinter Review
Attachment #207782 - Flags: superreview?(rbs)
Comment on attachment 207782 [details] [diff] [review]
fix for check in

r+sr=rbs
Attachment #207782 - Flags: superreview?(rbs)
Attachment #207782 - Flags: superreview+
Attachment #207782 - Flags: review+
Attachment #207736 - Attachment is obsolete: true
Thanks rbs, could you check in to the trunk?
Status: NEW → ASSIGNED
Checked in the trunk.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago19 years ago
Resolution: --- → FIXED
Let's go to 1.8.1 if we will not have regression reports.
Flags: blocking1.8.1?
*** Bug 241627 has been marked as a duplicate of this bug. ***
Does this fix bug 35735?
(In reply to comment #32)
> Does this fix bug 35735?

Yes, the problem which an underline disappears or is not displayed was fixed on Windows.
*** Bug 35735 has been marked as a duplicate of this bug. ***
-> v.
Status: RESOLVED → VERIFIED
Target Milestone: --- → mozilla1.9alpha
Comment on attachment 207782 [details] [diff] [review]
fix for check in

We should fix this bug on 1.8 branch too. Because bug 312838 is accessibility bug for IME users who are using non-CJK locale Windows.
Attachment #207782 - Flags: approval1.8.1?
Attachment #207782 - Flags: approval1.8.1?
Attachment #207782 - Flags: branch-1.8.1?(rbs) → branch-1.8.1+
checked-in to 1.8 branch.
Flags: blocking1.8.1?
Keywords: fixed1.8.1
Target Milestone: mozilla1.9alpha → mozilla1.8.1
This bug basically started reappearing again as soon as cairo was turned on for windows builds. I've filed bug 389690 for it.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: