зеркало из https://github.com/mozilla/pjs.git
Lookup the view again since WillPaint() might lead to its destruction. b=378273 r+sr=roc
This commit is contained in:
Родитель
1894ac7a93
Коммит
ab6e84a352
|
@ -1215,6 +1215,10 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
|
|||
BeginUpdateViewBatch();
|
||||
observer->WillPaint();
|
||||
EndUpdateViewBatch(NS_VMREFRESH_NO_SYNC);
|
||||
|
||||
// Get the view pointer again since the code above might have
|
||||
// destroyed it (bug 378273).
|
||||
view = nsView::GetViewFor(aEvent->widget);
|
||||
}
|
||||
}
|
||||
// Make sure to sync up any widget geometry changes we
|
||||
|
@ -1222,8 +1226,11 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
|
|||
if (rootVM->mHasPendingUpdates) {
|
||||
rootVM->ProcessPendingUpdates(mRootView, PR_FALSE);
|
||||
}
|
||||
Refresh(view, event->renderingContext, region,
|
||||
NS_VMREFRESH_DOUBLE_BUFFER);
|
||||
|
||||
if (view) {
|
||||
Refresh(view, event->renderingContext, region,
|
||||
NS_VMREFRESH_DOUBLE_BUFFER);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// since we got an NS_PAINT event, we need to
|
||||
|
|
Загрузка…
Ссылка в новой задаче