зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1093949 - Reverse scroll position for RTL content. r=mats
This commit is contained in:
Родитель
9309478c4f
Коммит
193b552c7e
|
@ -1132,7 +1132,7 @@ ScrollFrameHelper::ThumbMoved(nsScrollbarFrame* aScrollbar,
|
|||
nsPoint current = GetScrollPosition();
|
||||
nsPoint dest = current;
|
||||
if (isHorizontal) {
|
||||
dest.x = aNewPos;
|
||||
dest.x = IsLTR() ? aNewPos : aNewPos - GetScrollRange().width;
|
||||
} else {
|
||||
dest.y = aNewPos;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,9 @@ public:
|
|||
virtual void RepeatButtonScroll(nsScrollbarFrame* aScrollbar) = 0;
|
||||
/**
|
||||
* aOldPos and aNewPos are scroll positions.
|
||||
* The scroll positions start with zero at the left edge; implementors that want
|
||||
* zero at the right edge for RTL content will need to adjust accordingly.
|
||||
* (See ScrollFrameHelper::ThumbMoved in nsGfxScrollFrame.cpp.)
|
||||
* @note This method might destroy the frame, pres shell, and other objects.
|
||||
*/
|
||||
virtual void ThumbMoved(nsScrollbarFrame* aScrollbar,
|
||||
|
|
Загрузка…
Ссылка в новой задаче