зеркало из https://github.com/mozilla/pjs.git
Bug 287707 - After page had designmode on, there are still several issues, r=daniel, sr=peterv
This commit is contained in:
Родитель
d86daa7496
Коммит
70166789c6
|
@ -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)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче