Introduce nsStyleCoord::HasPercent to check for either a percent value or a calc() value containing a percent. (Bug 585715) r=bzbarsky a2.0=blocking+
This commit is contained in:
@@ -143,11 +143,9 @@ inline PRBool HaveFixedSize(const nsHTMLReflowState& aReflowState)
|
||||
// see bug 156731
|
||||
const nsStyleCoord &height = aReflowState.mStylePosition->mHeight;
|
||||
const nsStyleCoord &width = aReflowState.mStylePosition->mWidth;
|
||||
return (((eStyleUnit_Percent == height.GetUnit() ||
|
||||
(height.IsCalcUnit() && height.CalcHasPercent())) &&
|
||||
return ((height.HasPercent() &&
|
||||
NS_UNCONSTRAINEDSIZE == aReflowState.ComputedHeight()) ||
|
||||
((eStyleUnit_Percent == width.GetUnit() ||
|
||||
(width.IsCalcUnit() && width.CalcHasPercent())) &&
|
||||
(width.HasPercent() &&
|
||||
(NS_UNCONSTRAINEDSIZE == aReflowState.ComputedWidth() ||
|
||||
0 == aReflowState.ComputedWidth())))
|
||||
? PR_FALSE
|
||||
|
||||
Reference in New Issue
Block a user