mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
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:
parent
50259b5af5
commit
8868105831
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user