Backed out changeset 9534a3d38191 (bug 1149041)

This commit is contained in:
Carsten "Tomcat" Book 2015-03-30 15:03:19 +02:00
Родитель d28d4e9eb5
Коммит 191c9180a5
4 изменённых файлов: 14 добавлений и 16 удалений

Просмотреть файл

@ -669,12 +669,12 @@ void nsContainerFrame::SetSizeConstraints(nsPresContext* aPresContext,
const nsSize& aMinSize, const nsSize& aMinSize,
const nsSize& aMaxSize) const nsSize& aMaxSize)
{ {
LayoutDeviceIntSize devMinSize(aPresContext->AppUnitsToDevPixels(aMinSize.width), nsIntSize devMinSize(aPresContext->AppUnitsToDevPixels(aMinSize.width),
aPresContext->AppUnitsToDevPixels(aMinSize.height)); aPresContext->AppUnitsToDevPixels(aMinSize.height));
LayoutDeviceIntSize devMaxSize(aMaxSize.width == NS_INTRINSICSIZE ? NS_MAXSIZE : nsIntSize devMaxSize(aMaxSize.width == NS_INTRINSICSIZE ? NS_MAXSIZE :
aPresContext->AppUnitsToDevPixels(aMaxSize.width), aPresContext->AppUnitsToDevPixels(aMaxSize.width),
aMaxSize.height == NS_INTRINSICSIZE ? NS_MAXSIZE : aMaxSize.height == NS_INTRINSICSIZE ? NS_MAXSIZE :
aPresContext->AppUnitsToDevPixels(aMaxSize.height)); aPresContext->AppUnitsToDevPixels(aMaxSize.height));
// MinSize has a priority over MaxSize // MinSize has a priority over MaxSize
if (devMinSize.width > devMaxSize.width) if (devMinSize.width > devMaxSize.width)

Просмотреть файл

@ -4089,14 +4089,14 @@ nsWindow::SetHasMappedToplevel(bool aState)
} }
} }
LayoutDeviceIntSize nsIntSize
nsWindow::GetSafeWindowSize(LayoutDeviceIntSize aSize) nsWindow::GetSafeWindowSize(nsIntSize aSize)
{ {
// The X protocol uses CARD32 for window sizes, but the server (1.11.3) // 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) // reads it as CARD16. Sizes of pixmaps, used for drawing, are (unsigned)
// CARD16 in the protocol, but the server's ProcCreatePixmap returns // CARD16 in the protocol, but the server's ProcCreatePixmap returns
// BadAlloc if dimensions cannot be represented by signed shorts. // BadAlloc if dimensions cannot be represented by signed shorts.
LayoutDeviceIntSize result = aSize; nsIntSize result = aSize;
const int32_t kInt16Max = 32767; const int32_t kInt16Max = 32767;
if (result.width > kInt16Max) { if (result.width > kInt16Max) {
result.width = kInt16Max; result.width = kInt16Max;

Просмотреть файл

@ -38,7 +38,6 @@
#include "prlog.h" #include "prlog.h"
#include "nsTArray.h" #include "nsTArray.h"
#include "Units.h"
extern PRLogModuleInfo *gWidgetLog; extern PRLogModuleInfo *gWidgetLog;
extern PRLogModuleInfo *gWidgetFocusLog; extern PRLogModuleInfo *gWidgetFocusLog;
@ -212,7 +211,7 @@ private:
void NativeShow (bool aAction); void NativeShow (bool aAction);
void SetHasMappedToplevel(bool aState); void SetHasMappedToplevel(bool aState);
mozilla::LayoutDeviceIntSize GetSafeWindowSize(mozilla::LayoutDeviceIntSize aSize); nsIntSize GetSafeWindowSize(nsIntSize aSize);
void EnsureGrabs (void); void EnsureGrabs (void);
void GrabPointer (guint32 aTime); void GrabPointer (guint32 aTime);

Просмотреть файл

@ -24,7 +24,6 @@
#include "mozilla/TimeStamp.h" #include "mozilla/TimeStamp.h"
#include "Units.h" #include "Units.h"
#include "mozilla/gfx/Point.h" #include "mozilla/gfx/Point.h"
#include "Units.h"
// forward declarations // forward declarations
class nsFontMetrics; class nsFontMetrics;
@ -546,15 +545,15 @@ struct SizeConstraints {
{ {
} }
SizeConstraints(mozilla::LayoutDeviceIntSize aMinSize, SizeConstraints(nsIntSize aMinSize,
mozilla::LayoutDeviceIntSize aMaxSize) nsIntSize aMaxSize)
: mMinSize(aMinSize), : mMinSize(aMinSize),
mMaxSize(aMaxSize) mMaxSize(aMaxSize)
{ {
} }
mozilla::LayoutDeviceIntSize mMinSize; nsIntSize mMinSize;
mozilla::LayoutDeviceIntSize mMaxSize; nsIntSize mMaxSize;
}; };
// IMEMessage is shared by IMEStateManager and TextComposition. // IMEMessage is shared by IMEStateManager and TextComposition.