diff --git a/content/html/content/src/nsTextEditorState.cpp b/content/html/content/src/nsTextEditorState.cpp index 489b0002297c..a0be3a92fdac 100644 --- a/content/html/content/src/nsTextEditorState.cpp +++ b/content/html/content/src/nsTextEditorState.cpp @@ -82,13 +82,11 @@ struct SelectionState { class RestoreSelectionState : public nsRunnable { public: - RestoreSelectionState(nsTextEditorState *aState, nsTextControlFrame *aFrame, - PRInt32 aStart, PRInt32 aEnd) + RestoreSelectionState(nsTextControlFrame *aFrame, PRInt32 aStart, PRInt32 aEnd) : mFrame(aFrame), mWeakFrame(aFrame), mStart(aStart), - mEnd(aEnd), - mTextEditorState(aState) + mEnd(aEnd) { } @@ -98,7 +96,6 @@ public: // need to block script to avoid nested PrepareEditor calls (bug 642800). nsAutoScriptBlocker scriptBlocker; mFrame->SetSelectionRange(mStart, mEnd); - mTextEditorState->HideSelectionIfBlurred(); } return NS_OK; } @@ -108,7 +105,6 @@ private: nsWeakFrame mWeakFrame; PRInt32 mStart; PRInt32 mEnd; - nsTextEditorState* mTextEditorState; }; /*static*/ @@ -1389,7 +1385,7 @@ nsTextEditorState::PrepareEditor(const nsAString *aValue) // Restore our selection after being bound to a new frame if (mSelState) { - nsContentUtils::AddScriptRunner(new RestoreSelectionState(this, mBoundFrame, mSelState->mStart, mSelState->mEnd)); + nsContentUtils::AddScriptRunner(new RestoreSelectionState(mBoundFrame, mSelState->mStart, mSelState->mEnd)); mSelState = nsnull; } @@ -2015,16 +2011,6 @@ nsTextEditorState::SetPlaceholderClass(PRBool aVisible, classValue, aNotify); } -void -nsTextEditorState::HideSelectionIfBlurred() -{ - NS_ABORT_IF_FALSE(mSelCon, "Should have a selection controller if we have a frame!"); - nsCOMPtr content = do_QueryInterface(mTextCtrlElement); - if (!nsContentUtils::IsFocusedContent(content)) { - mSelCon->SetDisplaySelection(nsISelectionController::SELECTION_OFF); - } -} - NS_IMPL_ISUPPORTS1(nsAnonDivObserver, nsIMutationObserver) void diff --git a/content/html/content/src/nsTextEditorState.h b/content/html/content/src/nsTextEditorState.h index ec707dae03e0..e97154c5f7f5 100644 --- a/content/html/content/src/nsTextEditorState.h +++ b/content/html/content/src/nsTextEditorState.h @@ -210,8 +210,6 @@ public: void ClearValueCache() { mCachedValue.Truncate(); } - void HideSelectionIfBlurred(); - private: // not copy constructible nsTextEditorState(const nsTextEditorState&); diff --git a/layout/reftests/editor/reftest.list b/layout/reftests/editor/reftest.list index 9ac99591f856..69f7d2e4f330 100644 --- a/layout/reftests/editor/reftest.list +++ b/layout/reftests/editor/reftest.list @@ -60,5 +60,3 @@ fails-if(Android) != spellcheck-hyphen-multiple-invalid.html spellcheck-hyphen-m == caret_on_presshell_reinit.html caret_on_presshell_reinit-ref.html == caret_on_presshell_reinit-2.html caret_on_presshell_reinit-ref.html == 642800.html 642800-ref.html -== selection_visibility_after_reframe.html selection_visibility_after_reframe-ref.html -!= selection_visibility_after_reframe-2.html selection_visibility_after_reframe-ref.html diff --git a/layout/reftests/editor/selection_visibility_after_reframe-2.html b/layout/reftests/editor/selection_visibility_after_reframe-2.html deleted file mode 100644 index fb705cc36922..000000000000 --- a/layout/reftests/editor/selection_visibility_after_reframe-2.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/layout/reftests/editor/selection_visibility_after_reframe-ref.html b/layout/reftests/editor/selection_visibility_after_reframe-ref.html deleted file mode 100644 index c227b39c8f70..000000000000 --- a/layout/reftests/editor/selection_visibility_after_reframe-ref.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/layout/reftests/editor/selection_visibility_after_reframe.html b/layout/reftests/editor/selection_visibility_after_reframe.html deleted file mode 100644 index b05f130a1372..000000000000 --- a/layout/reftests/editor/selection_visibility_after_reframe.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - -