bug 105166 - additional patch to place rounding code in the right place. sr=attinasi.
git-svn-id: svn://10.0.0.236/trunk@107535 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -938,6 +938,14 @@ nsTableOuterFrame::OuterReflowChild(nsIPresContext* aPresContext,
|
||||
if (aAvailWidth) {
|
||||
availWidth = *aAvailWidth;
|
||||
}
|
||||
// work around pixel rounding errors, round down to ensure we don't exceed the avail height in
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
nscoord availHeight = aOuterRS.availableHeight;
|
||||
if (NS_UNCONSTRAINEDSIZE != availHeight) {
|
||||
availHeight = nsTableFrame::RoundToPixel(availHeight, p2t, eAlwaysRoundDown);
|
||||
}
|
||||
|
||||
nsHTMLReflowState childRS(aPresContext, aOuterRS, aChildFrame,
|
||||
nsSize(availWidth, aOuterRS.availableHeight));
|
||||
childRS.reason = aReflowReason;
|
||||
@@ -1469,15 +1477,6 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext* aPresContext,
|
||||
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aOuterRS);
|
||||
#endif
|
||||
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
|
||||
// work around pixel rounding errors, round down to ensure we don't exceed the avail height in
|
||||
nscoord availHeight = aOuterRS.availableHeight;
|
||||
if (NS_UNCONSTRAINEDSIZE != availHeight) {
|
||||
availHeight = nsTableFrame::RoundToPixel(availHeight, p2t, eAlwaysRoundDown);
|
||||
}
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
PRUint8 captionSide = GetCaptionSide();
|
||||
|
||||
|
||||
@@ -938,6 +938,14 @@ nsTableOuterFrame::OuterReflowChild(nsIPresContext* aPresContext,
|
||||
if (aAvailWidth) {
|
||||
availWidth = *aAvailWidth;
|
||||
}
|
||||
// work around pixel rounding errors, round down to ensure we don't exceed the avail height in
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
nscoord availHeight = aOuterRS.availableHeight;
|
||||
if (NS_UNCONSTRAINEDSIZE != availHeight) {
|
||||
availHeight = nsTableFrame::RoundToPixel(availHeight, p2t, eAlwaysRoundDown);
|
||||
}
|
||||
|
||||
nsHTMLReflowState childRS(aPresContext, aOuterRS, aChildFrame,
|
||||
nsSize(availWidth, aOuterRS.availableHeight));
|
||||
childRS.reason = aReflowReason;
|
||||
@@ -1469,15 +1477,6 @@ NS_METHOD nsTableOuterFrame::Reflow(nsIPresContext* aPresContext,
|
||||
nsTableFrame::DebugReflow(this, (nsHTMLReflowState&)aOuterRS);
|
||||
#endif
|
||||
|
||||
float p2t;
|
||||
aPresContext->GetScaledPixelsToTwips(&p2t);
|
||||
|
||||
// work around pixel rounding errors, round down to ensure we don't exceed the avail height in
|
||||
nscoord availHeight = aOuterRS.availableHeight;
|
||||
if (NS_UNCONSTRAINEDSIZE != availHeight) {
|
||||
availHeight = nsTableFrame::RoundToPixel(availHeight, p2t, eAlwaysRoundDown);
|
||||
}
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
PRUint8 captionSide = GetCaptionSide();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user