mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 548792. Fix rect coordinate adjustment. r=mats
This commit is contained in:
parent
59d891798f
commit
c29e28bbd0
@ -4101,7 +4101,9 @@ PresShell::ScrollFrameRectIntoView(nsIFrame* aFrame,
|
||||
ScrollToShowRect(sf, rect - sf->GetScrolledFrame()->GetPosition(),
|
||||
aVPercent, aHPercent, aFlags);
|
||||
nsPoint newPosition = sf->GetScrollPosition();
|
||||
rect += newPosition - oldPosition;
|
||||
// If the scroll position increased, that means our content moved up,
|
||||
// so our rect's offset should decrease
|
||||
rect += oldPosition - newPosition;
|
||||
|
||||
if (oldPosition != newPosition) {
|
||||
didScroll = PR_TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user