[OS/2] Bug 400329: work around hover position mismatch after scrolling on pages with iframes, r=mkaply

This commit is contained in:
mozilla@weilbacher.org 2008-05-02 13:49:18 -07:00
parent 0dabf3baae
commit 92e1000067
2 changed files with 23 additions and 6 deletions

View File

@ -2228,6 +2228,21 @@ BOOL nsWindow::NotifyForeignChildWindows(HWND aWnd)
return WinEndEnumWindows(hEnum);
}
//-------------------------------------------------------------------------
//
// Force a resize of child windows after a scroll to reset hover positions.
//
//-------------------------------------------------------------------------
void nsWindow::ScrollChildWindows(PRInt32 aX, PRInt32 aY)
{
nsIWidget *child = GetFirstChild();
while (child) {
nsRect rect;
child->GetBounds(rect);
child->Resize(rect.x + aX, rect.y + aY, rect.width, rect.height, PR_FALSE);
child = child->GetNextSibling();
}
}
//-------------------------------------------------------------------------
//
// Scroll the bits of a window
@ -2257,6 +2272,7 @@ NS_METHOD nsWindow::Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect)
NotifyForeignChildWindows(mWnd);
WinScrollWindow(mWnd, aDx, -aDy, aClipRect ? &rcl : 0, 0, 0,
0, SW_SCROLLCHILDREN | SW_INVALIDATERGN);
ScrollChildWindows(aDx, aDy);
Update();
if (hps)

View File

@ -331,6 +331,7 @@ protected:
PRUint32 aWidth, PRUint32 aHeight);
BOOL NotifyForeignChildWindows(HWND aWnd);
void ScrollChildWindows(PRInt32 aX, PRInt32 aY);
// Enumeration of the methods which are accessible on the PM thread
enum {