From 8868105831c9dd4c57b5aa845ed9b64869d30be7 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Thu, 3 Feb 2011 21:45:32 +1300 Subject: [PATCH] Bug 622542. Ensure that the layer tree is updated after NS_DOCUMENT_STATE_WINDOW_INACTIVE has changed. r=tnikkel,a=blocking --- layout/base/nsPresShell.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index d9afe78b1489..4f2e0de44534 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -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(); } } }