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
Родитель 69a59caff8
Коммит e47284706f
3 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

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

Просмотреть файл

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

Просмотреть файл

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