mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge backout.
This commit is contained in:
commit
a3d6d1316a
@ -438,8 +438,6 @@ void nsView::DoResetWidgetBounds(PRBool aMoveOnly,
|
||||
return;
|
||||
}
|
||||
|
||||
NS_PRECONDITION(mWindow, "Why was this called??");
|
||||
|
||||
nsIntRect curBounds;
|
||||
mWindow->GetBounds(curBounds);
|
||||
|
||||
@ -455,19 +453,13 @@ void nsView::DoResetWidgetBounds(PRBool aMoveOnly,
|
||||
return;
|
||||
}
|
||||
|
||||
NS_PRECONDITION(mWindow, "Why was this called??");
|
||||
|
||||
nsIntRect newBounds = CalcWidgetBounds(type);
|
||||
|
||||
PRBool changedPos = curBounds.TopLeft() != newBounds.TopLeft();
|
||||
PRBool changedSize = curBounds.Size() != newBounds.Size();
|
||||
|
||||
PRBool curVisibility;
|
||||
mWindow->IsVisible(curVisibility);
|
||||
PRBool newVisibility = IsEffectivelyVisible();
|
||||
|
||||
if (curVisibility && !newVisibility) {
|
||||
mWindow->Show(PR_FALSE);
|
||||
}
|
||||
|
||||
// Child views are never attached to top level widgets, this is safe.
|
||||
if (changedPos) {
|
||||
if (changedSize && !aMoveOnly) {
|
||||
@ -481,10 +473,6 @@ void nsView::DoResetWidgetBounds(PRBool aMoveOnly,
|
||||
mWindow->Resize(newBounds.width, newBounds.height, aInvalidateChangedSize);
|
||||
} // else do nothing!
|
||||
}
|
||||
|
||||
if (!curVisibility && newVisibility) {
|
||||
mWindow->Show(PR_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void nsView::SetDimensions(const nsRect& aRect, PRBool aPaint, PRBool aResizeWidget)
|
||||
@ -516,7 +504,13 @@ void nsView::NotifyEffectiveVisibilityChanged(PRBool aEffectivelyVisible)
|
||||
|
||||
if (nsnull != mWindow)
|
||||
{
|
||||
ResetWidgetBounds(PR_FALSE, PR_TRUE, PR_FALSE);
|
||||
if (aEffectivelyVisible)
|
||||
{
|
||||
DoResetWidgetBounds(PR_FALSE, PR_TRUE);
|
||||
mWindow->Show(PR_TRUE);
|
||||
}
|
||||
else
|
||||
mWindow->Show(PR_FALSE);
|
||||
}
|
||||
|
||||
for (nsView* child = mFirstChild; child; child = child->mNextSibling) {
|
||||
|
Loading…
Reference in New Issue
Block a user