gecko-dev/editor/libeditor
Masayuki Nakano 834ab00aaa Bug 1503231 - Make TextEditor::DeleteSelectionAsAction() removes removing range information from EditAction when Selection is NOT collapsed r=m_kato
When Selection is NOT collapsed, we remove selected content.  Therefore,
web apps don't need to know range information of user operation.  However, web
apps may want to know direction of the operation (backward or forward).  E.g.,
web apps may just mark selected range as "deleted" and move caret before or
after the range.

Therefore, when computed EditAction is eDeleteWordBackward or
eDeleteToBeginningOfSoftLine, we should use eDeleteBackward instead.  When it
is eDeleteWordForward or eDeleteToEndOfSoftLine, we should use eDeleteForward
instead.

Note that only on Windows, we follow behavior of richtext control (and Word).
That is, Ctrl + Backspace/Delete collapse from start of selected range to
start/end of current word.  I.e., collapsing Selection to start first and
removing to start or end of current word is Windows's standard behavior.
Currently, we do this in DeleteSelectionAsSubAction() but every caller
specifies eNone to aDirection except DeleteSelectionAsAction().  So, we can
move this before re-computing EditAction in DeleteSelectionAsAction().

Differential Revision: https://phabricator.services.mozilla.com/D10992

--HG--
extra : moz-landing-system : lando
2018-11-07 08:38:15 +00:00
..
crashtests Bug 1451503 Move most reftest resources from chrome: to resource: r=kmag 2018-09-06 16:01:39 -07:00
tests Bug 1504379 - Add automated tests for nsIPlaintextEditor.insertLineBreak() r=m_kato 2018-11-06 03:47:38 +00:00
CSSEditUtils.cpp Bug 1465702 - part 5: Remove unnecessary Selection argument from editor module r=m_kato 2018-10-30 10:01:38 +00:00
CSSEditUtils.h
ChangeAttributeTransaction.cpp
ChangeAttributeTransaction.h
ChangeStyleTransaction.cpp
ChangeStyleTransaction.h
CompositionTransaction.cpp
CompositionTransaction.h
CreateElementTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
CreateElementTransaction.h
DeleteNodeTransaction.cpp Bug 1480663 - Make EditorBase::IsModifiableNode() non-virtual r=m_kato 2018-08-03 11:10:46 +00:00
DeleteNodeTransaction.h
DeleteRangeTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
DeleteRangeTransaction.h
DeleteTextTransaction.cpp Bug 1480663 - Make EditorBase::IsModifiableNode() non-virtual r=m_kato 2018-08-03 11:10:46 +00:00
DeleteTextTransaction.h
EditAction.h Bug 1503473 - part 4: Create a new path to handle Enter key press in TextEditor r=m_kato 2018-11-03 11:22:13 +00:00
EditActionListener.h
EditAggregateTransaction.cpp
EditAggregateTransaction.h
EditTransactionBase.cpp
EditTransactionBase.h
EditorBase.cpp Bug 1504131 - part 1: Remove DocumentResizeEventListener r=m_kato 2018-11-06 04:58:29 +00:00
EditorBase.h Bug 1503457 - Add some variation of EditAction values for composition r=m_kato 2018-11-01 08:07:04 +00:00
EditorCommands.cpp Bug 1503473 - part 1: Rename TextEditor::OnInputParagraphSeparator() and HTMLEditor::OnInputLineBreak() r=m_kato 2018-11-03 11:19:07 +00:00
EditorCommands.h
EditorController.cpp
EditorController.h Bug 1489790 - Part 8: Remove the XPCOM component registration for @mozilla.org/editor/editorcontroller;1; r=baku 2018-09-11 09:58:33 -04:00
EditorDOMPoint.h
EditorEventListener.cpp Bug 1497815 - Rename EditorEventListener::EnsureCommitCompoisition() to EditorEventListener::EnsureCommitComposition() r=m_kato 2018-10-11 09:12:15 +00:00
EditorEventListener.h Bug 1504131 - part 1: Remove DocumentResizeEventListener r=m_kato 2018-11-06 04:58:29 +00:00
EditorUtils.cpp Bug 1500862 - part 3: Change all stack base helper classes which access protected members of EditorBase to nested classes of EditorBase r=m_kato 2018-10-24 09:42:06 +00:00
EditorUtils.h Bug 1503473 - part 2: Make TextEditRules::WillInsertBreak() and HTMLEditRules::WillInsertBreak() return EditActionResult r=m_kato 2018-11-03 11:20:06 +00:00
HTMLAbsPositionEditor.cpp Bug 1504131 - part 3: Remove editor/libeditor/HTMLEditorObjectResizerUtils.h r=m_kato 2018-11-06 06:10:01 +00:00
HTMLAnonymousNodeEditor.cpp Bug 1465702 - part 5: Remove unnecessary Selection argument from editor module r=m_kato 2018-10-30 10:01:38 +00:00
HTMLEditRules.cpp Bug 1503473 - part 4: Create a new path to handle Enter key press in TextEditor r=m_kato 2018-11-03 11:22:13 +00:00
HTMLEditRules.h Bug 1503473 - part 2: Make TextEditRules::WillInsertBreak() and HTMLEditRules::WillInsertBreak() return EditActionResult r=m_kato 2018-11-03 11:20:06 +00:00
HTMLEditUtils.cpp Bug 1465702 - part 4: Make public methods of HTMLEditor create AutoEditActionDataSetter if necessary r=m_kato 2018-10-30 10:00:17 +00:00
HTMLEditUtils.h Bug 1465702 - part 4: Make public methods of HTMLEditor create AutoEditActionDataSetter if necessary r=m_kato 2018-10-30 10:00:17 +00:00
HTMLEditor.cpp Bug 1504131 - part 3: Remove editor/libeditor/HTMLEditorObjectResizerUtils.h r=m_kato 2018-11-06 06:10:01 +00:00
HTMLEditor.h Bug 1504131 - part 2: Remove ResizerMouseMotionListener r=m_kato 2018-11-06 06:09:18 +00:00
HTMLEditorCommands.cpp Bug 1465702 - part 4: Make public methods of HTMLEditor create AutoEditActionDataSetter if necessary r=m_kato 2018-10-30 10:00:17 +00:00
HTMLEditorCommands.h
HTMLEditorController.cpp Bug 1449564 - part 2: Make absolute positioned element editor disabled in default and make it possible to enable it with new command r=m_kato 2018-04-04 22:27:49 +09:00
HTMLEditorController.h Bug 1489790 - Part 10: Remove the XPCOM component registration for @mozilla.org/editor/editordocstatecontroller;1; r=baku 2018-09-11 09:58:33 -04:00
HTMLEditorDataTransfer.cpp Bug 1503565 - Make HTMLEditor::BlobReader::OnResult() create AutoEditActionDataSetter r=m_kato 2018-11-05 02:12:27 +00:00
HTMLEditorDocumentCommands.cpp Bug 1485935 - Use NS_IMETHODIMP for implementation of HTMLEditor::GetIsCSSEnabled() r=m_kato 2018-08-28 09:46:53 +00:00
HTMLEditorEventListener.cpp Bug 1504131 - part 2: Remove ResizerMouseMotionListener r=m_kato 2018-11-06 06:09:18 +00:00
HTMLEditorEventListener.h Bug 1504131 - part 2: Remove ResizerMouseMotionListener r=m_kato 2018-11-06 06:09:18 +00:00
HTMLEditorObjectResizer.cpp Bug 1504131 - part 3: Remove editor/libeditor/HTMLEditorObjectResizerUtils.h r=m_kato 2018-11-06 06:10:01 +00:00
HTMLInlineTableEditor.cpp Bug 1465702 - part 4: Make public methods of HTMLEditor create AutoEditActionDataSetter if necessary r=m_kato 2018-10-30 10:00:17 +00:00
HTMLStyleEditor.cpp Bug 1465702 - part 7: Make protected/private methods of EditorBase/TextEditor/HTMLEditor use SelectionRefPtr() instead of GetSelection() r=m_kato 2018-10-30 10:04:08 +00:00
HTMLTableEditor.cpp Bug 1465702 - part 7: Make protected/private methods of EditorBase/TextEditor/HTMLEditor use SelectionRefPtr() instead of GetSelection() r=m_kato 2018-10-30 10:04:08 +00:00
HTMLURIRefObject.cpp
HTMLURIRefObject.h
InsertNodeTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
InsertNodeTransaction.h
InsertTextTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
InsertTextTransaction.h
InternetCiter.cpp Bug 1264876 - Remove StripCites() from nsIEditorMailSupport r=m_kato 2018-07-19 16:55:31 +09:00
InternetCiter.h Bug 1264876 - Remove StripCites() from nsIEditorMailSupport r=m_kato 2018-07-19 16:55:31 +09:00
JoinNodeTransaction.cpp Bug 1480663 - Make EditorBase::IsModifiableNode() non-virtual r=m_kato 2018-08-03 11:10:46 +00:00
JoinNodeTransaction.h
ManualNAC.h
PlaceholderTransaction.cpp
PlaceholderTransaction.h Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj 2018-10-31 20:39:03 +00:00
SelectionState.cpp Bug 358033 - Part 1. Restore direction of Selection. r=masayuki 2018-07-23 02:44:42 +00:00
SelectionState.h Bug 358033 - Part 1. Restore direction of Selection. r=masayuki 2018-07-23 02:44:42 +00:00
SplitNodeTransaction.cpp Bug 1480055 - part 2: Rename EditorBase::GetShouldTxnSetSelection() to EditorBase::AllowsTransactionsToChangeSelection() r=m_kato 2018-08-01 20:53:57 +09:00
SplitNodeTransaction.h
TextEditRules.cpp Bug 1503473 - part 4: Create a new path to handle Enter key press in TextEditor r=m_kato 2018-11-03 11:22:13 +00:00
TextEditRules.h Bug 1503473 - part 2: Make TextEditRules::WillInsertBreak() and HTMLEditRules::WillInsertBreak() return EditActionResult r=m_kato 2018-11-03 11:20:06 +00:00
TextEditRulesBidi.cpp Bug 1465702 - part 6: Remove unnecessary Selection argument from TextEditRules and HTMLEditRules and rename/reimplement TextEditRules::SelectionRef() as TextEditRules::SelectionRefPtr() r=m_kato 2018-10-30 10:02:58 +00:00
TextEditUtils.cpp
TextEditUtils.h
TextEditor.cpp Bug 1503231 - Make TextEditor::DeleteSelectionAsAction() removes removing range information from EditAction when Selection is NOT collapsed r=m_kato 2018-11-07 08:38:15 +00:00
TextEditor.h Bug 1503473 - part 4: Create a new path to handle Enter key press in TextEditor r=m_kato 2018-11-03 11:22:13 +00:00
TextEditorDataTransfer.cpp Bug 1503588 - Remove aDataLen parameter from nsITransferable.getAnyTransferData. r=smaug 2018-11-02 11:02:25 +00:00
TypeInState.cpp Bug 1465702 - part 5: Remove unnecessary Selection argument from editor module r=m_kato 2018-10-30 10:01:38 +00:00
TypeInState.h
WSRunObject.cpp Bug 1465702 - part 5: Remove unnecessary Selection argument from editor module r=m_kato 2018-10-30 10:01:38 +00:00
WSRunObject.h Bug 1500862 - part 3: Change all stack base helper classes which access protected members of EditorBase to nested classes of EditorBase r=m_kato 2018-10-24 09:42:06 +00:00
moz.build Bug 1485890 - Remove dumpContentTree, debugDumpContent and debugUnitTests from nsIEditor. r=masayuki 2018-10-29 07:23:49 +00:00
nsIAbsorbingTransaction.h