mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 805745. Move the forced repaint from the Paint notification to the WillPaint notification. r=mattwoodrow
This commit is contained in:
parent
36be428d56
commit
80370ef686
@ -335,11 +335,6 @@ void nsViewManager::Refresh(nsView *aView, const nsIntRegion& aRegion,
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (aView->ForcedRepaint() && IsRefreshDriverPaintingEnabled()) {
|
||||
ProcessPendingUpdates();
|
||||
aView->SetForcedRepaint(false);
|
||||
}
|
||||
|
||||
nsIWidget *widget = aView->GetWidget();
|
||||
if (!widget) {
|
||||
@ -675,6 +670,19 @@ void nsViewManager::WillPaintWindow(nsIWidget* aWidget, bool aWillSendDidPaint)
|
||||
rootVM->ProcessPendingUpdates();
|
||||
}
|
||||
|
||||
if (aWidget && IsRefreshDriverPaintingEnabled()) {
|
||||
nsView* view = nsView::GetViewFor(aWidget);
|
||||
if (view && view->ForcedRepaint()) {
|
||||
ProcessPendingUpdates();
|
||||
// Re-get the view pointer here since the ProcessPendingUpdates might have
|
||||
// destroyed it during CallWillPaintOnObservers.
|
||||
view = nsView::GetViewFor(aWidget);
|
||||
if (view) {
|
||||
view->SetForcedRepaint(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPresShell> shell = mPresShell;
|
||||
if (shell) {
|
||||
shell->WillPaintWindow(aWillSendDidPaint);
|
||||
|
Loading…
Reference in New Issue
Block a user