From 088f0a4ab1b36cd4379ffca7ce6d862831553bc2 Mon Sep 17 00:00:00 2001 From: "reed%reedloden.com" Date: Wed, 20 Feb 2008 11:10:17 +0000 Subject: [PATCH] Back out patch from Theppitak Karoonboonyanan in bug 157546 due to test failures. git-svn-id: svn://10.0.0.236/trunk@246075 18797224-902f-48f8-a5cc-f745e15eee43 --- .../base/public/nsISelectionController.idl | 8 +- .../libeditor/text/nsPlaintextEditor.cpp | 5 - mozilla/layout/base/nsPresShell.cpp | 7 - mozilla/layout/forms/nsTextControlFrame.cpp | 8 - mozilla/layout/generic/nsFrameSelection.h | 6 - mozilla/layout/generic/nsSelection.cpp | 6 - mozilla/layout/generic/test/Makefile.in | 1 - .../generic/test/test_backspace_delete.html | 164 ------------------ 8 files changed, 1 insertion(+), 204 deletions(-) delete mode 100644 mozilla/layout/generic/test/test_backspace_delete.html diff --git a/mozilla/content/base/public/nsISelectionController.idl b/mozilla/content/base/public/nsISelectionController.idl index 0144db0e2af..b28f4cdd0a6 100644 --- a/mozilla/content/base/public/nsISelectionController.idl +++ b/mozilla/content/base/public/nsISelectionController.idl @@ -51,7 +51,7 @@ interface nsIDOMNode; interface nsISelection; interface nsISelectionDisplay; -[scriptable, uuid(80d2e85a-4ad2-45be-88e7-8c1fe943ac4d)] +[scriptable, uuid(39429306-4c81-4d8b-9421-eb7d9f43bfd0)] interface nsISelectionController : nsISelectionDisplay { const short SELECTION_NONE=0; @@ -154,12 +154,6 @@ interface nsISelectionController : nsISelectionDisplay */ void characterMove(in boolean forward, in boolean extend); - /** CharacterExtendForDelete will extend the selection one character cell - * forward in the document. - * this method is used internally for handling del key. - */ - [noscript] void characterExtendForDelete(); - /** WordMove will move the selection one word forward/backward in the document. * this will also have the effect of collapsing the selection if the aExtend = PR_FALSE * the "point" of selection that is extended is considered the "focus" point. diff --git a/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp b/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp index 999a340ecec..ea2188d4aa0 100644 --- a/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp +++ b/mozilla/editor/libeditor/text/nsPlaintextEditor.cpp @@ -678,7 +678,6 @@ NS_IMETHODIMP nsPlaintextEditor::DeleteSelection(nsIEditor::EDirection aAction) // This needs to happen inside selection batching, // otherwise the deleted text is autocopied to the clipboard. if (aAction == eNextWord || aAction == ePreviousWord - || (aAction == eNext && bCollapsed) || aAction == eToBeginningOfLine || aAction == eToEndOfLine) { nsCOMPtr selCont (do_QueryReferent(mSelConWeak)); @@ -697,10 +696,6 @@ NS_IMETHODIMP nsPlaintextEditor::DeleteSelection(nsIEditor::EDirection aAction) result = selCont->WordExtendForDelete(PR_FALSE); aAction = eNone; break; - case eNext: - result = selCont->CharacterExtendForDelete(); - aAction = eNone; - break; case eToBeginningOfLine: selCont->IntraLineMove(PR_TRUE, PR_FALSE); // try to move to end result = selCont->IntraLineMove(PR_FALSE, PR_TRUE); // select to beginning diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index 09730b5f339..eb121749a92 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -927,7 +927,6 @@ public: // nsISelectionController NS_IMETHOD CharacterMove(PRBool aForward, PRBool aExtend); - NS_IMETHOD CharacterExtendForDelete(); NS_IMETHOD WordMove(PRBool aForward, PRBool aExtend); NS_IMETHOD WordExtendForDelete(PRBool aForward); NS_IMETHOD LineMove(PRBool aForward, PRBool aExtend); @@ -2717,12 +2716,6 @@ PresShell::CharacterMove(PRBool aForward, PRBool aExtend) return mSelection->CharacterMove(aForward, aExtend); } -NS_IMETHODIMP -PresShell::CharacterExtendForDelete() -{ - return mSelection->CharacterExtendForDelete(); -} - NS_IMETHODIMP PresShell::WordMove(PRBool aForward, PRBool aExtend) { diff --git a/mozilla/layout/forms/nsTextControlFrame.cpp b/mozilla/layout/forms/nsTextControlFrame.cpp index 0820e1da0fe..5c0fb4ea5e4 100644 --- a/mozilla/layout/forms/nsTextControlFrame.cpp +++ b/mozilla/layout/forms/nsTextControlFrame.cpp @@ -581,7 +581,6 @@ public: NS_IMETHOD GetCaretEnabled(PRBool *_retval); NS_IMETHOD SetCaretVisibilityDuringSelection(PRBool aVisibility); NS_IMETHOD CharacterMove(PRBool aForward, PRBool aExtend); - NS_IMETHOD CharacterExtendForDelete(); NS_IMETHOD WordMove(PRBool aForward, PRBool aExtend); NS_IMETHOD WordExtendForDelete(PRBool aForward); NS_IMETHOD LineMove(PRBool aForward, PRBool aExtend); @@ -795,13 +794,6 @@ nsTextInputSelectionImpl::CharacterMove(PRBool aForward, PRBool aExtend) return NS_ERROR_NULL_POINTER; } -NS_IMETHODIMP -nsTextInputSelectionImpl::CharacterExtendForDelete() -{ - if (mFrameSelection) - return mFrameSelection->CharacterExtendForDelete(); - return NS_ERROR_NULL_POINTER; -} NS_IMETHODIMP nsTextInputSelectionImpl::WordMove(PRBool aForward, PRBool aExtend) diff --git a/mozilla/layout/generic/nsFrameSelection.h b/mozilla/layout/generic/nsFrameSelection.h index fec50dfa526..394cfe87203 100644 --- a/mozilla/layout/generic/nsFrameSelection.h +++ b/mozilla/layout/generic/nsFrameSelection.h @@ -409,12 +409,6 @@ public: /*unsafe*/ nsresult CharacterMove(PRBool aForward, PRBool aExtend); - /** CharacterExtendForDelete extends the selection forward (logically) to - * the next character cell, so that the selected cell can be deleted. - */ - /*unsafe*/ - nsresult CharacterExtendForDelete(); - /** WordMove will generally be called from the nsiselectioncontroller implementations. * the effect being the selection will move one word left or right. * @param aForward move forward in document. diff --git a/mozilla/layout/generic/nsSelection.cpp b/mozilla/layout/generic/nsSelection.cpp index bbf80d5e77a..ac3f5865b15 100644 --- a/mozilla/layout/generic/nsSelection.cpp +++ b/mozilla/layout/generic/nsSelection.cpp @@ -2772,12 +2772,6 @@ nsFrameSelection::CharacterMove(PRBool aForward, PRBool aExtend) return MoveCaret(nsIDOMKeyEvent::DOM_VK_LEFT,aExtend,eSelectCharacter); } -nsresult -nsFrameSelection::CharacterExtendForDelete() -{ - return MoveCaret(nsIDOMKeyEvent::DOM_VK_DELETE, PR_TRUE, eSelectCharacter); -} - nsresult nsFrameSelection::WordMove(PRBool aForward, PRBool aExtend) { diff --git a/mozilla/layout/generic/test/Makefile.in b/mozilla/layout/generic/test/Makefile.in index c705c6fe2bd..10e8e30260a 100644 --- a/mozilla/layout/generic/test/Makefile.in +++ b/mozilla/layout/generic/test/Makefile.in @@ -61,7 +61,6 @@ _TEST_FILES = test_bug288789.html \ test_bug405178.html \ test_character_movement.html \ test_word_movement.html \ - test_backspace_delete.html \ $(NULL) libs:: $(_TEST_FILES) diff --git a/mozilla/layout/generic/test/test_backspace_delete.html b/mozilla/layout/generic/test/test_backspace_delete.html deleted file mode 100644 index 06e2b1d001c..00000000000 --- a/mozilla/layout/generic/test/test_backspace_delete.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - Test BackSpace/Delete Keys - - - - - - - -

-
-
-
-

Catch-all -

-
-
- -