mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
b=26184 r=karnaze@netscape.com Changed it so that for a percentage width based
floater if the containing block width is unconstrained we use NS_UNCONSTRAINEDSIZE for the floater's computed width. We were using 0 and this was causing table column widths to be incorrect
This commit is contained in:
parent
34a85af798
commit
e548878b47
@ -1019,8 +1019,16 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
#else
|
||||
// A specified value of 'auto' becomes a computed width of 0
|
||||
mComputedWidth = 0;
|
||||
// A specified value of 'auto' becomes a computed width of 0. However,
|
||||
// if it's an unconstrained reflow then a percentage value becomes
|
||||
// unconstrained as well
|
||||
if ((NS_UNCONSTRAINEDSIZE == aContainingBlockWidth) &&
|
||||
(eStyleUnit_Percent == mStylePosition->mWidth.GetUnit())) {
|
||||
mComputedWidth = NS_UNCONSTRAINEDSIZE;
|
||||
|
||||
} else {
|
||||
mComputedWidth = 0;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
ComputeHorizontalValue(aContainingBlockWidth, widthUnit,
|
||||
|
@ -1019,8 +1019,16 @@ nsHTMLReflowState::InitConstraints(nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
#else
|
||||
// A specified value of 'auto' becomes a computed width of 0
|
||||
mComputedWidth = 0;
|
||||
// A specified value of 'auto' becomes a computed width of 0. However,
|
||||
// if it's an unconstrained reflow then a percentage value becomes
|
||||
// unconstrained as well
|
||||
if ((NS_UNCONSTRAINEDSIZE == aContainingBlockWidth) &&
|
||||
(eStyleUnit_Percent == mStylePosition->mWidth.GetUnit())) {
|
||||
mComputedWidth = NS_UNCONSTRAINEDSIZE;
|
||||
|
||||
} else {
|
||||
mComputedWidth = 0;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
ComputeHorizontalValue(aContainingBlockWidth, widthUnit,
|
||||
|
Loading…
Reference in New Issue
Block a user