Bug 805261 - Implement nsChildView::GetScreenBounds() (MacOSX). r=BenWa

This commit is contained in:
Chris Pearce 2013-02-11 11:31:00 +13:00
parent 4f94df6359
commit c0dd22c074
2 changed files with 8 additions and 0 deletions

View File

@ -400,6 +400,7 @@ public:
NS_IMETHOD SetFocus(bool aRaise);
NS_IMETHOD GetBounds(nsIntRect &aRect);
NS_IMETHOD GetClientBounds(nsIntRect &aRect);
NS_IMETHOD GetScreenBounds(nsIntRect &aRect);
// Returns the "backing scale factor" of the view's window, which is the
// ratio of pixels in the window's backing store to Cocoa points. Prior to

View File

@ -796,6 +796,13 @@ NS_IMETHODIMP nsChildView::GetClientBounds(nsIntRect &aRect)
return NS_OK;
}
NS_IMETHODIMP nsChildView::GetScreenBounds(nsIntRect &aRect)
{
GetBounds(aRect);
aRect.MoveTo(WidgetToScreenOffset());
return NS_OK;
}
double
nsChildView::GetDefaultScaleInternal()
{