Bug 1180966. Remove code that made no sense. r=mstange

Borders are rarely a single app unit tall and this code is
from long long ago (bug 41262)
This commit is contained in:
Jeff Muizelaar 2015-07-06 15:39:42 -04:00
parent cd364e6404
commit c0069f01f3

View File

@ -3702,29 +3702,13 @@ DrawSolidBorderSegment(nsRenderingContext& aContext,
ColorPattern color(ToDeviceColor(aColor));
DrawOptions drawOptions(1.f, CompositionOp::OP_OVER, AntialiasMode::NONE);
// We don't need to bevel single pixel borders
if ((aRect.width == aTwipsPerPixel) || (aRect.height == aTwipsPerPixel) ||
((0 == aStartBevelOffset) && (0 == aEndBevelOffset))) {
// simple line or rectangle
if ((NS_SIDE_TOP == aStartBevelSide) || (NS_SIDE_BOTTOM == aStartBevelSide)) {
if (1 == aRect.height)
StrokeLineWithSnapping(aRect.TopLeft(), aRect.BottomLeft(),
aAppUnitsPerDevPixel, *drawTarget,
color, StrokeOptions(), drawOptions);
else
drawTarget->FillRect(NSRectToSnappedRect(aRect, aAppUnitsPerDevPixel,
*drawTarget),
color, drawOptions);
}
else {
if (1 == aRect.width)
StrokeLineWithSnapping(aRect.TopLeft(), aRect.TopRight(),
aAppUnitsPerDevPixel, *drawTarget,
color, StrokeOptions(), drawOptions);
else
drawTarget->FillRect(NSRectToSnappedRect(aRect, aAppUnitsPerDevPixel,
*drawTarget),
color, drawOptions);
}
// simple rectangle
drawTarget->FillRect(NSRectToSnappedRect(aRect, aAppUnitsPerDevPixel,
*drawTarget),
color, drawOptions);
}
else {
// polygon with beveling