mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 07:01:19 +00:00
Bug 805745. Re-get the view after calling PaintWindow because it can flush (via WillPaint). r=mattwoodrow
This commit is contained in:
parent
2b6e68c2d7
commit
65fa296251
@ -1051,10 +1051,17 @@ nsView::WillPaintWindow(nsIWidget* aWidget, bool aWillSendDidPaint)
|
||||
bool
|
||||
nsView::PaintWindow(nsIWidget* aWidget, nsIntRegion aRegion, uint32_t aFlags)
|
||||
{
|
||||
NS_ASSERTION(this == nsView::GetViewFor(aWidget), "wrong view for widget?");
|
||||
|
||||
mInAlternatePaint = aFlags & PAINT_IS_ALTERNATE;
|
||||
nsCOMPtr<nsViewManager> vm = mViewManager;
|
||||
bool result = vm->PaintWindow(aWidget, aRegion, aFlags);
|
||||
mInAlternatePaint = false;
|
||||
// PaintWindow can destroy this via WillPaintWindow notification, so we have
|
||||
// to re-get the view from the widget.
|
||||
nsView* view = nsView::GetViewFor(aWidget);
|
||||
if (view) {
|
||||
view->mInAlternatePaint = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user