Commit e269b6c8 authored by Boris Zbarsky's avatar Boris Zbarsky
Browse files

Bug 598482 part 14. Rename IsRefreshEnabled to IsPaintingAllowed. r=roc

parent 022195c2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -365,7 +365,7 @@ void nsView::ResetWidgetBounds(bool aRecurse, bool aMoveOnly,
    // 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;
    }
+3 −2
Original line number Diff line number Diff line
@@ -768,8 +768,9 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent,
        // 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
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ public: // NOT in nsIViewManager, so private to the view module
  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.