зеркало из https://github.com/mozilla/gecko-dev.git
Set curpos after maxpos to fix restoration of horizontal scrollbar in RTL scrolled all the way to the left. b=333829 Patch from Hideo Saito <saito@densan.co.jp>. r+sr=dbaron
This commit is contained in:
Родитель
66aaeb15a5
Коммит
6d9da6b006
|
@ -2396,9 +2396,10 @@ nsGfxScrollFrameInner::LayoutScrollbars(nsBoxLayoutState& aState,
|
|||
nscoord curPosX, curPosY;
|
||||
scrollable->GetScrollPosition(curPosX, curPosY);
|
||||
// Scrollbars assume zero is the minimum position, so translate for them.
|
||||
SetCoordAttribute(mVScrollbarBox, nsXULAtoms::curpos, curPosY - minY);
|
||||
SetScrollbarEnabled(mVScrollbarBox, maxY - minY);
|
||||
SetCoordAttribute(mVScrollbarBox, nsXULAtoms::maxpos, maxY - minY);
|
||||
// Set curpos after maxpos since it could be clamped based on maxpos.
|
||||
SetCoordAttribute(mVScrollbarBox, nsXULAtoms::curpos, curPosY - minY);
|
||||
SetCoordAttribute(mVScrollbarBox, nsXULAtoms::pageincrement, nscoord(aScrollArea.height - fontHeight));
|
||||
SetCoordAttribute(mVScrollbarBox, nsXULAtoms::increment, fontHeight);
|
||||
|
||||
|
@ -2416,9 +2417,10 @@ nsGfxScrollFrameInner::LayoutScrollbars(nsBoxLayoutState& aState,
|
|||
nscoord curPosX, curPosY;
|
||||
scrollable->GetScrollPosition(curPosX, curPosY);
|
||||
// Scrollbars assume zero is the minimum position, so translate for them.
|
||||
SetCoordAttribute(mHScrollbarBox, nsXULAtoms::curpos, curPosX - minX);
|
||||
SetScrollbarEnabled(mHScrollbarBox, maxX - minX);
|
||||
SetCoordAttribute(mHScrollbarBox, nsXULAtoms::maxpos, maxX - minX);
|
||||
// Set curpos after maxpos since it could be clamped based on maxpos.
|
||||
SetCoordAttribute(mHScrollbarBox, nsXULAtoms::curpos, curPosX - minX);
|
||||
SetCoordAttribute(mHScrollbarBox, nsXULAtoms::pageincrement, nscoord(float(aScrollArea.width)*0.8));
|
||||
SetCoordAttribute(mHScrollbarBox, nsXULAtoms::increment, 10*mOnePixel);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче