зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 9534a3d38191 (bug 1149041)
This commit is contained in:
Родитель
d28d4e9eb5
Коммит
191c9180a5
|
@ -669,12 +669,12 @@ void nsContainerFrame::SetSizeConstraints(nsPresContext* aPresContext,
|
|||
const nsSize& aMinSize,
|
||||
const nsSize& aMaxSize)
|
||||
{
|
||||
LayoutDeviceIntSize devMinSize(aPresContext->AppUnitsToDevPixels(aMinSize.width),
|
||||
aPresContext->AppUnitsToDevPixels(aMinSize.height));
|
||||
LayoutDeviceIntSize devMaxSize(aMaxSize.width == NS_INTRINSICSIZE ? NS_MAXSIZE :
|
||||
aPresContext->AppUnitsToDevPixels(aMaxSize.width),
|
||||
aMaxSize.height == NS_INTRINSICSIZE ? NS_MAXSIZE :
|
||||
aPresContext->AppUnitsToDevPixels(aMaxSize.height));
|
||||
nsIntSize devMinSize(aPresContext->AppUnitsToDevPixels(aMinSize.width),
|
||||
aPresContext->AppUnitsToDevPixels(aMinSize.height));
|
||||
nsIntSize devMaxSize(aMaxSize.width == NS_INTRINSICSIZE ? NS_MAXSIZE :
|
||||
aPresContext->AppUnitsToDevPixels(aMaxSize.width),
|
||||
aMaxSize.height == NS_INTRINSICSIZE ? NS_MAXSIZE :
|
||||
aPresContext->AppUnitsToDevPixels(aMaxSize.height));
|
||||
|
||||
// MinSize has a priority over MaxSize
|
||||
if (devMinSize.width > devMaxSize.width)
|
||||
|
|
|
@ -4089,14 +4089,14 @@ nsWindow::SetHasMappedToplevel(bool aState)
|
|||
}
|
||||
}
|
||||
|
||||
LayoutDeviceIntSize
|
||||
nsWindow::GetSafeWindowSize(LayoutDeviceIntSize aSize)
|
||||
nsIntSize
|
||||
nsWindow::GetSafeWindowSize(nsIntSize aSize)
|
||||
{
|
||||
// The X protocol uses CARD32 for window sizes, but the server (1.11.3)
|
||||
// reads it as CARD16. Sizes of pixmaps, used for drawing, are (unsigned)
|
||||
// CARD16 in the protocol, but the server's ProcCreatePixmap returns
|
||||
// BadAlloc if dimensions cannot be represented by signed shorts.
|
||||
LayoutDeviceIntSize result = aSize;
|
||||
nsIntSize result = aSize;
|
||||
const int32_t kInt16Max = 32767;
|
||||
if (result.width > kInt16Max) {
|
||||
result.width = kInt16Max;
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
|
||||
#include "prlog.h"
|
||||
#include "nsTArray.h"
|
||||
#include "Units.h"
|
||||
|
||||
extern PRLogModuleInfo *gWidgetLog;
|
||||
extern PRLogModuleInfo *gWidgetFocusLog;
|
||||
|
@ -212,7 +211,7 @@ private:
|
|||
|
||||
void NativeShow (bool aAction);
|
||||
void SetHasMappedToplevel(bool aState);
|
||||
mozilla::LayoutDeviceIntSize GetSafeWindowSize(mozilla::LayoutDeviceIntSize aSize);
|
||||
nsIntSize GetSafeWindowSize(nsIntSize aSize);
|
||||
|
||||
void EnsureGrabs (void);
|
||||
void GrabPointer (guint32 aTime);
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "mozilla/TimeStamp.h"
|
||||
#include "Units.h"
|
||||
#include "mozilla/gfx/Point.h"
|
||||
#include "Units.h"
|
||||
|
||||
// forward declarations
|
||||
class nsFontMetrics;
|
||||
|
@ -546,15 +545,15 @@ struct SizeConstraints {
|
|||
{
|
||||
}
|
||||
|
||||
SizeConstraints(mozilla::LayoutDeviceIntSize aMinSize,
|
||||
mozilla::LayoutDeviceIntSize aMaxSize)
|
||||
SizeConstraints(nsIntSize aMinSize,
|
||||
nsIntSize aMaxSize)
|
||||
: mMinSize(aMinSize),
|
||||
mMaxSize(aMaxSize)
|
||||
{
|
||||
}
|
||||
|
||||
mozilla::LayoutDeviceIntSize mMinSize;
|
||||
mozilla::LayoutDeviceIntSize mMaxSize;
|
||||
nsIntSize mMinSize;
|
||||
nsIntSize mMaxSize;
|
||||
};
|
||||
|
||||
// IMEMessage is shared by IMEStateManager and TextComposition.
|
||||
|
|
Загрузка…
Ссылка в новой задаче