Bug 664095 - Remove the override stylesheets when the editor is detached from the document as opposed to when it's destroyed for compatibility with the expected behavior from Composer; r=ehsan

This commit is contained in:
Wolfgang Germund 2011-06-24 13:55:43 -04:00
Родитель 0a4e1c65d1
Коммит 79de56f93d
1 изменённых файлов: 5 добавлений и 5 удалений

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

@ -168,11 +168,6 @@ nsHTMLEditor::~nsHTMLEditor()
// free any default style propItems
RemoveAllDefaultProperties();
while (mStyleSheetURLs.Length())
{
RemoveOverrideStyleSheet(mStyleSheetURLs[0]);
}
if (mLinkHandler && mDocWeak)
{
nsCOMPtr<nsIPresShell> ps = GetPresShell();
@ -359,6 +354,11 @@ nsHTMLEditor::PreDestroy(PRBool aDestroyingFrames)
document->RemoveMutationObserver(this);
}
while (mStyleSheetURLs.Length())
{
RemoveOverrideStyleSheet(mStyleSheetURLs[0]);
}
return nsPlaintextEditor::PreDestroy(aDestroyingFrames);
}