313988 Positioned <select> drop-down doesn't work on 10.3. Calculate structure-to-content offset by using the already-known content rect instead of the one returned by GetWindowBounds, because its values are incorrect on Panther. r=josh sr=pink a/1.8.0.1,1.8.1=dveditz

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@186912 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mark%moxienet.com
2006-01-04 15:15:11 +00:00
parent 3e99f694cc
commit cd4e673cf2

View File

@@ -79,9 +79,9 @@ extern nsIWidget * gRollupWidget;
// These are only initial guesses. Real values are filled in
// after window creation.
const short kWindowTitleBarHeight = 22;
const short kWindowMarginWidth = 6;
const short kDialogTitleBarHeight = 26;
const short kDialogMarginWidth = 6;
const short kWindowMarginWidth = 0;
const short kDialogTitleBarHeight = 22;
const short kDialogMarginWidth = 0;
#if 0
@@ -493,11 +493,12 @@ nsresult nsMacWindow::StandardCreate(nsIWidget *aParent,
mWindowMadeHere = PR_TRUE;
Rect content, structure;
// Getting kWindowContentRgn can give back bad values on Panther
// (fixed on Tiger), but wRect is already set to the content rect anyway.
Rect structure;
::GetWindowBounds(mWindowPtr, kWindowStructureRgn, &structure);
::GetWindowBounds(mWindowPtr, kWindowContentRgn, &content);
mBoundsOffset.v = content.top - structure.top;
mBoundsOffset.h = content.left - structure.left;
mBoundsOffset.v = wRect.top - structure.top;
mBoundsOffset.h = wRect.left - structure.left;
}
else
{