use of max(a,b) is confusing windows mobile compiler. b=419653, r=dbaron, a=beltzner

This commit is contained in:
dougt@meer.net 2008-02-26 17:51:57 -08:00
parent 0ac3599db4
commit 1c9c9aa46f
3 changed files with 29 additions and 29 deletions

View File

@ -1157,11 +1157,11 @@ nsXULScrollFrame::GetMaxSize(nsBoxLayoutState& aState)
PropagateDebug(aState);
#endif
nsSize max(NS_INTRINSICSIZE, NS_INTRINSICSIZE);
nsSize maxSize(NS_INTRINSICSIZE, NS_INTRINSICSIZE);
AddBorderAndPadding(max);
nsIBox::AddCSSMaxSize(aState, this, max);
return max;
AddBorderAndPadding(maxSize);
nsIBox::AddCSSMaxSize(aState, this, maxSize);
return maxSize;
}
#if 0 // XXXldb I don't think this is even needed

View File

@ -499,15 +499,15 @@ nsBox::GetMaxSize(nsBoxLayoutState& aState)
{
NS_ASSERTION(aState.GetRenderingContext(), "must have rendering context");
nsSize max(NS_INTRINSICSIZE, NS_INTRINSICSIZE);
DISPLAY_MAX_SIZE(this, max);
nsSize maxSize(NS_INTRINSICSIZE, NS_INTRINSICSIZE);
DISPLAY_MAX_SIZE(this, maxSize);
if (IsCollapsed(aState))
return max;
return maxSize;
AddBorderAndPadding(max);
nsIBox::AddCSSMaxSize(aState, this, max);
return max;
AddBorderAndPadding(maxSize);
nsIBox::AddCSSMaxSize(aState, this, maxSize);
return maxSize;
}
nscoord

View File

@ -788,8 +788,8 @@ nsSprocketLayout::PopulateBoxSizes(nsIBox* aBox, nsBoxLayoutState& aState, nsBox
}
++childCount;
nsSize pref(0,0);
nsSize min(0,0);
nsSize max(NS_INTRINSICSIZE,NS_INTRINSICSIZE);
nsSize minSize(0,0);
nsSize maxSize(NS_INTRINSICSIZE,NS_INTRINSICSIZE);
nscoord ascent = 0;
PRBool collapsed = child->IsCollapsed(aState);
@ -799,19 +799,19 @@ nsSprocketLayout::PopulateBoxSizes(nsIBox* aBox, nsBoxLayoutState& aState, nsBox
//if (flexes != 1) {
pref = child->GetPrefSize(aState);
min = child->GetMinSize(aState);
max = nsBox::BoundsCheckMinMax(min, child->GetMaxSize(aState));
minSize = child->GetMinSize(aState);
maxSize = nsBox::BoundsCheckMinMax(minSize, child->GetMaxSize(aState));
ascent = child->GetBoxAscent(aState);
nsMargin margin;
child->GetMargin(margin);
ascent += margin.top;
//}
pref = nsBox::BoundsCheck(min, pref, max);
pref = nsBox::BoundsCheck(minSize, pref, maxSize);
AddMargin(child, pref);
AddMargin(child, min);
AddMargin(child, max);
AddMargin(child, minSize);
AddMargin(child, maxSize);
}
if (!currentBox) {
@ -831,12 +831,12 @@ nsSprocketLayout::PopulateBoxSizes(nsIBox* aBox, nsBoxLayoutState& aState, nsBox
// get sizes from child
if (isHorizontal) {
minWidth = min.width;
maxWidth = max.width;
minWidth = minSize.width;
maxWidth = maxSize.width;
prefWidth = pref.width;
} else {
minWidth = min.height;
maxWidth = max.height;
minWidth = minSize.height;
maxWidth = maxSize.height;
prefWidth = pref.height;
}
@ -875,18 +875,18 @@ nsSprocketLayout::PopulateBoxSizes(nsIBox* aBox, nsBoxLayoutState& aState, nsBox
}
if (!isHorizontal) {
if (min.width > aMinSize)
aMinSize = min.width;
if (minSize.width > aMinSize)
aMinSize = minSize.width;
if (max.width < aMaxSize)
aMaxSize = max.width;
if (maxSize.width < aMaxSize)
aMaxSize = maxSize.width;
} else {
if (min.height > aMinSize)
aMinSize = min.height;
if (minSize.height > aMinSize)
aMinSize = minSize.height;
if (max.height < aMaxSize)
aMaxSize = max.height;
if (maxSize.height < aMaxSize)
aMaxSize = maxSize.height;
}
currentBox->ascent = ascent;