When invalidating the canvas, do a DEFERRED view batch to prevent us entering reflow under frame construction. Bug 402713, r+sr=roc, a=schrep

This commit is contained in:
bzbarsky@mit.edu 2007-11-11 11:09:45 -08:00
Родитель 89ecb9cd7d
Коммит 50b5d2c559
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -9927,8 +9927,14 @@ InvalidateCanvasIfNeeded(nsIFrame* aFrame)
} }
if (ancestor != aFrame) { if (ancestor != aFrame) {
// Wrap this in a DEFERRED view update batch so we don't try to
// flush out layout here
nsIViewManager* viewManager = presContext->GetViewManager();
viewManager->BeginUpdateViewBatch();
ApplyRenderingChangeToTree(presContext, ancestor, ApplyRenderingChangeToTree(presContext, ancestor,
nsChangeHint_RepaintFrame); nsChangeHint_RepaintFrame);
viewManager->EndUpdateViewBatch(NS_VMREFRESH_DEFERRED);
} }
} }