зеркало из https://github.com/mozilla/pjs.git
Disable antialiasing for border-collapse borders too, and fix a build warning by not passing what is now an integer through a float parameter. b=371182 r=vlad
This commit is contained in:
Родитель
cb892324d7
Коммит
f86df24f0b
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче