Closed Bug 486708 Opened 11 years ago Closed 11 years ago

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


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

Not set





(Reporter: masayuki, Assigned: masayuki)




(1 file, 1 obsolete file)

Attached patch Patch v1.0 (obsolete) — Splinter Review
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)
Depends on: 486735
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+
Attachment #370891 - Attachment is obsolete: true
Closed: 11 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.