Bug 598482 part 14. Rename IsRefreshEnabled to IsPaintingAllowed. r=roc
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 23 Dec 2011 22:52:23 -0500
changeset 84528 a353425564823a2cd13d02b96a194c2513fcb23e
parent 84527 d7dcde1032edd13519723092621a9fa0c4dd2138
child 84529 6d9721de770c41005b74cd6d7623cfd32ce29c60
push id21854
push userbmo@edmorley.co.uk
push dateSun, 15 Jan 2012 11:56:28 +0000
treeherdermozilla-central@823072af2430 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs598482
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 598482 part 14. Rename IsRefreshEnabled to IsPaintingAllowed. r=roc
view/src/nsView.cpp
view/src/nsViewManager.cpp
view/src/nsViewManager.h
--- a/view/src/nsView.cpp
+++ b/view/src/nsView.cpp
@@ -360,17 +360,17 @@ void nsIView::SetInvalidationDimensions(
 }
 
 void nsView::ResetWidgetBounds(bool aRecurse, bool aMoveOnly,
                                bool aInvalidateChangedSize) {
   if (mWindow) {
     // Don't change widget geometry while refresh is disabled, for example
     // during reflow. Changing widget sizes can cause synchronous painting
     // which is forbidden during reflow.
-    if (!mViewManager->IsRefreshEnabled()) {
+    if (!mViewManager->IsPaintingAllowed()) {
       mViewManager->PostPendingUpdate();
       return;
     }
 
     DoResetWidgetBounds(aMoveOnly, aInvalidateChangedSize);
   } else if (aRecurse) {
     // reposition any widgets under this view
     for (nsView* v = GetFirstChild(); v; v = v->GetNextSibling()) {
--- a/view/src/nsViewManager.cpp
+++ b/view/src/nsViewManager.cpp
@@ -763,18 +763,19 @@ NS_IMETHODIMP nsViewManager::DispatchEve
         NS_ASSERTION(static_cast<nsView*>(aView) ==
                        nsView::GetViewFor(event->widget),
                      "view/widget mismatch");
 
         // The region is in device units, and it's in the coordinate space of
         // its associated widget.
 
         // Refresh the view
-        NS_ASSERTION(IsRefreshEnabled(),
-            "shouldn't be receiving paint events while refresh is disabled!");
+        NS_ASSERTION(IsPaintingAllowed(),
+                     "shouldn't be receiving paint events while painting is "
+                     "disallowed!");
         nsRefPtr<nsViewManager> rootVM = RootViewManager();
 
         // If an ancestor widget was hidden and then shown, we could
         // have a delayed resize to handle.
         bool didResize = false;
         for (nsViewManager *vm = this; vm;
              vm = vm->mRootView->GetParent()
                     ? vm->mRootView->GetParent()->GetViewManager()
--- a/view/src/nsViewManager.h
+++ b/view/src/nsViewManager.h
@@ -200,17 +200,17 @@ private:
 
   nsresult UpdateView(nsIView *aView, const nsRect &aRect);
 
 public: // NOT in nsIViewManager, so private to the view module
   nsView* GetRootViewImpl() const { return mRootView; }
   nsViewManager* RootViewManager() const { return mRootViewManager; }
   bool IsRootVM() const { return this == RootViewManager(); }
 
-  bool IsRefreshEnabled() { return RootViewManager()->mUpdateBatchCnt == 0; }
+  bool IsPaintingAllowed() { return RootViewManager()->mUpdateBatchCnt == 0; }
 
   // Call this when you need to let the viewmanager know that it now has
   // pending updates.
   void PostPendingUpdate();
 
   PRUint32 AppUnitsPerDevPixel() const
   {
     return mContext->AppUnitsPerDevPixel();