diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index 82affc48de6..c9a4ba69fb4 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -1719,6 +1719,7 @@ void nsCSSRendering::PaintBorder(nsPresContext* aPresContext, #ifdef MOZ_CAIRO_GFX gfxContext *ctx = (gfxContext*) aRenderingContext.GetNativeGraphicData(nsIRenderingContext::NATIVE_THEBES_CONTEXT); + gfxContext::AntialiasMode oldMode = ctx->CurrentAntialiasMode(); ctx->SetAntialiasMode(gfxContext::MODE_ALIASED); #endif @@ -1752,7 +1753,7 @@ void nsCSSRendering::PaintBorder(nsPresContext* aPresContext, } #ifdef MOZ_CAIRO_GFX - ctx->SetAntialiasMode(gfxContext::MODE_COVERAGE); + ctx->SetAntialiasMode(oldMode); #endif } @@ -4181,7 +4182,7 @@ nsCSSRendering::DrawTableBorderSegment(nsIRenderingContext& aContext, nscolor aBorderColor, const nsStyleBackground* aBGColor, const nsRect& aBorder, - float aPixelsToTwips, + PRInt32 aAppUnitsPerCSSPixel, PRUint8 aStartBevelSide, nscoord aStartBevelOffset, PRUint8 aEndBevelSide, @@ -4190,7 +4191,7 @@ nsCSSRendering::DrawTableBorderSegment(nsIRenderingContext& aContext, aContext.SetColor (aBorderColor); PRBool horizontal = ((NS_SIDE_TOP == aStartBevelSide) || (NS_SIDE_BOTTOM == aStartBevelSide)); - nscoord twipsPerPixel = NSIntPixelsToAppUnits(1, aPixelsToTwips); + nscoord twipsPerPixel = NSIntPixelsToAppUnits(1, aAppUnitsPerCSSPixel); PRBool ridgeGroove = NS_STYLE_BORDER_STYLE_RIDGE; if ((twipsPerPixel >= aBorder.width) || (twipsPerPixel >= aBorder.height) || @@ -4200,6 +4201,12 @@ nsCSSRendering::DrawTableBorderSegment(nsIRenderingContext& aContext, aEndBevelOffset = 0; } +#ifdef MOZ_CAIRO_GFX + gfxContext *ctx = (gfxContext*) aContext.GetNativeGraphicData(nsIRenderingContext::NATIVE_THEBES_CONTEXT); + gfxContext::AntialiasMode oldMode = ctx->CurrentAntialiasMode(); + ctx->SetAntialiasMode(gfxContext::MODE_ALIASED); +#endif + switch (aBorderStyle) { case NS_STYLE_BORDER_STYLE_NONE: case NS_STYLE_BORDER_STYLE_HIDDEN: @@ -4393,6 +4400,10 @@ nsCSSRendering::DrawTableBorderSegment(nsIRenderingContext& aContext, NS_ASSERTION(PR_FALSE, "Unexpected 'auto' table border"); break; } + +#ifdef MOZ_CAIRO_GFX + ctx->SetAntialiasMode(oldMode); +#endif } // End table border-collapsing section diff --git a/mozilla/layout/base/nsCSSRendering.h b/mozilla/layout/base/nsCSSRendering.h index 976e06d0396..2ff6b8a636e 100644 --- a/mozilla/layout/base/nsCSSRendering.h +++ b/mozilla/layout/base/nsCSSRendering.h @@ -207,7 +207,7 @@ public: nscolor aBorderColor, const nsStyleBackground* aBGColor, const nsRect& aBorderRect, - float aPixelsToTwips, + PRInt32 aAppUnitsPerCSSPixel, PRUint8 aStartBevelSide = 0, nscoord aStartBevelOffset = 0, PRUint8 aEndBevelSide = 0, diff --git a/mozilla/layout/reftests/pixel-rounding/reftest.list b/mozilla/layout/reftests/pixel-rounding/reftest.list index fdb9ebaf903..e281dc9145d 100644 --- a/mozilla/layout/reftests/pixel-rounding/reftest.list +++ b/mozilla/layout/reftests/pixel-rounding/reftest.list @@ -80,8 +80,8 @@ fails-if(MOZ_WIDGET_TOOLKIT=="gtk2") == background-image-width-left-5.html backg fails-if(MOZ_WIDGET_TOOLKIT=="windows") == background-image-width-left-6.html background-image-width-6.html # bug 371316 -# These all fail due to any of bug 371182, bug 155955, and maybe also -# bug 371180, plus a bunch of other bugs that ought to be filed. +# These all fail due to bug 155955, and maybe also bug 371180, plus a +# bunch of other bugs that ought to be filed. fails == collapsed-border-height-4.html border-base-ref.html fails == collapsed-border-height-5.html border-height-10-ref.html fails == collapsed-border-height-6.html border-height-10-ref.html diff --git a/mozilla/layout/reftests/table-width/reftest.list b/mozilla/layout/reftests/table-width/reftest.list index 7d37991b9d0..ef84f42ab97 100644 --- a/mozilla/layout/reftests/table-width/reftest.list +++ b/mozilla/layout/reftests/table-width/reftest.list @@ -42,5 +42,5 @@ == percent-basis.html percent-basis-ref.html fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == default-box-sizing-separate-standards.html default-box-sizing-separate-standards-ref.html # bug 361523 fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == default-box-sizing-separate-quirks.html default-box-sizing-separate-quirks-ref.html # bug 361523 -fails == default-box-sizing-collapse-standards.html default-box-sizing-collapse-standards-ref.html # bug 155955, bug 371180, bug 371182 -fails == default-box-sizing-collapse-quirks.html default-box-sizing-collapse-quirks-ref.html # bug 371180, bug 371182 +fails == default-box-sizing-collapse-standards.html default-box-sizing-collapse-standards-ref.html # bug 155955, bug 371180 +fails == default-box-sizing-collapse-quirks.html default-box-sizing-collapse-quirks-ref.html # bug 371180