bug 53568

r=karnaze
a=waterson
migrating fix back from branch to tip
This commit is contained in:
buster%netscape.com 2000-09-28 23:20:55 +00:00
parent 74151def0d
commit 9d9af14195

View File

@ -213,7 +213,26 @@ HRuleFrame::Reflow(nsIPresContext* aPresContext,
else {
thickness = NSIntPixelsToTwips(DEFAULT_THICKNESS, p2t);
}
// fix up thickness based on noshade and mode. see bug 53568
// XXX: we really should query for the border thickness, and use that
// instead of the hardcoded "2"
if (eCompatibility_NavQuirks == mode)
{
nscoord adjustment = aReflowState.mComputedBorderPadding.top +
aReflowState.mComputedBorderPadding.bottom;
thickness += adjustment; // adjust for -moz-bg-inset
PRBool noShadeAttribute = GetNoShade();
if (thickness != onePixel)
{
if (!noShadeAttribute) {
thickness += onePixel;
}
}
}
// remember the computed thickness
mThickness = thickness;
NS_ASSERTION(mThickness>=0, "negative height calculated for HR");
// Compute height of "line" that hrule will layout within. Use the
// font-size to do this.