mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Fixing bug 58285. The various scroll methods on the window object need to flush pending layout notifications so that the presentation is up-to-date when the scolling is done. r=heikki@netscape.com, r=pollmann@netscape.com, sr=vidur@netscape.com
This commit is contained in:
parent
c30ab11584
commit
045cc1a30d
@ -1466,8 +1466,6 @@ NS_IMETHODIMP GlobalWindowImpl::GetScrollX(PRInt32* aScrollX)
|
||||
|
||||
*aScrollX = 0;
|
||||
|
||||
FlushPendingNotifications();
|
||||
|
||||
GetScrollInfo(&view, &p2t, &t2p);
|
||||
if (view) {
|
||||
nscoord xPos, yPos;
|
||||
@ -1487,8 +1485,6 @@ NS_IMETHODIMP GlobalWindowImpl::GetScrollY(PRInt32* aScrollY)
|
||||
|
||||
*aScrollY = 0;
|
||||
|
||||
FlushPendingNotifications();
|
||||
|
||||
GetScrollInfo(&view, &p2t, &t2p);
|
||||
if (view) {
|
||||
nscoord xPos, yPos;
|
||||
@ -4151,6 +4147,10 @@ NS_IMETHODIMP
|
||||
GlobalWindowImpl::GetScrollInfo(nsIScrollableView **aScrollableView,
|
||||
float *aP2T, float *aT2P)
|
||||
{
|
||||
// Flush pending notifications so that the presentation is up to
|
||||
// date.
|
||||
FlushPendingNotifications();
|
||||
|
||||
nsCOMPtr<nsIPresContext> presContext;
|
||||
mDocShell->GetPresContext(getter_AddRefs(presContext));
|
||||
if (presContext) {
|
||||
|
Loading…
Reference in New Issue
Block a user