Use new methods in nsHTMLReflowState to discover the proper width to base the text-indent percentage on (bug #1048)
git-svn-id: svn://10.0.0.236/trunk@14915 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -354,20 +354,10 @@ nsInlineReflow::ApplyTopLeftMargins()
|
||||
indent = text->mTextIndent.GetCoordValue();
|
||||
}
|
||||
else if (eStyleUnit_Percent == unit) {
|
||||
nscoord width;
|
||||
if (mOuterReflowState.HaveFixedContentWidth()) {
|
||||
width = mOuterReflowState.minWidth;
|
||||
nscoord width = mOuterReflowState.GetContainingBlockContentWidth();
|
||||
if (0 != width) {
|
||||
indent = nscoord(text->mTextIndent.GetPercentValue() * width);
|
||||
}
|
||||
else if (NS_UNCONSTRAINEDSIZE == mOuterReflowState.maxSize.width) {
|
||||
// We are unconstrained only when a table cell is reflowing
|
||||
// the block. Therefore don't bother with the indent until
|
||||
// the next reflow.
|
||||
width = 0;
|
||||
}
|
||||
else {
|
||||
width = mOuterReflowState.maxSize.width;
|
||||
}
|
||||
indent = nscoord(text->mTextIndent.GetPercentValue() * width);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user