Closed Bug 327954 Opened 18 years ago Closed 1 month ago

Bottom line gets clipped in alert sheet with more than 8 lines.

Categories

(Camino Graveyard :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: camino.del.falcon, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060214 Camino/1.0
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060214 Camino/1.0

When Camino displays an alert sheet with 9 or more lines of text, the bottom line gets clipped so that only the top half of that line shows.

Reproducible: Always

Steps to Reproduce:
1. Enter the following into the location bar and press enter:

javascript:alert("1\n2\n3\n4\n5\n6\n7\n8\n9")
Actual Results:  
An alert sheet appears with bottom part of the last line of text not showing.

Expected Results:  
All lines should have been fully displayed.
Fun...
Status: UNCONFIRMED → NEW
Ever confirmed: true
I'm not sure I've ever seen alert sheets in the OS taller than seven lines. Not sure if this is an OS limitation or if we truncate on our end.

cl
nsAlertController has
const int kMaxDialogHeight = 400;

I wonder if that's it.
(In reply to comment #3)
> nsAlertController has
> const int kMaxDialogHeight = 400;

Would that make the bottom line cut off for 10 lines? 11 lines? This doesn't just apply to 9 lines, but anything over it. A set value seems like it'd cut off the 9th line again, as well as anything over that.
Try javascript:alert("1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11")

Note that in this case, only line 11 is cut off, not lines 9-11.  The issue is with the bottom line (and only the bottom line), whatever number of lines down the bottom line is, once the dialogue has more than 8 lines.
It cuts off a partial line starting with line 9, and by line 16, the line is totally gone. We lose about two or three pixels each time.

At 23 lines, we show a scrollbar in the sheet, and we don't cut off anything. This behaviour continues on past 23 lines as far up as I tried (28, I think).

cl
My comment on IRC, which may be useful in determining the cause of this:

This looks very similar to the situation in CSS where you specify a font-size and a line-height, and the line-height is about a pixel too short for the font. Lines start running together after a while, and eventually start getting cut off entirely.

I'm not familiar enough with nsAlertController code to make too much sense of where exactly we've gone wrong in there, but I feel fairly confident in stating that the problem is either in our height calculations or in our placement of the message in the alert window, or both.

cl
*** Bug 331890 has been marked as a duplicate of this bug. ***
Mass-reassign of bugs still assigned to pinkerton to nobody; filter on "NoMoPinkBugsInCamino".
Assignee: mikepinkerton → nobody
QA Contact: general
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.