Bug 1369949 - Don't expand the dirty rect for Mac native widget drawing.
MozReview-Commit-ID: ECYxnCTafdh
--- a/widget/cocoa/nsNativeThemeCocoa.mm
+++ b/widget/cocoa/nsNativeThemeCocoa.mm
@@ -2296,24 +2296,16 @@ nsNativeThemeCocoa::DrawWidgetBackground
gfx::Rect nativeDirtyRect = NSRectToRect(aDirtyRect, p2a);
gfxRect nativeWidgetRect(aRect.x, aRect.y, aRect.width, aRect.height);
nativeWidgetRect.ScaleInverse(gfxFloat(p2a));
float nativeWidgetHeight = round(nativeWidgetRect.Height());
nativeWidgetRect.Round();
if (nativeWidgetRect.IsEmpty())
return NS_OK; // Don't attempt to draw invisible widgets.
- // Bug 1059031 -
- // Quartz theme drawing often adjusts drawing rects, so make
- // sure our surface is big enough for that.
- // For example, DrawCellWithSnapping snaps the drawing rect, and that can
- // result in us drawing outside of what we thought the bounds were.
- // The 5 is just a guess of how much margin we need to handle that.
- nativeDirtyRect.Inflate(5);
-
AutoRestoreTransform autoRestoreTransform(&aDrawTarget);
bool hidpi = IsHiDPIContext(aFrame->PresContext());
if (hidpi) {
// Use high-resolution drawing.
nativeWidgetRect.Scale(0.5f);
nativeWidgetHeight *= 0.5f;
nativeDirtyRect.Scale(0.5f);