mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
use of max(a,b) is confusing windows mobile compiler. b=419653, r=dbaron, a=beltzner
This commit is contained in:
parent
0ac3599db4
commit
1c9c9aa46f
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user