mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Fix state restoration for RTL cases. b=331607 Patch from Hideo Saito <saito@densan.co.jp>. r+sr=dbaron
This commit is contained in:
parent
c945ce38f4
commit
9e499dc761
@ -781,6 +781,7 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||
return rv;
|
||||
|
||||
PlaceScrollArea(state);
|
||||
mInner.ScrollToRestoredPosition();
|
||||
|
||||
if (!mInner.mSupppressScrollbarUpdate) {
|
||||
PRBool didHaveHScrollbar = mInner.mHasHorizontalScrollbar;
|
||||
@ -805,7 +806,6 @@ nsHTMLScrollFrame::Reflow(nsPresContext* aPresContext,
|
||||
oldScrollAreaBounds, state.mScrollPortRect);
|
||||
}
|
||||
}
|
||||
ScrollToRestoredPosition();
|
||||
|
||||
aDesiredSize.width = state.mInsideBorderSize.width +
|
||||
state.mComputedBorder.LeftRight();
|
||||
@ -1539,7 +1539,7 @@ nsGfxScrollFrameInner::ScrollToRestoredPosition()
|
||||
// if our position is greater than the scroll position, scroll.
|
||||
// remember that we could be incrementally loading so we may enter
|
||||
// and scroll many times.
|
||||
if (y > cy || x > cx) {
|
||||
if (y != cy || x != cx) {
|
||||
scrollingView->ScrollTo(x, y, 0);
|
||||
// scrollpostion goes from twips to pixels. this fixes any roundoff
|
||||
// problems.
|
||||
|
Loading…
Reference in New Issue
Block a user