gecko-dev/editor
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
..
composer Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj 2018-10-31 20:39:03 +00:00
libeditor 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
reftests Bug 1473927 - Load textbox.css and numberbox.css as document stylesheets. r=paolo 2018-10-09 10:22:15 +02:00
spellchecker Backed out 2 changesets (bug 1504913) for build bustage in build/src/extensions/spellcheck/src/mozSpellChecker.cpp 2018-11-07 04:06:58 +02:00
txmgr Bug 1484118 - Remove the XPCOM component registration for nsTransactionManager; r=masayuki 2018-08-23 09:36:59 -04:00
AsyncSpellCheckTestHelper.jsm Bug 1489980 - Enable ESLint for editor/ - Manual fixes. r=masayuki 2018-09-13 07:59:47 +00:00
moz.build Bug 1491199 - Get rid of nsIEditorBlobListener. r=masayuki 2018-09-18 04:34:21 +00:00
nsIDocumentStateListener.idl
nsIEditActionListener.idl Bug 1489047 - Change almost all DOMString occurrences in XPIDL files to AString. r=nika 2018-09-06 18:02:43 +10:00
nsIEditor.idl Bug 1485890 - Remove dumpContentTree, debugDumpContent and debugUnitTests from nsIEditor. r=masayuki 2018-10-29 07:23:49 +00:00
nsIEditorMailSupport.idl Bug 1491191 - Remove unused methods in nsIEditorMailSupport. r=masayuki 2018-09-14 10:03:24 +00:00
nsIEditorObserver.idl Bug 1432528 - part 4: Remove nsIEditorObserver::BeforeEditAction() and nsIEditorObserver::CancelEditAction() because nobody implements them r=m_kato 2018-01-24 14:31:29 +09:00
nsIEditorSpellCheck.idl Backed out 2 changesets (bug 1504913) for build bustage in build/src/extensions/spellcheck/src/mozSpellChecker.cpp 2018-11-07 04:06:58 +02:00
nsIEditorStyleSheets.idl Bug 1470361: Remove nsIEditorStyleSheets.addStyleSheet / removeStyleSheet / replaceStyleSheet. r=m_kato 2018-06-25 10:46:38 +02:00
nsIHTMLAbsPosEditor.idl Bug 1484136 - Create HTMLEditor::RefreshGrabberInternal() for internal use r=m_kato 2018-09-11 05:30:33 +00:00
nsIHTMLEditor.idl Bug 1501663 - part 7: HTMLEditor::GetSelectedElement() shouldn't return element node when Selection starts before the element node r=m_kato 2018-11-05 11:38:10 +00:00
nsIHTMLInlineTableEditor.idl Bug 1485929 - Create HTMLEditor::RefreshInlineTableEditingUIInternal() for internal use r=m_kato 2018-09-11 12:10:54 +00:00
nsIHTMLObjectResizer.idl Bug 1485921 - Create HTMLEditor::RefreshResizersInternal() for internal use r=m_kato 2018-09-11 08:15:52 +00:00
nsIPlaintextEditor.idl Bug 1489047 - Change almost all DOMString occurrences in XPIDL files to AString. r=nika 2018-09-06 18:02:43 +10:00
nsITableEditor.idl Bug 1484126 - part 1: Create CellData struct which implements nsITableEditor::GetCellDataAt() r=m_kato 2018-10-12 13:40:25 +00:00
nsIURIRefObject.idl Bug 1489047 - Change almost all DOMString occurrences in XPIDL files to AString. r=nika 2018-09-06 18:02:43 +10:00