Should lift up selection underline as far as possible if it overflows from the descent space

RESOLVED FIXED in mozilla1.9.2a1

Status

()

Core
Layout: Text
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla1.9.2a1
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 370891 [details] [diff] [review]
Patch v1.0

The selection underlines -- spellchecker underline and IME selection underlines -- should displayed always. E.g., they shouldn't be clipped by the input element's border. And they shouldn't overlap to the text of next line.

We can use following approach:

1. If underline offset which comes from font metrics is lesser than zero, we can lift up the underline by ignoring the value.

2. If the underline style is double or wavy, we can reduce the underline rect without shrinking the line height. We can shrink the gap between the two lines at double style. And we can shrink the rect height to lineHeight * 2 at wavy style.
Attachment #370891 - Flags: superreview?(roc)
Attachment #370891 - Flags: review?(roc)

Updated

9 years ago
Depends on: 486735

Updated

9 years ago
No longer depends on: 486735
Comment on attachment 370891 [details] [diff] [review]
Patch v1.0

+        // Don't shrunk the line height.  Because the thickness has some
+        // meaning.

"Don't shrink the line height, because the thickness has some meaning" (similar again down below)

+  PRBool liftupUnderline = aDescentLimit >= 0.0;

Call it "canLiftUnderline"

You might want to add a comment making it clear that for "double" style, you're just shrinking the gap.
Attachment #370891 - Flags: superreview?(roc)
Attachment #370891 - Flags: superreview+
Attachment #370891 - Flags: review?(roc)
Attachment #370891 - Flags: review+
Created attachment 371186 [details] [diff] [review]
Patch v1.0.1 (for check-in)
Attachment #370891 - Attachment is obsolete: true
http://hg.mozilla.org/mozilla-central/rev/b14428284d51
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.