diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp index 5fc4319a18fd..b1b80dcd6ce3 100644 --- a/dom/html/nsHTMLDocument.cpp +++ b/dom/html/nsHTMLDocument.cpp @@ -2339,20 +2339,6 @@ nsHTMLDocument::TurnEditingOff() mEditingState = eOff; - // Editor resets selection since it is being destroyed. But if focus is - // still into editable control, we have to initialize selection again. - nsFocusManager* fm = nsFocusManager::GetFocusManager(); - if (fm) { - Element* element = fm->GetFocusedElement(); - nsCOMPtr txtCtrl = do_QueryInterface(element); - if (txtCtrl) { - RefPtr textEditor = txtCtrl->GetTextEditor(); - if (textEditor) { - textEditor->ReinitializeSelection(*element); - } - } - } - return NS_OK; } diff --git a/editor/libeditor/EditorBase.cpp b/editor/libeditor/EditorBase.cpp index d25999584db9..a1468f52eda0 100644 --- a/editor/libeditor/EditorBase.cpp +++ b/editor/libeditor/EditorBase.cpp @@ -4799,23 +4799,6 @@ EditorBase::FinalizeSelection() return NS_OK; } -void -EditorBase::ReinitializeSelection(Element& aElement) -{ - if (NS_WARN_IF(Destroyed())) { - return; - } - - OnFocus(&aElement); - - nsPresContext* context = GetPresContext(); - if (NS_WARN_IF(!context)) { - return; - } - nsCOMPtr focusedContent = GetFocusedContentForIME(); - IMEStateManager::OnFocusInEditor(context, focusedContent, *this); -} - Element* EditorBase::GetEditorRoot() { diff --git a/editor/libeditor/EditorBase.h b/editor/libeditor/EditorBase.h index e520a2bc39e2..8fca83b08a16 100644 --- a/editor/libeditor/EditorBase.h +++ b/editor/libeditor/EditorBase.h @@ -672,14 +672,6 @@ public: */ void SyncRealTimeSpell(); - /** - * This method re-initializes the selection and caret state that are for - * current editor state. When editor session is destroyed, it always reset - * selection state even if this has no focus. So if destroying editor, - * we have to call this method for focused editor to set selection state. - */ - void ReinitializeSelection(Element& aElement); - protected: // May be called by friends. /**************************************************************************** * Some classes like TextEditRules, HTMLEditRules, WSRunObject which are diff --git a/editor/reftests/1443902-1-ref.html b/editor/reftests/1443902-1-ref.html deleted file mode 100644 index 5c15f399bb22..000000000000 --- a/editor/reftests/1443902-1-ref.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - diff --git a/editor/reftests/1443902-1.html b/editor/reftests/1443902-1.html deleted file mode 100644 index e6c133d0a49c..000000000000 --- a/editor/reftests/1443902-1.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/editor/reftests/1443902-2-ref.html b/editor/reftests/1443902-2-ref.html deleted file mode 100644 index 727ed76ea9b9..000000000000 --- a/editor/reftests/1443902-2-ref.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - -
- -
- - diff --git a/editor/reftests/1443902-2.html b/editor/reftests/1443902-2.html deleted file mode 100644 index 125057fcec7f..000000000000 --- a/editor/reftests/1443902-2.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - -
- -
- - diff --git a/editor/reftests/1443902-3-ref.html b/editor/reftests/1443902-3-ref.html deleted file mode 100644 index 1dd669016bb7..000000000000 --- a/editor/reftests/1443902-3-ref.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - -
- -
- - diff --git a/editor/reftests/1443902-3.html b/editor/reftests/1443902-3.html deleted file mode 100644 index 9fffb644b72f..000000000000 --- a/editor/reftests/1443902-3.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - -
- -
- - diff --git a/editor/reftests/1443902-4-ref.html b/editor/reftests/1443902-4-ref.html deleted file mode 100644 index ab360866ccf6..000000000000 --- a/editor/reftests/1443902-4-ref.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - -
- -
- - - diff --git a/editor/reftests/1443902-4.html b/editor/reftests/1443902-4.html deleted file mode 100644 index 6aacfd635664..000000000000 --- a/editor/reftests/1443902-4.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - -
- -
- - - diff --git a/editor/reftests/reftest.list b/editor/reftests/reftest.list index 8500554a6ef1..2c77901be68f 100644 --- a/editor/reftests/reftest.list +++ b/editor/reftests/reftest.list @@ -135,7 +135,3 @@ needs-focus == spellcheck-contenteditable-focused-reframe.html spellcheck-conten needs-focus == 969773.html 969773-ref.html fuzzy-if(skiaContent,1,220) == 997805.html 997805-ref.html fuzzy-if(skiaContent,1,220) skip-if(verify&&OSX) == 1088158.html 1088158-ref.html -needs-focus == 1443902-1.html 1443902-1-ref.html -needs-focus == 1443902-2.html 1443902-2-ref.html -needs-focus == 1443902-3.html 1443902-3-ref.html -needs-focus == 1443902-4.html 1443902-4-ref.html