Bug 232540. List controls should not scroll an item into view if it is only outside the list in the horizontal direction.

This commit is contained in:
roc+%cs.cmu.edu 2004-05-05 02:49:57 +00:00
Родитель 19e32df81d
Коммит 61e1f40eb4
2 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -3092,10 +3092,12 @@ nsListControlFrame::ScrollToFrame(nsIContent* aOptElement)
}
fRect.y += optRect.y;
// see if the selected frame is inside the scrolled area
if (!rect.Contains(fRect)) {
// See if the selected frame (fRect) is inside the scrolled
// area (rect). Check only the vertical dimension. Don't
// scroll just because there's horizontal overflow.
if (!(rect.y <= fRect.y && fRect.YMost() <= rect.YMost())) {
// figure out which direction we are going
if (fRect.y+fRect.height >= rect.y+rect.height) {
if (fRect.YMost() > rect.YMost()) {
y = fRect.y-(rect.height-fRect.height);
} else {
y = fRect.y;

Просмотреть файл

@ -3092,10 +3092,12 @@ nsListControlFrame::ScrollToFrame(nsIContent* aOptElement)
}
fRect.y += optRect.y;
// see if the selected frame is inside the scrolled area
if (!rect.Contains(fRect)) {
// See if the selected frame (fRect) is inside the scrolled
// area (rect). Check only the vertical dimension. Don't
// scroll just because there's horizontal overflow.
if (!(rect.y <= fRect.y && fRect.YMost() <= rect.YMost())) {
// figure out which direction we are going
if (fRect.y+fRect.height >= rect.y+rect.height) {
if (fRect.YMost() > rect.YMost()) {
y = fRect.y-(rect.height-fRect.height);
} else {
y = fRect.y;