Bug 813024. Restore mTemporarilyUseBasicLayerManager to the previous value instead of setting it to false when using an AutoUseBasicLayerManager object. r=roc

This commit is contained in:
Timothy Nikkel 2012-12-17 00:35:39 -06:00
parent d0b8e98f50
commit a2a6bf4cc7
2 changed files with 5 additions and 1 deletions

View File

@ -761,12 +761,15 @@ nsBaseWidget::AutoLayerManagerSetup::~AutoLayerManagerSetup()
nsBaseWidget::AutoUseBasicLayerManager::AutoUseBasicLayerManager(nsBaseWidget* aWidget)
: mWidget(aWidget)
{
mPreviousTemporarilyUseBasicLayerManager =
mWidget->mTemporarilyUseBasicLayerManager;
mWidget->mTemporarilyUseBasicLayerManager = true;
}
nsBaseWidget::AutoUseBasicLayerManager::~AutoUseBasicLayerManager()
{
mWidget->mTemporarilyUseBasicLayerManager = false;
mWidget->mTemporarilyUseBasicLayerManager =
mPreviousTemporarilyUseBasicLayerManager;
}
bool

View File

@ -226,6 +226,7 @@ public:
~AutoUseBasicLayerManager();
private:
nsBaseWidget* mWidget;
bool mPreviousTemporarilyUseBasicLayerManager;
};
friend class AutoUseBasicLayerManager;