Backing out bug 151375 for now, because of scrolling regressions in HTML and XUL listboxes and comboboxes

git-svn-id: svn://10.0.0.236/trunk@159268 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
aaronleventhal%moonset.net
2004-07-15 18:57:47 +00:00
parent 625e62f911
commit aac51e9f0b
44 changed files with 313 additions and 270 deletions

View File

@@ -2093,17 +2093,39 @@ nscoord width;
}
}
// This if control whether the outline paints on the inside
// or outside of the frame
// XXX This is temporary fix for nsbeta3+ Bug 48973
// so we can use "mozoutline
#if 0 // outside
nsRect inside(aBorderArea);
nsRect outside(inside);
outside.Inflate(width, width);
inside.Inflate(width, width);
nsRect clipRect(aBorderArea);
clipRect.Inflate(width, width); // make clip extra big for now
#else // inside
nsMargin borderWidth;
aBorderStyle.GetBorder(borderWidth);
nsRect outside(aBorderArea);
outside.Deflate(borderWidth);
nsRect inside(outside);
inside.Deflate(width, width);
nsRect clipRect(outside);
#endif
aRenderingContext.PushState();
aRenderingContext.SetClipRect(clipRect, nsClipCombine_kReplace);
// rounded version of the border
for(i=0;i<4;i++){
if(borderRadii[i] > 0){
PaintRoundedBorder(aPresContext,aRenderingContext,aForFrame,aDirtyRect,aBorderArea,nsnull,&aOutlineStyle,aStyleContext,aSkipSides,borderRadii,aGap,PR_TRUE);
aRenderingContext.PopState();
return;
}
}
@@ -2115,6 +2137,7 @@ nscoord width;
(outlineStyle == NS_STYLE_BORDER_STYLE_DASHED)) {
DrawDashedSides(0, aRenderingContext, aDirtyRect, ourColor, nsnull, &aOutlineStyle, PR_TRUE,
outside, inside, aSkipSides, aGap);
aRenderingContext.PopState();
return;
}
@@ -2169,6 +2192,8 @@ nscoord width;
aRenderingContext.SetPenMode(nsPenMode_kNone);
}
}
// Restore clipping
aRenderingContext.PopState();
}
/* draw the edges of the border described in aBorderEdges one segment at a time.