Bug 598482 part 9 - Remove unused aIgnoreWidgetView argument. r=roc
authorMarkus Stange <mstange@themasta.com>
Fri, 23 Dec 2011 22:52:22 -0500
changeset 85748 ac01aec1a983a45baf0503608cc9998169ae7e96
parent 85747 61a1f0b288124bc6919e965834f31df253718311
child 85749 4616fa6c1dc7ffd22b9b177e0e909d3b7287b244
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs598482
milestone12.0a1
Bug 598482 part 9 - Remove unused aIgnoreWidgetView argument. r=roc
view/src/nsViewManager.cpp
view/src/nsViewManager.h
--- a/view/src/nsViewManager.cpp
+++ b/view/src/nsViewManager.cpp
@@ -428,17 +428,17 @@ void nsViewManager::ProcessPendingUpdate
              nearestViewWithWidget->GetParent()) {
         nearestViewWithWidget = nearestViewWithWidget->GetParent();
       }
       nsRegion r =
         ConvertRegionBetweenViews(*dirtyRegion, aView, nearestViewWithWidget);
       nsViewManager* widgetVM = nearestViewWithWidget->GetViewManager();
       widgetVM->
         UpdateWidgetArea(nearestViewWithWidget,
-                         nearestViewWithWidget->GetWidget(), r, nsnull);
+                         nearestViewWithWidget->GetWidget(), r);
       dirtyRegion->SetEmpty();
     }
   }
 }
 
 NS_IMETHODIMP nsViewManager::UpdateView(nsIView *aView)
 {
   // Mark the entire view as damaged
@@ -446,23 +446,20 @@ NS_IMETHODIMP nsViewManager::UpdateView(
 }
 
 /**
  * @param aWidget the widget for aWidgetView; in some cases the widget
  * is being managed directly by the frame system, so aWidgetView->GetWidget()
  * will return null but nsView::GetViewFor(aWidget) returns aWidgetview
  * @param aDamagedRegion this region, relative to aWidgetView, is invalidated in
  * every widget child of aWidgetView, plus aWidgetView's own widget
- * @param aIgnoreWidgetView if non-null, the aIgnoreWidgetView's widget and its
- * children are not updated.
  */
 void
 nsViewManager::UpdateWidgetArea(nsView *aWidgetView, nsIWidget* aWidget,
-                                const nsRegion &aDamagedRegion,
-                                nsView* aIgnoreWidgetView)
+                                const nsRegion &aDamagedRegion)
 {
   NS_ASSERTION(aWidgetView->GetViewManager() == this,
                "UpdateWidgetArea called on view we don't own");
 
 #if 0
   nsRect dbgBounds = aDamagedRegion.GetBounds();
   printf("UpdateWidgetArea view:%X (%d) widget:%X region: %d, %d, %d, %d\n",
     aWidgetView, aWidgetView->IsAttachedToTopLevel(),
@@ -496,21 +493,16 @@ nsViewManager::UpdateWidgetArea(nsView *
   // If the widget is hidden, it don't cover nothing
   if (aWidget) {
     bool visible;
     aWidget->IsVisible(visible);
     if (!visible)
       return;
   }
 
-  if (aWidgetView == aIgnoreWidgetView) {
-    // the widget for aIgnoreWidgetView (and its children) should be treated as already updated.
-    return;
-  }
-
   if (!aWidget) {
     // The root view or a scrolling view might not have a widget
     // (for example, during printing). We get here when we scroll
     // during printing to show selected options in a listbox, for example.
     return;
   }
 
   // Update all child widgets with the damage. In the process,
@@ -612,17 +604,17 @@ NS_IMETHODIMP nsViewManager::UpdateViewN
   // Propagate the update to the displayRoot, since iframes, for example,
   // can overlap each other and be translucent.  So we have to possibly
   // invalidate our rect in each of the widgets we have lying about.
   damagedRect.MoveBy(view->GetOffsetTo(displayRoot));
   PRInt32 rootAPD = displayRootVM->AppUnitsPerDevPixel();
   PRInt32 APD = AppUnitsPerDevPixel();
   damagedRect = damagedRect.ConvertAppUnitsRoundOut(APD, rootAPD);
   displayRootVM->UpdateWidgetArea(displayRoot, displayRoot->GetWidget(),
-                                  nsRegion(damagedRect), nsnull);
+                                  nsRegion(damagedRect));
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsViewManager::UpdateAllViews()
 {
   if (RootViewManager() != this) {
     return RootViewManager()->UpdateAllViews();
--- a/view/src/nsViewManager.h
+++ b/view/src/nsViewManager.h
@@ -154,18 +154,17 @@ private:
   /**
    * Call WillPaint() on all view observers under this vm root.
    */
   void CallWillPaintOnObservers(bool aWillSendDidPaint);
   void CallDidPaintOnObservers();
   void ReparentChildWidgets(nsIView* aView, nsIWidget *aNewWidget);
   void ReparentWidgets(nsIView* aView, nsIView *aParent);
   void UpdateWidgetArea(nsView *aWidgetView, nsIWidget* aWidget,
-                        const nsRegion &aDamagedRegion,
-                        nsView* aIgnoreWidgetView);
+                        const nsRegion &aDamagedRegion);
 
   void UpdateViews(nsView *aView);
 
   void TriggerRefresh();
 
   // aView is the view for aWidget and aRegion is relative to aWidget.
   void Refresh(nsView *aView, nsIWidget *aWidget, const nsIntRegion& aRegion);
   // aRootView is the view for aWidget, aRegion is relative to aRootView, and