зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 388183 (Reloading this testcase causes crash [@
nsHTMLDocument::ChangeContentEditableCount] with null editor), now with correct whitespace. r/sr=jst.
This commit is contained in:
Родитель
29258f440f
Коммит
e6f858edf7
|
@ -3764,25 +3764,25 @@ nsHTMLDocument::ChangeContentEditableCount(nsIContent *aElement,
|
|||
nsCOMPtr<nsIEditor> editor;
|
||||
editorDocShell->GetEditor(getter_AddRefs(editor));
|
||||
if (editor) {
|
||||
nsCOMPtr<nsIDOMRange> range;
|
||||
rv = NS_NewRange(getter_AddRefs(range));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = range->SelectNode(node);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIInlineSpellChecker> spellChecker;
|
||||
rv = editor->GetInlineSpellChecker(PR_FALSE,
|
||||
getter_AddRefs(spellChecker));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (spellChecker) {
|
||||
rv = spellChecker->SpellCheckRange(range);
|
||||
nsCOMPtr<nsIDOMRange> range;
|
||||
rv = NS_NewRange(getter_AddRefs(range));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = range->SelectNode(node);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
nsCOMPtr<nsIInlineSpellChecker> spellChecker;
|
||||
rv = editor->GetInlineSpellChecker(PR_FALSE,
|
||||
getter_AddRefs(spellChecker));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (spellChecker) {
|
||||
rv = spellChecker->SpellCheckRange(range);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -3832,9 +3832,9 @@ nsHTMLDocument::TurnEditingOff()
|
|||
editorDocShell->GetEditor(getter_AddRefs(editor));
|
||||
nsCOMPtr<nsIEditorStyleSheets> editorss = do_QueryInterface(editor);
|
||||
if (editorss) {
|
||||
editorss->RemoveOverrideStyleSheet(NS_LITERAL_STRING("resource:/res/contenteditable.css"));
|
||||
editorss->RemoveOverrideStyleSheet(NS_LITERAL_STRING("resource:/res/contenteditable.css"));
|
||||
if (mEditingState == eDesignMode)
|
||||
editorss->RemoveOverrideStyleSheet(NS_LITERAL_STRING("resource:/res/designmode.css"));
|
||||
editorss->RemoveOverrideStyleSheet(NS_LITERAL_STRING("resource:/res/designmode.css"));
|
||||
}
|
||||
|
||||
if (mEditingState == eDesignMode) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче