mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
cd364e6404
commit
c0069f01f3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user