зеркало из https://github.com/mozilla/pjs.git
Bug 598482 part 14. Rename IsRefreshEnabled to IsPaintingAllowed. r=roc
This commit is contained in:
Родитель
69a59caff8
Коммит
e47284706f
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче