Bug 532878 - Call [super viewWillDraw] in viewWillDraw. r=josh
authorMarkus Stange <mstange@themasta.com>
Fri, 11 Dec 2009 20:31:42 +0100
changeset 35619 d193824b585528fef374c8756e1a599d94f840d0
parent 35618 31feefcad2cb4fc40a5c58282da9d851042d4189
child 35620 12d62a61c4463620ac69088d5d4fb41e73370072
push id10649
push usermstange@themasta.com
push dateSat, 12 Dec 2009 09:19:37 +0000
treeherdermozilla-central@d379a17cbf8f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjosh
bugs532878
milestone1.9.3a1pre
Bug 532878 - Call [super viewWillDraw] in viewWillDraw. r=josh
widget/src/cocoa/nsChildView.mm
--- a/widget/src/cocoa/nsChildView.mm
+++ b/widget/src/cocoa/nsChildView.mm
@@ -2660,21 +2660,21 @@ static const PRInt32 sShadowInvalidation
   CGContextSetLineWidth(aContext, 4.0);
   CGContextStrokeRect(aContext,
                       CGRectMake(aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height));
 #endif
 }
 
 - (void)viewWillDraw
 {
-  if (!mGeckoChild)
-    return;
-
-  nsPaintEvent paintEvent(PR_TRUE, NS_WILL_PAINT, mGeckoChild);
-  mGeckoChild->DispatchWindowEvent(paintEvent);
+  if (mGeckoChild) {
+    nsPaintEvent paintEvent(PR_TRUE, NS_WILL_PAINT, mGeckoChild);
+    mGeckoChild->DispatchWindowEvent(paintEvent);
+  }
+  [super viewWillDraw];
 }
 
 // Allows us to turn off setting up the clip region
 // before each drawRect. We already clip within gecko.
 - (BOOL)wantsDefaultClipping
 {
   return NO;
 }