Bug 1369949 - Don't expand the dirty rect for Mac native widget drawing. draft
authorMarkus Stange <mstange@themasta.com>
Tue, 06 Jun 2017 14:47:14 -0400
changeset 589842 df1372d65f98f316fe53434b57db39de34d464a0
parent 589841 958f020370b88fc589c0d55a36462cce74479c3e
child 589843 c8b4cf3de7245a4d07e1120d580db74a7cdf7793
push id62544
push userbmo:mstange@themasta.com
push dateTue, 06 Jun 2017 23:28:54 +0000
bugs1369949
milestone55.0a1
Bug 1369949 - Don't expand the dirty rect for Mac native widget drawing. MozReview-Commit-ID: ECYxnCTafdh
widget/cocoa/nsNativeThemeCocoa.mm
--- 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);