mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1093949 - Reverse scroll position for RTL content. r=mats
This commit is contained in:
parent
9309478c4f
commit
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,
|
||||
|
Loading…
Reference in New Issue
Block a user