diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index ed1b699cc3b..383db18bb31 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -2356,18 +2356,19 @@ nsCSSRendering::PaintOutline(nsPresContext* aPresContext, oRect.size.width - (2*width) / (2.0 * twipsPerPixel), oRect.size.height - (2*width) / (2.0 * twipsPerPixel)); - // default to current color in case it is invert color - // and the platform does not support that - nscolor outlineColor(ourColor->mColor); + nscolor outlineColor; + + // PR_FALSE means use the initial color; PR_TRUE means a color was + // set. + if (!aOutlineStyle.GetOutlineColor(outlineColor)) + outlineColor = ourColor->mColor; + + PRUint8 outlineStyle = aOutlineStyle.GetOutlineStyle(); // grab the thebes context nsRefPtr ctx = (gfxContext*) aRenderingContext.GetNativeGraphicData(nsIRenderingContext::NATIVE_THEBES_CONTEXT); - PRUint8 outlineStyle = aOutlineStyle.GetOutlineStyle(); - if (!aOutlineStyle.GetOutlineColor(outlineColor)) - return; - ctx->Save(); // Clamp the CTM to be pixel-aligned; we do this only