Closed Bug 486708 Opened 12 years ago Closed 12 years ago
Should lift up selection underline as far as possible if it overflows from the descent space
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.
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.
Status: ASSIGNED → RESOLVED
Closed: 12 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.