don't use rint. fix bustage.

git-svn-id: svn://10.0.0.236/trunk@94559 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pinkerton%netscape.com 2001-05-11 02:26:05 +00:00
parent c0d6080462
commit 300c9d0e5e
2 changed files with 6 additions and 6 deletions

View File

@ -2521,16 +2521,16 @@ nsOutlinerBodyFrame :: ComputeDropPosition ( nsIDOMEvent* inEvent, PRInt32* outR
mView->IsContainer ( row, &isContainer );
if ( isContainer ) {
// for a container, use a 25%/50%/25% breakdown
if ( yOffset < rint(0.25 * mRowHeight) )
if ( yOffset < mRowHeight / 4 )
*outOrient = kBeforeRow;
else if ( yOffset > mRowHeight - rint(0.25 * mRowHeight) )
else if ( yOffset > mRowHeight - (mRowHeight / 4) )
*outOrient = kAfterRow;
else
*outOrient = kOnRow;
}
else {
// for a non-container use a 50%/50% breakdown
if ( yOffset < rint(0.5 * mRowHeight) )
if ( yOffset < mRowHeight / 2 )
*outOrient = kBeforeRow;
else
*outOrient = kAfterRow;

View File

@ -2521,16 +2521,16 @@ nsOutlinerBodyFrame :: ComputeDropPosition ( nsIDOMEvent* inEvent, PRInt32* outR
mView->IsContainer ( row, &isContainer );
if ( isContainer ) {
// for a container, use a 25%/50%/25% breakdown
if ( yOffset < rint(0.25 * mRowHeight) )
if ( yOffset < mRowHeight / 4 )
*outOrient = kBeforeRow;
else if ( yOffset > mRowHeight - rint(0.25 * mRowHeight) )
else if ( yOffset > mRowHeight - (mRowHeight / 4) )
*outOrient = kAfterRow;
else
*outOrient = kOnRow;
}
else {
// for a non-container use a 50%/50% breakdown
if ( yOffset < rint(0.5 * mRowHeight) )
if ( yOffset < mRowHeight / 2 )
*outOrient = kBeforeRow;
else
*outOrient = kAfterRow;