зеркало из https://github.com/mozilla/pjs.git
bug #7796: changed nsDeviceContextMac::GetDeviceSurfaceDimensions() to return the dimensions of the entire Mac desktop using LMGetGrayRgn().
This commit is contained in:
Родитель
264c3db8b2
Коммит
478b3de4ef
|
@ -26,6 +26,7 @@
|
||||||
#include <StringCompare.h>
|
#include <StringCompare.h>
|
||||||
#include <Fonts.h>
|
#include <Fonts.h>
|
||||||
#include <Resources.h>
|
#include <Resources.h>
|
||||||
|
#include <LowMem.h>
|
||||||
#include "il_util.h"
|
#include "il_util.h"
|
||||||
#include <FixMath.h>
|
#include <FixMath.h>
|
||||||
#include "nsIPref.h"
|
#include "nsIPref.h"
|
||||||
|
@ -321,10 +322,12 @@ NS_IMETHODIMP nsDeviceContextMac :: CheckFontExistence(const nsString& aFontName
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextMac::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
NS_IMETHODIMP nsDeviceContextMac::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
||||||
{
|
{
|
||||||
aWidth = 1;
|
// FIXME: could just union all of the GDevice rectangles together.
|
||||||
aHeight = 1;
|
RgnHandle grayRgn = LMGetGrayRgn();
|
||||||
|
Rect bounds = (**grayRgn).rgnBBox;
|
||||||
return NS_ERROR_FAILURE;
|
aWidth = bounds.right - bounds.left;
|
||||||
|
aHeight = bounds.bottom - bounds.top;
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <StringCompare.h>
|
#include <StringCompare.h>
|
||||||
#include <Fonts.h>
|
#include <Fonts.h>
|
||||||
#include <Resources.h>
|
#include <Resources.h>
|
||||||
|
#include <LowMem.h>
|
||||||
#include "il_util.h"
|
#include "il_util.h"
|
||||||
#include <FixMath.h>
|
#include <FixMath.h>
|
||||||
#include "nsIPref.h"
|
#include "nsIPref.h"
|
||||||
|
@ -321,10 +322,12 @@ NS_IMETHODIMP nsDeviceContextMac :: CheckFontExistence(const nsString& aFontName
|
||||||
|
|
||||||
NS_IMETHODIMP nsDeviceContextMac::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
NS_IMETHODIMP nsDeviceContextMac::GetDeviceSurfaceDimensions(PRInt32 &aWidth, PRInt32 &aHeight)
|
||||||
{
|
{
|
||||||
aWidth = 1;
|
// FIXME: could just union all of the GDevice rectangles together.
|
||||||
aHeight = 1;
|
RgnHandle grayRgn = LMGetGrayRgn();
|
||||||
|
Rect bounds = (**grayRgn).rgnBBox;
|
||||||
return NS_ERROR_FAILURE;
|
aWidth = bounds.right - bounds.left;
|
||||||
|
aHeight = bounds.bottom - bounds.top;
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче