diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index 0c8f09063d7..4a5891d035f 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/layout/base/nsCSSRendering.cpp @@ -1627,6 +1627,7 @@ void nsCSSRendering::PaintBorder(nsPresContext* aPresContext, PRInt16 borderRadii[4],i; float percent; nsCompatibility compatMode = aPresContext->CompatibilityMode(); + PRBool forceSolid; // Check to see if we have an appearance defined. If so, we let the theme // renderer draw the border. DO not get the data from aForFrame, since the passed in style context @@ -1798,8 +1799,19 @@ void nsCSSRendering::PaintBorder(nsPresContext* aPresContext, static PRUint8 sideOrder[] = { NS_SIDE_BOTTOM, NS_SIDE_LEFT, NS_SIDE_TOP, NS_SIDE_RIGHT }; nscolor sideColor; nsBorderColors* compositeColors = nsnull; + for (cnt = 0; cnt < 4; cnt++) { PRUint8 side = sideOrder[cnt]; + + + // If a side needs a double border but will be less than two pixels, + // force it to be solid (see bug 1781). + if (aBorderStyle.GetBorderStyle(side) == NS_STYLE_BORDER_STYLE_DOUBLE) { + nscoord widths[] = { border.bottom, border.left, border.top, border.right }; + forceSolid = (widths[side]/twipsPerPixel < 2); + } else + forceSolid = PR_FALSE; + if (0 == (aSkipSides & (1<mBackgroundColor :