From b05b4b2e35cf6a184c513640d86479409e14e01c Mon Sep 17 00:00:00 2001 From: "vladimir%pobox.com" Date: Tue, 1 May 2007 04:58:44 +0000 Subject: [PATCH] b=379328, focus outline rendering regression fix --- layout/base/nsCSSRendering.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp index ed1b699cc3b..383db18bb31 100644 --- a/layout/base/nsCSSRendering.cpp +++ b/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