Bug 287707 - After page had designmode on, there are still several issues, r=daniel, sr=peterv

This commit is contained in:
martijn.martijn%gmail.com 2006-09-01 09:32:57 +00:00
Родитель d86daa7496
Коммит 70166789c6
2 изменённых файлов: 13 добавлений и 2 удалений

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

@ -192,7 +192,10 @@ nsDocShellEditorData::SetEditor(nsIEditor *inEditor)
mEditor = inEditor; // owning addref
}
if (!inEditor)
mMakeEditable = PR_FALSE;
return NS_OK;
}

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

@ -183,10 +183,18 @@ nsHTMLEditor::~nsHTMLEditor()
if (mResizedObject)
HideResizers();
nsCOMPtr<nsISelectionController> selCon;
nsresult result = GetSelectionController(getter_AddRefs(selCon));
if (NS_SUCCEEDED(result) && selCon)
{
selCon->SetSelectionFlags(
nsISelectionDisplay::DISPLAY_TEXT | nsISelectionDisplay::DISPLAY_IMAGES);
}
//the autopointers will clear themselves up.
//but we need to also remove the listeners or we have a leak
nsCOMPtr<nsISelection>selection;
nsresult result = GetSelection(getter_AddRefs(selection));
result = GetSelection(getter_AddRefs(selection));
// if we don't get the selection, just skip this
if (NS_SUCCEEDED(result) && selection)
{