Bug 1093949 - Reverse scroll position for RTL content. r=mats

This commit is contained in:
Jonathan Kew 2014-11-06 09:06:22 +00:00
Родитель 9309478c4f
Коммит 193b552c7e
2 изменённых файлов: 4 добавлений и 1 удалений

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

@ -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,