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:
jst%netscape.com 2001-01-13 01:51:45 +00:00
parent c30ab11584
commit 045cc1a30d

View File

@ -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) {