зеркало из https://github.com/mozilla/gecko-dev.git
b=137982 r=dcone sr=sfraser. Fixed some scrolling issue on the Mac with iframes
This commit is contained in:
Родитель
2648c596d9
Коммит
ecd0914d57
|
@ -1876,33 +1876,33 @@ nsWindow::ScrollBits ( Rect & inRectToScroll, PRInt32 inLeftDelta, PRInt32 inTop
|
|||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsWindow::Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect)
|
||||
{
|
||||
if (! mVisible || !ContainerHierarchyIsVisible())
|
||||
return NS_OK;
|
||||
|
||||
nsRect scrollRect;
|
||||
|
||||
// If the clipping region is non-rectangular, just force a full update, sorry.
|
||||
// XXX ?
|
||||
if (!IsRegionRectangular(mWindowRegion)) {
|
||||
Invalidate(PR_TRUE);
|
||||
goto scrollChildren;
|
||||
}
|
||||
|
||||
//--------
|
||||
// Scroll this widget
|
||||
if (aClipRect)
|
||||
scrollRect = *aClipRect;
|
||||
else
|
||||
{
|
||||
scrollRect = mBounds;
|
||||
scrollRect.x = scrollRect.y = 0;
|
||||
}
|
||||
|
||||
Rect macRect;
|
||||
nsRectToMacRect(scrollRect, macRect);
|
||||
|
||||
|
||||
StartDraw();
|
||||
if (mVisible && ContainerHierarchyIsVisible()) {
|
||||
nsRect scrollRect;
|
||||
|
||||
// If the clipping region is non-rectangular, just force a full update, sorry.
|
||||
// XXX ?
|
||||
if (!IsRegionRectangular(mWindowRegion)) {
|
||||
Invalidate(PR_TRUE);
|
||||
goto scrollChildren;
|
||||
}
|
||||
|
||||
//--------
|
||||
// Scroll this widget
|
||||
if (aClipRect)
|
||||
scrollRect = *aClipRect;
|
||||
else
|
||||
{
|
||||
scrollRect = mBounds;
|
||||
scrollRect.x = scrollRect.y = 0;
|
||||
}
|
||||
|
||||
Rect macRect;
|
||||
nsRectToMacRect(scrollRect, macRect);
|
||||
|
||||
|
||||
StartDraw();
|
||||
|
||||
// Clip to the windowRegion instead of the visRegion (note: the visRegion
|
||||
// is equal to the windowRegion minus the children). The result is that
|
||||
|
@ -1913,6 +1913,7 @@ NS_IMETHODIMP nsWindow::Scroll(PRInt32 aDx, PRInt32 aDy, nsRect *aClipRect)
|
|||
ScrollBits(macRect,aDx,aDy);
|
||||
|
||||
EndDraw();
|
||||
}
|
||||
|
||||
scrollChildren:
|
||||
//--------
|
||||
|
|
Загрузка…
Ссылка в новой задаче