зеркало из https://github.com/mozilla/pjs.git
Fixed #14416 "GFX combo boxes cause zombie windows": there was a memory leak in WidgetToScreen and ScreenToWidget. r=dcone/sfraser
This commit is contained in:
Родитель
1404c9b219
Коммит
f588951106
|
@ -87,6 +87,7 @@ inline void GetPortVisibleRegion(GrafPtr port, RgnHandle visRgn)
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// nsWindow constructor
|
||||
|
@ -409,8 +410,7 @@ NS_IMETHODIMP nsWindow::Enable(PRBool bState)
|
|||
//-------------------------------------------------------------------------
|
||||
NS_IMETHODIMP nsWindow::SetFocus(void)
|
||||
{
|
||||
if (mToolkit)
|
||||
((nsToolkit*)mToolkit)->SetFocus(this);
|
||||
gFocusHandler.SetFocus(this);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1610,6 +1610,7 @@ PRBool nsWindow::RgnIntersects(RgnHandle aTheRegion, RgnHandle aIntersectRgn)
|
|||
* @param aY -- y offset amount
|
||||
* @return NOTHING
|
||||
*/
|
||||
|
||||
NS_IMETHODIMP nsWindow::CalcOffset(PRInt32 &aX,PRInt32 &aY)
|
||||
{
|
||||
aX = aY = 0;
|
||||
|
@ -1713,7 +1714,8 @@ NS_IMETHODIMP nsWindow::WidgetToScreen(const nsRect& aLocalRect, nsRect& aGlobal
|
|||
//
|
||||
// Convert the local rect to global, except for this level.
|
||||
theParent->WidgetToScreen(aLocalRect, aGlobalRect);
|
||||
|
||||
NS_RELEASE(theParent);
|
||||
|
||||
// the offset from our parent is in the x/y of our bounding rect
|
||||
nsRect myBounds;
|
||||
GetBounds(myBounds);
|
||||
|
@ -1753,6 +1755,7 @@ NS_IMETHODIMP nsWindow::ScreenToWidget(const nsRect& aGlobalRect, nsRect& aLocal
|
|||
//
|
||||
// Convert the local rect to global, except for this level.
|
||||
theParent->WidgetToScreen(aGlobalRect, aLocalRect);
|
||||
NS_RELEASE(theParent);
|
||||
|
||||
// the offset from our parent is in the x/y of our bounding rect
|
||||
nsRect myBounds;
|
||||
|
|
Загрузка…
Ссылка в новой задаче