Bug 622542. Ensure that the layer tree is updated after NS_DOCUMENT_STATE_WINDOW_INACTIVE has changed. r=tnikkel,a=blocking

This commit is contained in:
Robert O'Callahan 2011-02-03 21:45:32 +13:00
Родитель 7ac602a836
Коммит 2c9293147f
1 изменённых файлов: 1 добавлений и 12 удалений

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

@ -4996,18 +4996,7 @@ PresShell::DocumentStatesChanged(nsIDocument* aDocument,
if (aStateMask.HasState(NS_DOCUMENT_STATE_WINDOW_INACTIVE)) {
nsIFrame* root = FrameManager()->GetRootFrame();
if (root) {
// It's a display root. So, invalidate the layer contents of
// everything we can find. We need to do this because the contents
// of controls etc can depend on whether the window is active,
// and when a window becomes (in)active it just gets repainted
// and we don't specifically invalidate each affected control.
nsIWidget* widget = root->GetNearestWidget();
if (widget) {
LayerManager* layerManager = widget->GetLayerManager();
if (layerManager) {
FrameLayerBuilder::InvalidateAllThebesLayerContents(layerManager);
}
}
root->InvalidateFrameSubtree();
}
}
}