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

This commit is contained in:
Boris Zbarsky 2011-12-23 22:52:23 -05:00
parent 022195c2f6
commit e269b6c862
3 changed files with 5 additions and 4 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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.