diff --git a/mozilla/widget/src/xlib/nsLookAndFeel.cpp b/mozilla/widget/src/xlib/nsLookAndFeel.cpp index 5778913f822..5e09e2269cf 100644 --- a/mozilla/widget/src/xlib/nsLookAndFeel.cpp +++ b/mozilla/widget/src/xlib/nsLookAndFeel.cpp @@ -67,10 +67,10 @@ NS_IMETHODIMP nsLookAndFeel::GetMetric(const nsMetricID aID, PRInt32 & aMetric) aMetric = 8; break; case eMetric_CheckboxSize: - aMetric = 12; + aMetric = 15; break; case eMetric_RadioboxSize: - aMetric = 12; + aMetric = 15; break; case eMetric_TextHorizontalInsideMinimumPadding: aMetric = 3; diff --git a/mozilla/widget/src/xlib/nsWidget.cpp b/mozilla/widget/src/xlib/nsWidget.cpp index 76fa7d7d095..2202d324615 100644 --- a/mozilla/widget/src/xlib/nsWidget.cpp +++ b/mozilla/widget/src/xlib/nsWidget.cpp @@ -149,6 +149,15 @@ NS_IMETHODIMP nsWidget::Destroy() NS_IMETHODIMP nsWidget::Move(PRUint32 aX, PRUint32 aY) { + printf("nsWidget::Move\n"); + if (aX < 0) { + printf("*** x is %d, fixing.\n", aX); + aX = 0; + } + if (aY < 0) { + printf("*** y is %d, fixing.\n", aY); + aY = 0; + } XMoveWindow(gDisplay, mBaseWindow, aX, aY); return NS_OK; } @@ -157,6 +166,15 @@ NS_IMETHODIMP nsWidget::Resize(PRUint32 aWidth, PRUint32 aHeight, PRBool aRepaint) { + printf("nsWidget::Resize\n"); + if (aWidth <= 0) { + printf("*** width is %d, fixing.\n", aWidth); + aWidth = 1; + } + if (aHeight <= 0) { + printf("*** height is %d, fixing.\n", aHeight); + aHeight = 1; + } XMoveWindow(gDisplay, mBaseWindow, aWidth, aHeight); return NS_OK; } @@ -167,6 +185,23 @@ NS_IMETHODIMP nsWidget::Resize(PRUint32 aX, PRUint32 aHeight, PRBool aRepaint) { + printf("nsWidget::Resize\n"); + if (aWidth <= 0) { + printf("*** width is %d, fixing.\n", aWidth); + aWidth = 1; + } + if (aHeight <= 0) { + printf("*** height is %d, fixing.\n", aHeight); + aHeight = 1; + } + if (aX < 0) { + printf("*** x is %d, fixing.\n", aX); + aX = 0; + } + if (aY < 0) { + printf("*** y is %d, fixing.\n", aY); + aY = 0; + } XMoveResizeWindow(gDisplay, mBaseWindow, aX, aY, aWidth, aHeight); return NS_OK; } @@ -365,14 +400,14 @@ void nsWidget::CreateNative(Window aParent, nsRect aRect) printf("Creating XWindow: x %d y %d w %d h %d\n", aRect.x, aRect.y, aRect.width, aRect.height); - if (aRect.width == 0) { + if (aRect.width <= 0) { printf("*** Fixing width...\n"); width = 1; } else { width = aRect.width; } - if (aRect.height == 0) { + if (aRect.height <= 0) { printf("*** Fixing height...\n"); height = 1; }