Bug 383267 - "When fontHeight is very large, pagescroll height(pageincrement value) is too small" [p=masa141421356@gmail.com (Masahiro Yamada) r+sr=roc a1.9=beltzner]

This commit is contained in:
reed%reedloden.com 2008-02-24 07:35:08 +00:00
Родитель bfb4f21a23
Коммит 2c11cec9a4
1 изменённых файлов: 9 добавлений и 1 удалений

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

@ -2415,8 +2415,16 @@ nsGfxScrollFrameInner::ReflowFinished()
nscoord curPosX, curPosY; nscoord curPosX, curPosY;
scrollable->GetScrollPosition(curPosX, curPosY); scrollable->GetScrollPosition(curPosX, curPosY);
if (vScroll) { if (vScroll) {
// We normally use (scrollArea.height - fontHeight) for height
// of page scrolling. However, it is too small when
// fontHeight is very large. (If fontHeight is larger than
// scrollArea.height, direction of scrolling will be opposite).
// To avoid it, we use (float(scrollArea.height) * 0.8) as
// lower bound value of height of page scrolling. (bug 383267)
nscoord pageincrement = nscoord(scrollArea.height - fontHeight);
nscoord pageincrementMin = nscoord(float(scrollArea.height) * 0.8);
FinishReflowForScrollbar(vScroll, minY, maxY, curPosY, FinishReflowForScrollbar(vScroll, minY, maxY, curPosY,
nscoord(scrollArea.height - fontHeight), PR_MAX(pageincrement,pageincrementMin),
fontHeight); fontHeight);
} }
if (hScroll) { if (hScroll) {